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
git status |
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
git commit -m "<mensagem do commit>" | |
# Exemplo | |
git commit -m "Atualização das políticas de usuário" |
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
git push NOME_REPOSITORIO_REMOTO NOME_BRANCH | |
Exemplo: | |
git push origin master |
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
# Exibir endereços remotos vinculados ao repositório | |
git remote -v | |
# Adicionar endereço remoto | |
git remote add NOME_REMOTO ENDERECO_REMOTO | |
# Exemplo: | |
git remote add origin [email protected]:angular/angular.git | |
# Remover endereço remoto |
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
# Listar branchs já usadas no seu repositório local | |
git branch | |
# Listar todas branchs (remoto) | |
git branch --all | |
# Criar uma branch | |
git branch NOME_DA_BRANCH | |
# Exemplo: |
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
# Vai trazer as alterações da branch que você está | |
git pull | |
# Você pode específicar o remoto e a branch que deseja puxar as alterações | |
git pull NOME_REMOTO NOME_BRANCH | |
# Exemplo | |
git pull origin master | |
# Caso tenha alguma divergência de branchs, é possível forçar essa atualização com a flag --force |
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
git merge NOME_DA_BRANCH | |
# Exemplo mergeando as alterações de uma branch (PROD-39218) para a branch master | |
git checkout master | |
git merge feat-new-screen |
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
git merge --abort |
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
git tag NOME_DA_TAG IDENTIFICADOR_DO_COMMIT | |
# Exemplo | |
git tag v1.0 b99adae37b3bdcd9f74fa333e74a11361f85b9ac |
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
git log | |
# Exibir commits em uma versão mais compacta | |
git log --oneline | |
# Exibir commits junto com a linha do tempo | |
git log --graph |