Search code examples
windowsgitgithubrepository

GitHub "Failed to publish this branch" error on Windows


I'm new to Git, and I just downloaded it yesterday. As a test for my first online (not local) repository, I committed a useless text file and then hit publish. After a short while, I got this very non-descriptive error:

Enter image description here

So I know that I can't publish to this branch. There's only one and it's the master branch. Is there any further information on what might be causing this error?

As a side note, my partner has successfully uploaded files to the same repository, but I haven't gotten any sort of indication that this has happened. Does this mean I'm not connected to the repository properly in some way? I was the one who set it up!


Solution

  • In Windows, right click on your repository → click on Open a shell here.

    You will see a command prompt.

    Type git push in it. (been aware after seeing SimonBoudrias comment)

    The command prompt will suggest you to type some other command or shows an error.

    If the command prompt suggest you to type something else, then type that. It will work.
    If the command prompt shows an error, then please post the detailed error here.

    Information: You might want to check this app