Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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) repo, 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. Does anyone have any further information on what might be causing this error?

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

like image 384
user1706538 Avatar asked Dec 15 '12 17:12

user1706538


2 Answers

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 error then please post the detailed error here.

Info: You might want to check this app

like image 106
Mr_Green Avatar answered Oct 26 '22 15:10

Mr_Green


Open a shell in your repository. Then type

git push --set-upstream origin master --force 

This will upload your local repo to the server no matter what, overwriting if necessary. This should only be done if you're sure nobody else is publishing to your repo at the moment.

like image 42
Nallebeorn Avatar answered Oct 26 '22 17:10

Nallebeorn