1

I try to revert a commit on Github Desktop. There was conflicts so I deleted the whole project and cloned it again to have a completely fresh clone.

Still after I reverted the commit I get things like ">>> HEAD". Why can't it just go back to previous commit?

I've made an animated gif of what I do:

enter image description here

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Jens Törnell
  • 23,180
  • 45
  • 124
  • 206

2 Answers2

1

You are reverting—i.e., asking Git to undo—the changes from a commit that is not the most recent commit.

If you intend to revert to that commit, i.e., to undo the changes that came after that commit, you should revert the subsequent commit.

See also How to revert Git repository to a previous commit?

torek
  • 448,244
  • 59
  • 642
  • 775
1

You seem to be misunderstanding GIT,

Still after I reverted the commit I get things like ">>> HEAD". Why can't it just go back to previous commit?

What you mean: Lets go back 1 entry in the revision history

What you try to do: Revert changes from the 2th revision change

You should revert the top commit, that way you go back 1 version in time.

Ferrybig
  • 18,194
  • 6
  • 57
  • 79