Say I have a repo called repo1
Within this repo i have 5 revisions, with A being the most recent
A B C D E
Say I have a workspace with files at revision B but for some reason git thinks I'm at revision C.
I am interested in pulling down the git metadata so that my workspace is in the correct state(e.g git thinks i have revision B) but I do not want the files
My first idea was to run :
1) git pull -n
2) git reset --mixed B
However , this would fail due to merge conflicts
My second idea is to run :
1) git fetch -n
2) git reset --mixed FETCH_HEAD
3) git reset --mixed revision B
Is this the best solution ?
Thanks for your help.