Only You Can Prevent git Merge Commits

I love using Git, but when my repositories turn into a tangle of merge commits, I start to get a little frustrated. Here’s my solution. Go into your repo’s .git/config file and make sure it has something like the following:
[branch "master"]
remote = origin
merge = refs/heads/master
rebase = true
Now, when you run git pull, it’ll rebase your local commits on top of the newly pulled-down commits instead of trying to merge them. Even better, try putting this in your global ~/.gitconfig file:
[branch]
autosetuprebase = always
With this change, all tracked branches from then on will be set up to rebase instead of merge.

Recent Comments
Thanks for getting this together. I’ve been wanting to use Git or a least know how to use it and you’ve helped me a great deal. I’m still not sure though if it’s my best option for VC on my personal website. I do like the launch, open, cp & move files from my terminal. Looking forward to seeing more posts from you in the future.
Hasta la pasta.
®