How do I reverse a specific commit from master?

Asked

Viewed 551 times

0

I need to reverse a specific commit that is remote. How do I do this?

1 answer

0

First check that git push --force is active in your repository.

Find the commit hash by following these steps:

Access the Repository

Acesse o Repositório

Take the Commit

inserir a descrição da imagem aqui

Copy the HASH and replace in the command below

inserir a descrição da imagem aqui

Then run the following commands:

git reset --hard HASH_DO_COMMIT_QUE_QUER_VOLTAR

git push --force

git reset will return to your pro hash branch you passed.

git push --force will push this hash, overwriting the current one in git.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.