tags:

views:

196

answers:

1

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 anyone explain this error.

+3  A: 

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

knittl