This document discusses unleashing the hidden interactive mode in git. It recommends using focused and single-purpose commits with log messages explaining what changed and why. It also provides commands for interactively adding, removing, and stashing files including git add -p, git reset -p, git checkout -p, and git stash --keep-index. Questions can be directed to the author.
6. Secret Interactive Git Toolbox
Add to index:
$ git add -p .
Remove from index:
$ git reset -p HEAD
Remove from working tree:
$ git checkout -p .
Any of these can also be applied to specific files.
#3: “meh” at left, “happy” at right, they already know this-- commands at right are useful, not found on github
#4: step back, ask a question. how focused are your commits? how often does this happen to you? working on a feature, realize you’ve added two or three, or added a refactor, etc. These could be split into a) other feature branches, or b) just separate commits (commit messages can provide valuable documentation)
#6: note that the “index” is where things are put when you “stage” them