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.

Required fields*

5
  • 17
    As I read this: "Of course I spelled the branch name right..." 5 seconds later: "Oops. Works now!" Commented Jan 6, 2014 at 2:11
  • Heh. I've so been there, Jonathan! Commented Jan 6, 2014 at 3:15
  • 1
    "so the error is telling you that something's wrong with the source part of your refspec" That's it. Forgot to commit :) Commented Jul 4, 2014 at 7:35
  • @EthanBrown so if i have understood it correctly, suppose i don't have any branch named fake on remote repo but have one created in the local repo. So what this command git push origin fake:fake actually does it create a fake branch on remote and push all the commits of local fake to this remote fake branch. Right ? Commented Oct 29, 2023 at 8:47
  • That's correct, @humbleCodes. Also, you can use get push origin :fake to delete a branch from the remote, which I've always found to be a little...obscure. There are lots of syntax choices in Git that I find a little questionable but hey, we get used to the dominant system! Commented Oct 29, 2023 at 23:42