This blog talks about a tool name "Git Graph" and how it saved me tons of time and headaches and how it can save yours too. So grab some popcorn and enjoy!!!
What is "Git Graph"?
Don't mistake it just for a VS Code extension. For beginners like me, it's an Elixir.
Let me explain.
For a couple of days, I was working on Umbrel (a cool open-source project. blog coming soon on it.) and doing some app submissions for them. They require you to open separate PRs for each submission. So I created new branches and submitted PRs one by one. Not realizing that I had 13+ branches now(each line represents a branch).
Now the code reviews came in and they required changes in the PRs. Beforehand I thought of manually changing the branches and committing the changes and pushing those. But they also proved quite challenging for a beginner like me because of this:
The branch name seems kinda off to me at first glance(don't they). Do they?? I searched around the internet and found out that Git only pulls the default branch while cloning the repo.
Well, I think they did it for a good reason but that's not so good for me.
Then, I thought no problem. I can just:
- change the default branch on GitHub and
- clone it on my PC
- make changes and
- simply push the commits and changes on GitHub.
This was my thinking when I was working on my second app submission. So don't feel sorry for me. Because I only had two branches then. I don't know when those 2 transformed into these many(Sorry. Totally, My bad~~). Let's leave the past now.
Well for one branch I did everything manually and felt the amount of work I had to go through for the next remaining ones. Then I saw this.
Peeking at me was "Git Graph" which has been lying around for a couple of years now for no particular use case. I only used it for... I don't remember when I last used it. I always did everything from the terminal before. I guess because I worked on very small projects back then.
This was the moment I opened it and realized the main use of Git Graph as a tool. Before then it was just an extension for me to see colorful graphs but today I got to know the real use of it. I was able to bounce around my branches like Michale Jackson and push commits like a breeze. Testing all the different apps was like a play now as I didn't have to manually change the branch from the terminal anymore. I just checkout the branch from Git Graph and it was a matter of seconds to run and deploy those changes. It really made me 10x more efficient in terms of Git and made me feel like a Git Ninja.
Now I didn't extensively use this tool ever before. So pardon me if I am over-exaggerating things here. But with this tool, I felt like a warrior.
So this was it. I just wanted to share this experience with you all. If you might have had this experience before do share yours in the comments section below.