0
$ git fetch
$ git reset --hard HEAD
Checking out files: 100% (1806/1806), done.
HEAD is now at 2f557c9 Upload changes from public server
$ git pull -s recursive -X theirs

give

Auto-merging web/media/images/page-slider/salafitness1.jpg
Automatic merge failed; fix conflicts and then commit the result.

there are many conflicts - how to force restore repository version?

git rebase master
git reset --hard HEAD
git pull

give : Automatic merge failed; fix conflicts and then commit the result.

git fetch origin
git reset --hard origin/master
git clean -f

work fine

Developer
  • 2,731
  • 2
  • 41
  • 71
  • Would you discard all local changes and just reset to the orgin HEAD? Maybe try a rebase before resetting to HEAD?... – zypro Sep 19 '17 at 09:35
  • Duplicate of https://stackoverflow.com/questions/1628088/reset-local-repository-branch-to-be-just-like-remote-repository-head – tymtam Sep 19 '17 at 10:25
  • You posted commands, that don't do what you want. Please, tell us what you want to achieve. – TeWu Sep 19 '17 at 10:35
  • Possible duplicate of [Reset local repository branch to be just like remote repository HEAD](https://stackoverflow.com/questions/1628088/reset-local-repository-branch-to-be-just-like-remote-repository-head) – Developer Sep 19 '17 at 10:41

0 Answers0