11

I created a branch, say "dev" which was based off say branch "Base" and then merged it with Upstream content (I want to keep Base clean till I am done with my testing). After resolving conflicts, I ran the command git commit -a -m "comment" and it went through. Next, I ran git push, hoping the new branch would be created on the git server and also my merged content on dev will be seen. But, when I ran git push, the command gave output "Everything up-to-date" and I do not see the new branch on the git server. Is there anything that I am missing?

1
  • need more info like what version of git you are using, is dev setup as a tracking branch? can you paste your .git/config file? Commented Jan 18, 2012 at 20:20

1 Answer 1

29

See if you have created the branch on the remote repo:

$ git branch -av 

You probably haven't. You can create the branch by explicitly stating you want to push it:

$ git push origin dev 

By default git pushes all branches that have a respective branch on the remote (new branches don't).

Sign up to request clarification or add additional context in comments.

2 Comments

git push -u origin dev will also create the local tracking information so that you can use just git push later
@abresas, That was absolutely perfect. I ran the git push origin dev after I saw the branch wasn't on the remote and it worked. Thank you.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.