1

When I try to publish a new local branch using Github for Windows the process fails without an error message. Opening the shell and using 'git push' results in the error:

fatal: The current branch local-branch-name has no upstream branch
To push the current branch and set the remote as upstream, use

    git push --set-upstream origin local-branch-name

If I cut and paste this command the push goes forward and I can use the GUI for all other pushes and pulls. I have been using GitHub for Windows for more than a year and this just started. I recently upgraded and I am running version Great Dane 2.6.4.1. I don't know if that has any relevance or not. I am not seeing a lot of reports or really any reports of this type of issue.

Did I set a flag somewhere that is causing this? Did a GitHub default change? what could be causing this behaviour? (I fully expect this to be a PEBKAC issue I just don't know what I did).

shaneknysh
  • 175
  • 8
  • possible duplicate of [Warning: push.default is unset; its implicit value is changing in Git 2.0](http://stackoverflow.com/questions/13148066/warning-push-default-is-unset-its-implicit-value-is-changing-in-git-2-0) – Zombo Nov 26 '14 at 22:43

1 Answers1

0

You either need to call a specific upstream or set a default upstream setting.

 $ git branch --set-upstream-to=origin/master
 $ git remote -v
       origin   https://github.com/mjbrender/simple-blog.git (fetch)
       origin   https://github.com/mjbrender/simple-blog.git (push)

If you don't have one set yet:

$ git remote add upstream git@github.com/some-maintainer/some-project.git

You can keep yourself from having to this again after a project clone with this:

$ git config --global push.default simple
mbb
  • 3,052
  • 1
  • 27
  • 28
  • Using what exactly? Did that help? – mbb Nov 27 '14 at 19:28
  • _sorry that was half a comment - don't know what happened to the rest_ I updated my config using `$ git config --global push.default simple` but it had no effect. I am still unable to publish new local branches via the Github for Windows GUI. – shaneknysh Nov 27 '14 at 19:56
  • You are unable to publish new local branches via Github for Windows GUI on a project that you cloned prior to running the `git config --global push.default simple` command? Try re-cloning after running that command, branching, then publishing. – Trevor Dec 29 '14 at 23:15