1. Fetch a file from another branch without changing your current branch:
$ git checkout other_branch -- path/to/file
2. See what branches are merged:
$ git checkout master
$ git branch --merged
Use --no-merged
to see the branches not yet merged.
3. Have Git auto-correct you:
$ git config --global help.autocorrect 1
Example:
$ git commti
WARNING: You called a Git command named 'commti', which does not exist.
Continuing under the assumption that you meant 'commit'
4. Show word changes in diff
:
$ git diff --word-diff
5. Set remote branch tracking by default:
$ git config --global push.default tracking