Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitKraken won't push to new remote ("Select remote branch to push/pull with 'master': ")

So I've create a new repo on remote, and managed to connect it (I belief) to client (Git Kraken). Now it want a branch name from me for a repo that doesn't have any. Note that its also ...push/pull with "master":, that is master with a colon. Pretty much explaining a mechanic that is at play here is as welcome as actually drawing out steps.

like image 435
janat08 Avatar asked Jul 11 '16 04:07

janat08


People also ask

How do I force a remote branch to push?

You can also do git push -f as long as the remote branch you want to push to is the most recent one you pushed to. "will force push all local branches" - Why would it push anything but the active branch?

Does git push push automatically branch?

If you run the simple command git push , Git will by default choose two more parameters for you: the remote repository to push to and the branch to push. By default, Git chooses origin for the remote and your current branch as the branch to push.


2 Answers

You'd need to "Set Upstream" for your local branch. To do so:

  • Find your local branch on left pane under LOCAL,
  • right-click and select "Set Upstream",
  • name your new remote branch on the prompt and click "Submit",
  • click "Push" on the top toolbar.

To avoid confusion, you could also name your local branch (to keep it the same as the remote) at the time of creating the branch from master or whichever remote you want to branch from.

Note: Though there shouldn't be drastic differences between versions, the above is based on GitKraken 2.5.0 64-bit (non-pro version)

like image 73
Masoud Azizpour Avatar answered Oct 18 '22 20:10

Masoud Azizpour


I had this same problem - I typed in "origin/master" and that pushed it for me, I guess it just wants to know where it is pushing it to even if there is only one place.

like image 36
charliethegoldfish Avatar answered Oct 18 '22 20:10

charliethegoldfish