I'd like to do the following work flow:
- Add changes to the stage.
- Stash all the other changes that were not staged.
- Do some stuff with the things in stage (i.e. build, run tests, etc)
- Apply the stash.
Is there a way to do step 2?
Example
echo "123" > foo
git add foo # Assumes this is a git directory
echo "456" >> foo
git stash
cat foo # Should yield 123
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…