dfdfdfgdfd

segunda-feira, 29 de abril de 2013

Reverter modificação de arquivo no Git

Se o comando "git status", tiver como resultado algo semelhante ao quadro a seguir:

$ git status
# On branch master
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#       modified:   javaee5/seam-jboss5-exemplo/pom.xml
#

Use o comando "git checkout -- (file path)" para descartar mudanças.

$ git checkout -- javaee5/seam-jboss5-exemplo/pom.xml

Pronto arquivo restaurado! :)

Nenhum comentário:

Postar um comentário