如何在git中撤消部分未暂存的更改,而将其余更改保留为未暂存?我想出来的方法是:
git commit --interactive
# Choose the parts I want to delete
# Commit the changes
git stash
git rebase -i master # (I am an ancestor of master)
# Delete the line of the most recent commit
git stash apply
这是可行的,但如果有像git commit --interactive
这样的东西只用于恢复更改就更好了。有更好的方法吗?
https://stackoverflow.com/questions/1981830
复制相似问题