-2

So I'm doing a Visual Studio asp.net project for school, and so when I try to sync, I get the error:

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

This is another attempt as I had deleted my previous solution and started over since my previous commits had warning symbols in them. I then did the git command git reset --hard HEAD~<number> all the way to the commit I left off from when I previously started my project.

So after my sync error, it generates a commit I previously deleted with 300+ files. And then that commit even gets an error. I'm not too sure what is going on as I am still very new to GitHub.

gunr2171
  • 16,104
  • 25
  • 61
  • 88
James
  • 300
  • 1
  • 4
  • 11

1 Answers1

0

Try to git reset --hard HEAD~<number> then do git checkout . it's a little unclear in the question, but this is what I think is happening: Your local branch's HEAD is reset to a past commit, but the content isn't changed only the commit history. So if you want to sync your local commit history with your remote branch. You need to first clear your changes (which appear because you reset)

Allen Huang
  • 394
  • 2
  • 14