Question

I am having a situation here. I did some commit to master branch and after move these commit to other branch x using and

     git cherry-pick 

and I run git cherry-pick on x branch itself. Now after this git cherry-pick, forgot to run git push command.

Almost at same time my colleague did the git cherry-pick for his commits and did the git push.

When I see the git log on his machine I couldn't find my commit and realize that I forgot to run git push.

I went to my machine, did the git push. But I am seeing this message now

Was it helpful?

Solution

Without a better log output it is hard to tell, what happend.

I guess you both had the same base commit, each of you did a cherry-pick, and you merged both cherry-picks in order to be able to push it.

The log above shows one commit from you (cf5b726), one commit from your colleague (1aa2ecd) and a merge (28529d0) of the first two commits, which seems to originate from a git pull.

And yes, the merge carries the changes of both merged commits. - After all that's exactly the point of a merge. ;)

OTHER TIPS

You can use git log --graph or git log --format=raw (or magit for Emacs) to see the parents of a commit.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top