about.digg.com — We have been using git for months now and I still learn something new about it almost every week. Here are some of the more useful commands that I have come across. Have some good ones yourself? Add them to the comments on the digg story.
Mar 3, 2010 View in Crawl 4
jericevansMar 3, 2010
git blame <path>
volksportMar 3, 2010
git commit -a -m "<commit message>"This allows you to add all modified files and commit them in one command
dlsspyMar 3, 2010
I wrote a config option that allows rebase to be the default operation for pull. You can just do this: git config --global branch.autosetuprebase alwaysand every branch you create from that point forward will rebase on pull. If you want to do that retroactively in a single command for all master branches you have anywhere, you can do the following: git config --global branch.master.rebase true
jac4669Mar 5, 2010
'git merge-tool' Invaluable during rebases (with a three-way-merge tool, of course, like kdiff3)'gitk --all' Clearly shows what is going on, allows to handle even the most intricate situationsBy the way, instead of pulling I tend to 'git fetch [-v]' and see what happened before doing a regular rebase or merge. Remote branches are - after all - just like regular branches
jimmyjmsMar 8, 2010
See my Git aliases for my most common ones, including aliases suitable for a Bash terminal.<a class="user" href="http://github.com/jamesottaway/dot-files/blob/master/.aliases/git.sh" rel="nofollow">http://github.com/jamesottaway/dot-files/blob/mast ...</a>