As a junior git user, I got overwhelmed by a tough merge and must have done something wrong. I ended up committing my conflict resolutions with a whole mess of garbage inside my source files. The commit shows additions of many lines which look like <<<<<<< HEAD
and >>>>>>> a7b4de79431c2e73d28621c72c8d14820df1a24b
. The commit has been pushed to remote origin already so I unfortunately can't just ammend the commit.
I want to rewind the remote repository to the last good commit, 4a3ba7b0e56cf0be80274c1f879029220a889bde
and (if possible) destroy the bad commit d004651972cbc35f70ee5a2145b6e03169c77279
.
I tried:
git checkout 4a3ba7
git push -f
and got: fatal: You are not currently on a branch.