Wednesday, December 22, 2010

6 git lessons for git beginners from a git beginner

1) Bookmark this: Just do it.

2) Branching is awesome and mentally cheap right now, but can be confusing and cognitively expensive in 5 weeks time. Try to keep your commit history clean (eg. with rebase), your git log will love you for the decrease in merge commits.

3) For god's sake do most of your work in a branch. Getting merge issues when you pull just before beer o'clock will ruin your weekend. Keep your master branch looking as much like origin/master as possible.

4) Merge master into your branches often if you're planning to merge back later.

5) Merging is shit no matter how you do it. Use a tool whenever possible (try lots) but learn to do it manually too, that way you'll never have a problem when your tool of choice can't handle gnarly 3 way merge issues.

6) For the similar reasons to point 2, Learn to 'git pull --rebase'

No comments:

Post a Comment