7

I have found Gitkraken a few days ago and was playing with it a bit. I came to a point where I did not found any useful informations on the internet or the gitkraken faq about my question anymore.

I have the following case:

  • Local repository with 2 branches develop & master
  • Gitlab server where my repositorys are hosted
  • Clean repository created and added as remote
  • Tried to push but im sticking at the point when it want to know the remote branch but there isn’t a branch

I made some commits and wanted to push my commits to a brand new fresh empty repository but it always ask for a remote branch. So how can I push my existing commits to a remote when there exist no remote branch until yet?

enter image description here

Hidden
  • 3,598
  • 4
  • 34
  • 57
  • Myself I had some issues with gitkraken that left my repository in an inconsistent state that took a good while to solve, maybe that is your case. Are you able to see the remote branches from the terminal? For instance, running the command "git remote show origin" (assuming that origin is your remote), what output do you get? are the trackings correct? – Juan May 16 '16 at 16:24

5 Answers5

4

I have never used Gitkraken before, but I just tried to replicate your scenario. I I just typed origin/master and clicked on submit and gitkraken automatically created the branch. I tried with an new repo on Bitbucket, but I think this should work with GitLab as well.

Steps I followed:

  1. Create empty repository in bitbucket
  2. Clone that empty repository in my local with gitkraken UI (click on the folder icon on top left, choose clone and follow the steps). This created my local repository and a remote named origin
  3. Pushed the local "master" branch from git kraken
  4. In the place to enter the remote, I just entered origin/master (till now I don't have the master branch in my remote repository), after clicking submit, I could see the master branch in my remote.

I see your remote is named Gitlab, can you please also try with Gitlab/master, please note that the repository name can be case sensitive.

dubes
  • 5,324
  • 3
  • 34
  • 47
1

Try typing in GitLab/master into the input and then pushing.

johnhaley81
  • 1,153
  • 10
  • 14
1

I had this issue tonight. The process kinda threw me off at first compared to Tower.

You have to type the remote name, following by the branch you're pushing. So for me, the text I entered was:

"origin/master"

The help dialog isn't very clear, but I'm sure this is obvious to git vets ;)

Gurnzbot
  • 3,742
  • 7
  • 36
  • 55
1

TL;DR: In GitLab, you can change the "Protected Branches" settings of the affected project to allow developers to push to master.

I've had a similar issue where a new user seemingly could not push to master (although GitKraken reported a successful push). It turned out that the user had the GitLab developer role assigned, and by default the developer role is not allowed to push to the master branch on GitLab repositories.

Fabian Kleiser
  • 2,988
  • 3
  • 27
  • 44
-1

I've never used Gitkraken. Try to follow the commandline instructions to create the branch in the remote repository.

ElpieKay
  • 27,194
  • 6
  • 32
  • 53
  • 3
    If you've never used GitKraken then why answer a question based on it? – Phillip Elm Aug 04 '16 at 16:40
  • @PhillipElm All roads lead to Rome. This is a question with a tag `git`. Git commands are the most straightforward, and can do everything about git that a GUI tool can or cannot. I've never used any GUI but I know Gitkraken gives some command-line instructions to help do something. – ElpieKay Aug 04 '16 at 21:31
  • 2
    Perhaps, but your answer is basically "idk, RTFM", which surely doesn't help. At most it should be a comment... – Phillip Elm Aug 04 '16 at 23:36
  • 1
    @PhillipElm thank you very much for your helpful judgement and really very sorry for its surely not helping you. – ElpieKay Aug 04 '16 at 23:39