Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why is git-cherrypick saying nothing to commit

I googled a lot for the below issue but couldn't get any substantial info...please help me out,created a temporary branch 202116 and am trying to do a cherrypick of gerrit 202116 and I get the below message,why am I not able to cherry-pick this gerrit and why am I getting this error?please provide your inputs

<>git fetch ssh://[email protected]:29418/platform/vendor/company-proprietary/radio refs/changes/25/202116/1 && git cherry-pick FETCH_HEAD From ssh://company.com:29418/platform/vendor/company-proprietary/radio  * branch            refs/changes/25/206025/1 -> FETCH_HEAD # On branch 202116 # You are currently cherry-picking. #   (all conflicts fixed: run "git commit") # nothing to commit, working directory clean The previous cherry-pick is now empty, possibly due to conflict resolution. If you wish to commit it anyway, use:      git commit --allow-empty 
like image 203
user1934146 Avatar asked Dec 31 '12 00:12

user1934146


People also ask

Why is cherry pick empty?

If a commit being cherry picked duplicates a commit already in the current history, it will become empty. By default these redundant commits cause cherry-pick to stop so the user can examine the commit. This option overrides that behavior and creates an empty commit object. Implies --allow-empty .

Does git cherry pick automatically commit?

git cherry-pick is a powerful command that enables arbitrary Git commits to be picked by reference and appended to the current working HEAD. Cherry picking is the act of picking a commit from a branch and applying it to another. git cherry-pick can be useful for undoing changes.


2 Answers

It's exactly what it says: the changes you're trying to cherry-pick are already wholly contained in the branch you're on. I.e. the result of the cherry-pick is no changes. You can create an empty commit with the --allow-empty flag to indicate that you attempted to cherry-pick, but there were no changes to pull in.

like image 51
Ryan Stewart Avatar answered Sep 30 '22 06:09

Ryan Stewart


This could be caused by trying to cherry pick a commit that was already integrated/cherry-picked into your current branch.

like image 40
Hassen Ch. Avatar answered Sep 30 '22 06:09

Hassen Ch.