Question

I committed a change in my file and want to sync it. I am using the Windows Github user interface and I am new to this. The sync button does not show up. How can I do this with a shell command?

enter image description here

Was it helpful?

Solution

If you look at the screenshot, near the top it says detached head. Although rather unpleasant sounding, this just means that you're not on a branch but rather having a commit checked out.

Looking at one of your comments, it says rebasing master. Looks to me like a rebase was started, but never finished. If you haven't touched the command line, this sounds like a bug in GitHub for Windows, and I'd report it to GitHub support. It should still be possible to clean this up though.

If you type git status in the command line, you should get something like this (this is on Linux, it may look slightly different on Windows):

[~/dev/cost_model] git status
# Not currently on any branch.
# You are currently rebasing branch 'master' on '174ffcb'.
#   (fix conflicts and then run "git rebase --continue")
#   (use "git rebase --skip" to skip this patch)
#   (use "git rebase --abort" to check out the original branch)
#
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#   modified:   some/path/to/a/file
#
# Unmerged paths:
#   (use "git reset HEAD <file>..." to unstage)
#   (use "git add <file>..." to mark resolution)
#
#   both modified:      some/other/path/to/a/file
#

The files under "Changes to be committed" are fine, and were rebased just fine. If you have any files under "unmerged paths", though, you should open them and check for merge conflicts (they are sections of the code that begin with "<<<<<<<" or something similar, just open the file and make sure the file ends up looking like you want it to).

Once you've resolved all conflicts, run git rebase --continue. Check the message that appears, there may still be conflicts.

Another option is to run git rebase --abort to stop the rebase if you didn't want it to finish.

Once you're done, you should be back on your branch and be able to sync.

OTHER TIPS

Try: git push origin {branch_name}

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top