GIT : merging a single commit from a branch to another branch
Merging a single commit to another branch
This is called cherry-pick
$> git cherry-pick eba87949886ca99c7383266ae318c54401d786ec
It might fail with this :
$> git cherry-pick eba87949886ca99c7383266ae318c54401d786ec
fatal: bad object eba87949886ca99c7383266ae318c54401d786ec
In that case, you have to fetch --all :
$> git fetch --all
Fetching origin
remote: Counting objects: 41, done.
remote: Compressing objects: 100% (26/26), done.
remote: Total 29 (delta 22), reused 0 (delta 0)
Unpacking objects: 100% (29/29), done.
From https://stash.haivision.com/scm/hydra/hydra
019413c..eba8794 kui -> origin/kui
$> git cherry-pick eba87949886ca99c7383266ae318c54401d786ec
error: Commit eba87949886ca99c7383266ae318c54401d786ec is a merge but no -m option was given.
fatal: cherry-pick failed
You got to love GIT
The above error will happen if you try to cherry-pick a merge operation. Do not try with this commit, use individual ones from before. If you used a "Combine to one commit", use the first one of the series of changes (which surprisingly seems to regroup all single commits).
Warning: I am not a GIT expert and cherry-pick has its downsides as you might loose stuff if you don't merge back the cherry-pick commit in the original branch you cherry-picked into. This was a little more simple with SVN.
You saved my day! Awesome. Git is awesome, but sometimes, you\'d want to bite the error messages.
git fetch --all was the missing pixie dust that I was missing. Thanx!