简体   繁体   中英

How to see differences between branches, after cherrypicking commits?

On a git repo, let's suppose I have a master and a developent branch.

There are some changes going on on development branch consisting on several commits. I want to apply some of those commits to master, but not all of them.

For that reason I did the following:

  • Created a new branch dev-cherrypick
  • Cherry-picked some of the commits
  • merged dev-cherrypick into master

However, If I now compare dev vs master with: git log master..dev , the output still shows the commits I already cherry-picked (I understand that this is because once cherry-picked, they get a new hash id)

Is there a way of being able to compare two branches to tell the "real" differences between them if some of those branches has cherry-picked commits?

You can use git diff master dev .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM