开发者

Git Cherry Pick dirty index

I have two branches master and exp

i tried to cherry pick some of the commit in the exp to master.I am getting the following error.

git cherry-pick 209c4b154d3c15fa8086d4cc15fa34e53b8a65a3
fatal: Dirty index: cannot cherry pick

Can anyon开发者_运维百科e explain this error.


you have changes to your index (staged changes). either create a new commit or git reset the problematic files—whatever works best in your current situation

to avoid conflicts with changes in the working directory stash them away with git stash save, do the cherry-pick and then git stash pop them back. alternatively you can commit them and then cherry-pick

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜