How to revert multiple git commits?

Expanding what I wrote in a comment The general rule is that you should not rewrite (change) history that you have published, because somebody might have based their work on it. If you rewrite (change) history, you would make problems with merging their changes and with updating for them. So the solution is to create … Read more

How to revert multiple git commits?

Expanding what I wrote in a comment The general rule is that you should not rewrite (change) history that you have published, because somebody might have based their work on it. If you rewrite (change) history, you would make problems with merging their changes and with updating for them. So the solution is to create … Read more

How do I use ‘git reset –hard HEAD’ to revert to a previous commit? [duplicate]

First, it’s always worth noting that git reset –hard is a potentially dangerous command, since it throws away all your uncommitted changes. For safety, you should always check that the output of git status is clean (that is, empty) before using it. Initially you say the following: So I know that Git tracks changes I make to my application, … Read more