| 1 | git init | Inicializa um novo repositório Git local | git init |
| 2 | git config --global user.name | Configura o nome do autor para os commits | git config --global user.name "Seu Nome" |
| 3 | git config --global user.email | Configura o e-mail do autor | git config --global user.email "email@ex.com" |
| 4 | git config --list | Lista todas as configurações atuais | git config --list |
| 5 | git status | Mostra o estado dos arquivos (untracked, modified) | git status |
| 6 | git add . | Adiciona todos os arquivos modificados ao Stage | git add . |
| 7 | git add [arquivo] | Adiciona um arquivo específico ao Stage | git add index.html |
| 8 | git commit -m "[msg]" | Grava as alterações do Stage no repositório | git commit -m "feat: novo login" |
| 9 | git commit --amend | Altera a mensagem do último commit realizado | git commit --amend -m "correção" |
| 10 | git log | Exibe o histórico de commits | git log --oneline |
| 11 | git log -p | Mostra o histórico com as mudanças no código | git log -p |
| 12 | git diff | Mostra diferenças entre o diretório e o Stage | git diff |
| 13 | git diff --staged | Mostra diferenças entre o Stage e o repositório | git diff --staged |
| 14 | git show [commit] | Exibe detalhes de um commit específico | git show a1b2c3d |
| 15 | git branch | Lista as branches locais | git branch |
| 16 | git branch [nome] | Cria uma nova branch | git branch feature-x |
| 17 | git checkout [branch] | Muda para uma branch específica | git checkout develop |
| 18 | git checkout -b [nome] | Cria uma nova branch e já muda para ela | git checkout -b hotfix-1 |
| 19 | git merge [branch] | Mescla a branch especificada na branch atual | git merge feature-x |
| 20 | git branch -d [nome] | Exclui uma branch local | git branch -d feature-x |
| 21 | git switch [nome] | Comando moderno para trocar de branch | git switch main |
| 22 | git clone [url] | Clona um repositório existente para sua máquina | git clone https://url.git |
| 23 | git remote add origin | Conecta seu repositório local a um servidor remoto | git remote add origin https://... |
| 24 | git remote -v | Lista os repositórios remotos conectados | git remote -v |
| 25 | git fetch | Baixa o histórico do remoto sem mesclar nada | git fetch origin |
| 26 | git pull | Baixa e mescla as mudanças do remoto no local | git pull origin main |
| 27 | git push | Envia seus commits locais para o servidor remoto | git push origin main |
| 28 | git push -u origin [b] | Envia e define a branch como upstream padrão | git push -u origin feature |
| 29 | git reset [arquivo] | Remove um arquivo do Stage, mas mantém o código | git reset README.md |
| 30 | git reset --hard [commit] | Reseta tudo para um commit anterior (apaga código) | git reset --hard HEAD~1 |
| 31 | git revert [commit] | Cria um novo commit que desfaz as mudanças de outro | git revert a1b2c3d |
| 32 | git checkout -- [arquivo] | Descarta mudanças locais em um arquivo | git checkout -- style.css |
| 33 | git clean -f | Remove arquivos não rastreados do diretório | git clean -f |
| 34 | git stash | Guarda mudanças não commitadas temporariamente | git stash |
| 35 | git stash pop | Recupera e aplica as mudanças guardadas no stash | git stash pop |
| 36 | git stash list | Lista todos os stashes armazenados | git stash list |
| 37 | git stash drop | Descarta o stash mais recente | git stash drop |
| 38 | git rebase [branch] | Reaplica commits em cima de outra branch | git rebase main |
| 39 | git cherry-pick [commit] | Copia um commit específico para a branch atual | git cherry-pick e4f5g6 |
| 40 | git tag [nome] | Cria uma tag (versão) para o commit atual | git tag v1.0.0 |
| 41 | git blame [arquivo] | Mostra quem alterou cada linha de um arquivo | git blame app.py |
| 42 | git archive | Cria um arquivo zip/tar do repositório | git archive --format=zip HEAD |