I want to undo all my local changes and update my local machine with the code from git repository.
I have tried resetting the local branch by running the following commands:
git checkout
git reset
When I run git checkout
on local machine, it says:
Your branch and 'origin/my-dev-environment' have diverged, and have 1 and 26 different commits each, respectively. (use "git pull" to merge the remote branch into yours)
If I try git pull
, it would complain about conflicts:
CONFLICT (content): Merge conflict in template/myfile.cs Auto-merging pages/somefile.html
How can I clear all changes from my local repository and just get a copy of upsteam repository?