Revert a particular git commit

Assume that you commit a change, pushed and there is also a merge commit. Now you want to revert that particular commit. Do the following

> git revert <that_particular_merge_hash> -m 1

This automatically creates a commit with the reverted changes. Now push again.

Comments

Popular posts from this blog

Programatically create layout builder section in Drupal

Set up Drupal7 to Drupal8 migration in simple steps (using Drush)

ClamAV in MAC