Getting error while adding intellij project to gitlab

Viewed 55

Did following:

I am getting following error

error: src refspec master does not match any

error: failed to push some refs to 'https://gitlab.com/xxxxxx/tmp.git'

1 Answers

It is probable the remote repository created on GitHub has for main branch the branch main (see GitLab documentation)

  • either you push your local master to main:

      git push -u origin master:main
    
  • or (better) you rename your local branch as main

      git branch -m master main
      git push -u origin main
    
Related