Reputation: 365
I had master branch which had all my code commits.Few days back I've cut a new branch from master called dev.I made some commits in both the branches..Now I want to get all commits in master branch after dev is cut from it.. Is there any command for this .Can someone help me quickly
Thanks!
Upvotes: 0
Views: 141
Reputation: 12619
It's surprisingly simple:
git log dev..master
Just to elaborate and put an end to the confusion having resulted in 16 comments:
There is a huge difference between using two dots ..
or three dots ...
between the branch ids:
..
you get all new commits only on master
since they have diverged....
you get all commits on both dev
and master
since they have diverged.Upvotes: -1
Reputation: 1101
By "get all commits" do you want to simply view the commits, or incorporate them into your dev
branch?
If you want to add them into your branch, you'll probably want to git pull
or git fetch
depending on your endgame. This thread covers the difference pretty well: What is the difference between 'git pull' and 'git fetch'?
Upvotes: 0