I was on the master branch and created a new branch and moved to it:
git branch br2
git checkout br2
I then made 2 commits on br2
I moved back to master
git checkout master
I did some work and made 3 commits
Now I want to push these 3 commits to origin/master First I do :
git status.
git status says :
On branch master. Your branch is ahead of orgin/master by 5 commits.
That seems odd. I only did 3 commits on the master branch.
So I run:
git log origin/master..HEAD
It shows 5 commits including the ones I did on the br2. In the listing of the commits, there is no indication of what branch they are associated with.
I'm a little confused. I want to push just those 3 commits I did on master, but I'm fearing that the 2 I did on br2 are going to be included.
Is there a better way for me to see what commits on the current (in this case master) branch are going to be pushed?
I have no plans to create a remote br2 branch. At some point I thought I'd merge br2 into master and then do a push so that all the br2 commits would go into the remote master at that time. Am I understanding this right?