D11 - advanced workflows
stash

image: Paolo Perrotta, Pluralsight
git stashmoves all the data that are tracked to the stashgit stash --include-untrackedmoves the data in the working area as wellgit stash apply <index>moves the stashed items back to the working area
restore
- to undo changes in a particular file:
git reset HEAD <filename> - to also discard the changes in the working area, a hard reset will not help
git restore <filename>does thatgit checkout HEAD <filename>also does that, but note that this is very destructive
hunks
- suppose a few lines were added/changed in a file
- using
git add --patch <filename>stages the changes as a hunk - it can be further split it into smaller hunks selecting the
soption - so, individual changes can be reviewed