Pergunta

This could be a very simple question. I commited my work, then I launched a find and replace script but I want to undo it, so to let my work go down to the actual commit. What is the right command to do that : I know about git reset soft/hard or git amend but it is not appropriate

Foi útil?

Solução

You have a couple of options:

As the comments state git reset --hard will bring everything back.

But if you want to keep some of the files modified then doing:

git checkout -- <filename>

Will undo individual files.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top