Chapter 6 notes
git show enterfirstfewshahere
add branch to show
git show HEAD^ shows parent
git log master..experiment shows all commits on exp not on master
git log ^refA refB all commits from multiple braches not on master
git log master...exp all commites reachable by either not both
-i for many commands starts interactive mode
you can use this to patch or stage parts of files you have changed
stashes
git stash saves uncommited and not added files so you can switch branches, etc
git stash list shows all stashes
git stash apply applys last stash
git stash apply stash@(n) applies older stashes
this doesn't change previously staged files; use git stash --index
git stash drop stash@(n) removes stash
git stash show -p stash@{0} | git apply -R unapplies last stash
git stash branch to turn a stash into a branch
amending
git commit --amend changes last commit message
$ git rebase -i HEAD~3
$ git rebase -i HEAD~2^ allows you to edit last 3 commits (both)
rebasing also allows for changing the order or splitting a commit
filtering a branch can remove a file from every commit, like a file with passwords
git blame shows the contents of a file and the commits that got it there.
git blame -L #,# limits line numbers returned.
git bisect is cool for debug; git bisect start, bad, good[commit]; then it starts in between. tell git good or bad until bug is found.
Submodules
skipping.