0

Firstly I'd like to say I'm sorry to ask this kind of question, but I've been researching to the past hour on how to do this without success (maybe there is no way?)

I know how to revert a file or a folder to a previous commit, but my issue here is that I want to revert all files that were committed on a specific commit.

Is there?

Kind regards and thanks in advance

edit -

Silly me, I knew there was an easy way to do that. git revert was what I needed. Just misunderstood how it worked.

Community
  • 1
  • 1
Uriel Bertoche
  • 883
  • 2
  • 13
  • 23
  • You might want to read through all the answers in https://stackoverflow.com/q/4114095/1256452. The tricky parts are whether you want to revert some specific change or changes, or revert *to* some specific *version*, and how you want this to show up in the final commit graph. – torek Aug 09 '18 at 18:01
  • 1
    Possible duplicate of [How to revert a Git repository to a previous commit](https://stackoverflow.com/questions/4114095/how-to-revert-a-git-repository-to-a-previous-commit) – mkrieger1 Aug 09 '18 at 18:53

1 Answers1

1

Looks like what you need is to rever the problematic commit altogether. use git revert then, it will create a new commit with exactly opposite changes to the selected one,

Dmitrii Smirnov
  • 7,073
  • 1
  • 19
  • 29