There's quite of few intricate git parameters I didn't know about, so here's my notes for almost all of them:
git add -p [ a logical way of staging hunks ( diff entities) ]
git checkout - [ '$ cd -' for branches ]
git branch --merge [ show all merged branches ]
git branch --no-merge [ not merged branches ]
git branch --contains [ which branch contains a particular sha ]
git checkout BRANCH -- path/to/file [ copy a file from a different branch ]
git log branchA ^branchB [ show commits in a that not in b]
git fsck --lost-found [ show deleted content that hasn't been gc'd]
git diff HEAD --stat [ force display commit message ]
git blame -w [ shows who changed each line while ignoring whitespace changes ]
git blame -M [ ignore move commits, display only code changes ]
git blame -C/-CC/-CCC [ ignore different levels of move/rename and only display code block creation or modification commits ]
git config remotes.mygroup 'remote1 remote2' [ group multiple remotes ]
git status -sb [ colorize status, remove fluff ]
git diff HEAD^ --word-diff [ colorize and highlight word changes instead of producing line diffs ]
git config --global help.autocorrect 1 [ convert 'did you mean' messages into action, questionable usefulness ]
git config --global rerere.enabled 1 [ remember previously merged commits when merging repeatedly with same branches, i.e. master -> long running dev branch ]
git config --global color.ui 1 [ command that I keep googling on stack overflow whenever I setup git on a new machine ]
git commit --amend [ modify commits that haven't been pushed to remote ]
git reset --soft HEAD^ [ retains commit diff as 'staged' as opposed to complete erase with --hard ]
git shortlog -sn [ count number of line diffs by author? committer? ]
git commit (--amend) --author "Author Name <author@email>" [ attribute commit ]
"git add -p" is absolutely phenomenal. I'm probably not the only one keeping on working on something until it functions, which often means solving several issues at the same time. This command lets you add file chunks in the commit staging area, instead of entire files, up to the point where you can actually edit the patch itself. As useful as it is dangerous (it's a good way of committing invalid code).
"git commit --amend" - this works only on the last commit of the current branch, and it doesn't care whether your commit has been published or not. You might care, though, once you attempt to push your amended commit and it complains the remote can't be fast-forwarded. Extremely useful though (how many times have you forgotten to add a new file to your VCS before commit?)
I'm surprised not to see "git reflog" in the list of commands listed. Git being something of a wonderful footgun, this is a command every git user should know. It essentially records the commits you have made. Feeling bad about your last "git branch -D"? Your rebase didn't turn out so well? You need "git reflog".
I'll toss in "git whatchanged" as well. This is "git log" but with the list of files modified.
I didn't know about reflog and whatchanged, I'll definitely read up on them. Thanks!
$ git commit --amend a98fd2e95dde78041132b6281f6c2127712507f5
error: pathspec 'a98fd2e95dde78041132b6281f6c2127712507f5' did not match any file(s) known to git.
$ git --version
git version 1.7.11.msysgit.1