I’ve been using Git for quite some time and I’ve come to really enjoy it. It might be a little weird to say that I enjoy my source control system, but it makes development so much easier in so many ways. Now, I will admit that our relationship wasn’t always awesome; working with Git can have a steep learning curve. I’ve invested a lot of time in learning to use Git, so I’ve put together a few helpful tips for you.
Change your Text Editor
I love using Git from the command line, but it’s not perfect. If you’re developing in Windows, formatting your commit messages from the command line is about as enjoyable as a dead fish in the backseat of your car on a hot and humid summer day. Set Git up to use a graphical text editor and you’ll be writing better commit messages in no time.
My text editor of choice is Sublime Text 2, though this will work for any text editor you might be using.
You are writing good commit messages right?
Use a Graphical Merge Tool
Now that you have a graphical text editor, why not use a diff/merge tool that you’ll be productive with? There are a lot of options here, and today I’m using DiffMerge.
When I set up my diff/merge tool I tend to just edit my .gitconfig file directly since it’s faster for me. If you want to add all this crap in via individual commands in Git that’s cool, but my recommendation is to save some time and just edit this by hand.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
The right Diff/Merge tool makes all the difference when working on a project where you can have conflicts that need addressing.
Take some time and play around with some of the different tools and setting them up to work the way that makes sense for how you work. Today I’m using DiffMerge and in the past I’ve used WinMerge; both are great. But, with that in mind, I’ve been taking a serious look at Semantic Merge and it looks to be really promising.