I modified some files in my branch and did a
git add --all
But this added some files that I didn't intend to add for the commit.
So I did a
git reset --soft HEAD~2 (instead of doing git reset HEAD)
But the previous commit was made by someone else and it caused a lot of files to be in modified/added/deleted status. Is there a way to get back to a stage where the only changes I see are the files added/modified by me? Since I didnt make an actual commit, is there a way to move my head back to master without blowing away my changes? git pull is causing merge conflicts as I didn't actually commit my changes.
Thanks!
解决方案
Just do git reset master. This will only update the index and what HEAD points to. It will not modify your work tree files.
3102

被折叠的 条评论
为什么被折叠?



