Say I've got a branch (called myBranch) on which I made some changes.
I know doing git diff myBranch..master
will get me the difference between myBranch and master, but that diff also includes the differences which weren't caused by me . (ie., those could be changes that happened on master but which I haven't pulled to my branch, which I dont care about!)
Is there a quick way for me to get ONLY changes that I made on my branch against master?
This will show you commits you've added to master but not to myBranch:
git log myBranch..master --author "$(git config user.name)"
This will show you commits you've added to myBranch but not to master:
git log master..myBranch --author "$(git config user.name)"
This will show you all commits in your branch that are not in master:
git log master..myBranch
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.