I\'m using Git on a new project that has two parallel -- but currently experimental -- development branches:
master
: import of existing codebase pl
There is another way to go:
git checkout -p
It is a mix between git checkout
and git add -p
and might quite be exactly what you are looking for:
-p, --patch
Interactively select hunks in the difference between the
(or the index, if unspecified) and the working tree. The chosen
hunks are then applied in reverse to the working tree (and if a
was specified, the index).
This means that you can use git checkout -p to selectively discard
edits from your current working tree. See the “Interactive Mode”
section of git-add(1) to learn how to operate the --patch mode.