Last active
October 12, 2018 04:00
-
-
Save robsonfaxas/ea6a6211e5cea655eefd7c2a87f0dcdc to your computer and use it in GitHub Desktop.
#git - 4 - Trabalhando com commits
This file contains hidden or 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
-- Ver mudanças que um commit fez, a partir de uma tag | |
git show g5h736774fhbb88fdb3vd829eb | |
-- Ver modificações feitas nos arquivos atuais, antes de commitar | |
git diff | |
-- Ver apenas os nomes dos arquivos alterados, antes de commitar | |
git diff --name-only | |
-- commitar todos os arquivos modificados (All Modified) | |
git commit -am "Arquivo ReadMe.txt alterado" | |
-- Enviar todos os arquivos para staged | |
git add . | |
-- voltar atrás uma alteração, antes de ir para staged | |
git checkout Readme.txt | |
-- voltar atrás arquivos enviados para staged | |
git reset HEAD Readme.txt | |
-- voltar atrás um commit, com os arquivos em staged | |
git reset --soft g5h736774fhbb88fdb3vd829eb | |
-- voltar atrás um commit, com os arquivos modified | |
git reset --mixed g5h736774fhbb88fdb3vd829eb | |
-- voltar atrás um commit, desprezando todas as alterações | |
git reset --hard g5h736774fhbb88fdb3vd829eb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment