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.
“meh” at left, “happy” at right, they already know this-- commands at right are useful, not found on github
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)
note that the “index” is where things are put when you “stage” them