简体   繁体   中英

Github for Windows puts repo in “rebasing” state, but says “failed to sync this branch”

Sometimes when I press the Sync button on Github for Windows, it tells me:

Failed to sync this branch
You might need to open a shell and debug the state of this repo

I then go to the console and enter a git status . Most of the time when this happens, git status tells me the following info:

> git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
  (use "git push" to publish your local commits)

You are currently rebasing.
  (all conflicts fixed: run "git rebase --continue")

nothing to commit, working directory clean

If I understand that correctly, then:

  • Github for Windows started a Rebase operation, but did not succeed for whatever reason.
  • The working copy is clean. There are no changed files that could be overwritten by the Sync, and there are no conflicts either.
  • Git tells me to continue the rebase operation once all conflicts are resolved (although in this case, there are no conflicts).

> git rebase --continue

Stray path/to/repo/.git/rebase-apply directory found.

Use "git am --abort" to remove it.

I do that:

> git am --abort

After that, the Rebase operation is finished/aborted, and pressing the Github for Windows' Sync button again successfully pushes the commits.

I'm just wondering, if there are no conflicts, why does the Sync op fail in the first place?

I'm one of the GitHub for Windows developers.

There's a log file that GitHub for Windows generates that will help understand what was occurring at the time of doing the sync:

https://help.github.com/articles/accessing-the-github-for-windows-log

I'd love to see why the rebase is failing, because it looks like it all should be completing judging by the other details...

Sync op fail in the first place?

Because the GUI doesn't want to silently complete the rebase, and wants to make sure the user is aware of said rebase.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM