Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

7
  • 7
    What if you don't want to merge? And just leave D as a side-branch (at least for now). Later, I might commit more after C; someone else might commit more after D. What's the hurry to merge? How can I push a side-branch without merging? ~~~ Commented Nov 26, 2012 at 17:43
  • 3
    local/branch and origin/branch are meant to represent the same branch but on different machines (local vs origin); to push local/branch is to update origin/branch. If you want the state of your branch to be visible to others (ie on origin) but you do not want to merge with origin/branch, then you should create a new branch off of local/branch (git branch [name]) and push that branch to origin (git push -u origin [name]) Commented Nov 27, 2012 at 18:40
  • 1
    Great explanation. This video shows a brief demonstration of the issue and how to resolve it as @JakeGreene describes, as well as two ways to avoid it in the first place when setting up a new repository. Commented Oct 26, 2014 at 17:45
  • 4
    some years later, it just seems that this answer is very very similar to this other
    – superjos
    Commented Aug 12, 2015 at 13:03
  • 1
    For me git pull also printed Already up-to-date. Turned out I was not on the branch i though I was, but a detached HEAD branch (possibly from a failed merge?). This was obvious after running git branch. After running git checkout mybranch everything worked as expected.
    – strider
    Commented Oct 6, 2018 at 23:54