Search code examples
windowsgitbitbucketgit-pushtortoisegit

TortoiseGit error: "Remote name must not be empty"


When I try to push using TortoiseGit to Bitbucket for initial source code, I got error:

Remote name must not be empty.

I've used TortoiseGit a lot of time and never got any problem with this error even though I never input any remote name. It happens only when I try to push. I could commit just fine.

How to solve this?

How the error is shown


Solution

  • I solved it myself! I didn't follow the tutorial thoroughly.

    Since this is a new repository, I have to add origin remote name first. If you use command line, this will do:

    git remote add origin https://yourusername@bitbucket.org/yourteam/yourrepo.git
    

    If you want to do it in TortoiseGit, do this instead:

    1. Click manage on the right of dropdown remote name choices
    2. Add a remote name origin with URL https://yourusername@bitbucket.org/yourteam/yourrepo.git
    3. Choose it as a remote name then push!