Mariano Grandioso
Mariano Grandioso

Reputation: 1205

Github failed to sync branch

I'm using W7 64 bi , and just got an error from the github client app. It says:

failed to sync branch. you might need to open a shell and debug the state of this repo.

What do I do now ?

Upvotes: 11

Views: 18365

Answers (3)

ccoutinho
ccoutinho

Reputation: 4596

I had this error before, and I fixed it by reinserting the credentials for my github account. Turns out that github logged me out for some reason

Upvotes: 0

Dylan Knowles
Dylan Knowles

Reputation: 23

You might have a more complex problem than my answer can solve, but -- for anyone else who comes across this question -- some basic solutions can be found in this video. In short, status.github.com, git status, and gitstatus are your friends. See what they tell you and then continue your sleuthing with that new information in mind. You can use these tools using Git Shell that comes with the Github Windows client.

I'll note that my own problem stemmed from trying to sync a file that was too large: I only found this by using the Git Shell, which gave me the error when I tried git sync. I'm currently looking for ways to remove the file in question in previous commits so I can sync my repo appropriately. The guide I am currently following can be found here, and if it seems to be taking me in the right direction (it was actually recommended in the Git Shell error message!)

Upvotes: 1

Brian Chavez
Brian Chavez

Reputation: 8593

I know this will sound crazy, but try restarting your computer.

This happend to me yesterday; I was getting this error, and upon checking: \AppData\Local\GitHub\TheLog.txt

I found messages like:

AppData\Local\GitHub\PortableGit_ca477551eeb4aea0e4ae9fcd3358bd96720bb5c8\bin\sh.exe:
*** Couldn't reserve space for cygwin's heap, Win32 error 0

The problem comes around to GitHub for Windows updating itself (in particular the cygwin-ized PortableGit) in the background while I was using it. Ultimately, some cygwin dlls from the previous PortableGit dlls were still loaded in memory causing errors when trying to execute the new (updated) PortableGit commands.

Restarting cleared out all the previously loaded cygwin dlls.

Upvotes: 6

Related Questions