0

After some complications with subdirectories which my system administrator finally fixed manually on server. Since then there were some unmerged/untracked errors and conflicts which I tried to fix. But different errors always appear. Latest status is when ever I pull repository it is aborting it in the end.

Long story short... I want my local repository to be totally clean of all my changes and and all local files and directories to be updated to current server status. How to make it?

Arma Sarma
  • 189
  • 1
  • 2
  • 8
  • 1
    Take a look at [this answer](http://stackoverflow.com/questions/673407/how-do-i-clear-my-local-working-directory-in-git/675797#675797) to a very similar question. – adamdunson Sep 19 '13 at 16:56
  • It is not exactly. I already did git checkout and git reset --hard and git clean... And all the time there is some error or conflicts and I totally lost track with trying to solve those unmarged files. So I want to totally to drop all changes and to to pull server and make it identical to server like,like it is just initialized – Arma Sarma Sep 19 '13 at 18:06
  • Please update your question with the output of `git status` and examples of the errors that you're seeing. – adamdunson Sep 19 '13 at 18:41
  • 1
    Worst case scenario: is there a reason you cannot delete your local copy of the repo and re-clone? – adamdunson Sep 19 '13 at 18:42
  • This was also what I was thinking about. Just how to make it on server side? When I do 'git remote add --track master [new repo]' it says 'remote origin already exist'... What are things what I should to do reclone properly without having some conflicts? – Arma Sarma Sep 19 '13 at 19:11

1 Answers1

0

If you want to delete your old repo and make a new clone, you need to use the git clone command, not git remote add:

# Delete old repo
rm -rf <path to old repo>

# Clone new repo
git clone <url to remote repo>
Community
  • 1
  • 1