所以,我檢查了一個分支,做了一些工作,藏匿的變化,並檢查出的主:意外的混帳藏匿,現在不能彈出 - 如何撤消?
$ git checkout my-branch
... make changes
$ git stash
$ git checkout master
於是,我意外地應用於我的藏匿掌握,它不應該去,並得到了很多衝突消息:
$ git stash apply
Auto-merging app/common/collections/visitors-realtime.js
CONFLICT (content): Merge conflict in app/common/collections/visitors-realtime.js
...
糟糕!現在我想撤消這個。試圖彈出藏匿不起作用:
$ git stash pop
app/support/backdrop_stub/responses/licensing_realtime.json: needs merge
styles/common/visitors_realtime.scss: needs merge
unable to refresh index ...
我不能只是看看其他的分支:
$ git checkout my-branch
app/support/backdrop_stub/responses/licensing_realtime.json: needs merge
styles/common/visitors_realtime.scss: needs merge
error: you need to resolve your current index first
我想不應用這些變化掌握,回去我的分支,並在那裏應用它們。我怎樣才能做到這一點?
只是重置回提交您的應用前藏匿? git reset --hard –
Tim