We hear it all the time “git is hard”, “why do we have to use git?” etc etc. but it doesn’t have to be.
Why do people think this? Is it lack of knowledge? Is it a case of a “bad workmen blame their tools” ?
So why am I writing this? I want you dear reader to think. I assume you’re here as you find git hard and want to know why it’s so hard. Why do people find it so easy? You see people on YouTube videos whizzing around on the command line firing off merge and rebase commands like it’s easy but you find it so hard.
The fundamental issue is git is hard. Or more to the point; git is hard unless you practice. Like any skill or sport, it will be hard unless you practice and learn how to do it.
The people you see being keyboard wizards in the command line have probably been doing it for years. Maybe even before the UI tooling has made it even easier to work with and they are just happy there.
One of the major benefits of using git as a source control system is everyone can use it how they want to use it. Nowhere I have worked, which uses git for source control, has dictated “you must use tool x” to use git. They have just let the developer get on with it.
Personally I use the git integration with Visual Studio and some command line for basic commands such as branching and cloning etc. However there are so many other tools out there to make things easier for you as developer. For IDE integration as I said Visual Studio 2022 has great integration. There is also JetBrains Rider which also has superb git support (check out Dan Clarke’s video). VSCode has git support as a 1st class citizen.
Want to use tools outside of your IDE? There are so many to choose from so I’m not going to list them all but my point is use what works for you. Management might define the SDLC and branching strategy you need to adhere to but as for tooling they shouldn’t care.
Why am I writing this post today? I saw a tweet by a friend of mine quoting another tweet about how bad git is.
As I said in my reply:
“Agree. After using TFS for years, then git, then going back to TFS for years, now back to git I can confirm I’m never going back to TFS again. As for wrong cmds losing work, then use different tools to work with git which help prevent this”
Git isn’t bad. Can it be complicated? Yes. The best source control out there? Maybe, maybe not. But use what you need from it. Not everyone is going to need all the commmands.
How often do I do bisect searching on history or use the command to look at the history logs? Never. I use a UI tool to search through history. I find who last changed a file by using the blame button in the IDE. Why? I don’t have time to waste with finding the right command to do what I need to.
If you’re finding git hard then it may be worth taking a look at how you are using it, evaluate your current toolset and maybe make a change.
At the end of the day source control systems are there to aid with developer productivity. What is stopping them helping yours?