Yes, you've got half of the answer! You should reset the tfs/default
to a previous step and fetch. There is no way to do that in git (if I know well) because that's not a normal case but we could still do that by editing git files... it's easy!
If you are sure that you don't want to keep the B
and C
commits (otherwise save them temporary by creating a local branch), just do the following:
- Go into your
.git
folder and look for the file/refs/remotes/tfs/default
- edit the file and replace the sha in the file with the sha of commit
A
- fetch from tfs
And that should be good!
edit: can also be done with command line git update-ref tfs/default SHAofcommitA