Hidden
Hidden

Reputation: 3628

Pushing fails - Empty repository at remote server with GitKraken

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:

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

Upvotes: 7

Views: 5391

Answers (5)

Fabian Kleiser
Fabian Kleiser

Reputation: 3008

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.

Upvotes: 1

Gurnzbot
Gurnzbot

Reputation: 4132

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 ;)

Upvotes: 1

ElpieKay
ElpieKay

Reputation: 30868

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

Upvotes: -1

dubes
dubes

Reputation: 5524

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.

Upvotes: 4

johnhaley81
johnhaley81

Reputation: 1193

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

Upvotes: 1

Related Questions