Created
October 31, 2018 21:00
-
-
Save andersonmadeira/881e4b96d6c4a2c8e7d53c025143f5e5 to your computer and use it in GitHub Desktop.
Usando patches no GIT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Pra criar um arquivo patch do HEAD até 10 commits atrás: | |
git format-patch -10 HEAD --stdout > 0001-ultimos-10-commits.patch | |
# Pra applicar o patch: | |
git apply --stat file.patch # Mostra o status | |
git apply --check file.patch # Checa por erros antes de aplicar | |
git am < file.patch # Aplica o patch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment