Guia Rápido Git
Referência categorizada de comandos Git com descrições e exemplos.
Setup & Config
git initInitialize a new repository
git clone <url>Clone a repository
Exemplo: git clone https://github.com/user/repo.git
git config --global user.name <name>Set global username
Exemplo: git config --global user.name "John Doe"
git config --global user.email <email>Set global email
Exemplo: git config --global user.email "john@example.com"
git config --listList all config settings
Basic Snapshotting
git statusShow working tree status
git add <file>Stage a file
Exemplo: git add index.html
git add .Stage all changes
git commit -m <msg>Commit staged changes
Exemplo: git commit -m "Add feature"
git commit --amendAmend the last commit
git diffShow unstaged changes
git diff --stagedShow staged changes
git reset <file>Unstage a file
git rm <file>Remove a file from tracking
git mv <old> <new>Rename/move a file
Branching & Merging
git branchList branches
git branch <name>Create a new branch
Exemplo: git branch feature/login
git branch -d <name>Delete a branch
git checkout <branch>Switch to branch
git checkout -b <branch>Create and switch to branch
git switch <branch>Switch to branch (modern)
git switch -c <branch>Create and switch (modern)
git merge <branch>Merge branch into current
git rebase <branch>Rebase current onto branch
git cherry-pick <hash>Apply a specific commit
Remote
git remote -vList remotes with URLs
git remote add <name> <url>Add a remote
Exemplo: git remote add origin https://github.com/user/repo.git
git fetchDownload remote changes
git pullFetch and merge remote changes
git pushPush commits to remote
git push -u origin <branch>Push and set upstream
git push --forceForce push (use with caution!)
History & Inspection
git logShow commit history
git log --onelineCompact log
git log --graphShow branch graph
git show <hash>Show commit details
git blame <file>Show who changed each line
git reflogShow reference log
Stashing
git stashStash current changes
git stash popApply and remove latest stash
git stash listList all stashes
git stash applyApply latest stash (keep it)
git stash dropRemove latest stash
git stash clearRemove all stashes
Undoing Changes
git restore <file>Discard working directory changes
git restore --staged <file>Unstage a file
git reset --soft HEAD~1Undo last commit, keep changes staged
git reset --mixed HEAD~1Undo last commit, keep changes unstaged
git reset --hard HEAD~1Undo last commit, discard changes
git revert <hash>Create a commit that undoes a commit
Tags
git tagList tags
git tag <name>Create lightweight tag
Exemplo: git tag v1.0.0
git tag -a <name> -m <msg>Create annotated tag
git push --tagsPush all tags to remote
O que é?
Guia R\u00e1pido Git é uma ferramenta online gratuita que roda inteiramente no seu navegador. Refer\u00eancia categorizada de comandos Git com descri\u00e7\u00f5es e exemplos. Nenhum dado é enviado para servidores — todo o processamento acontece localmente no seu dispositivo, garantindo total privacidade e segurança. Seja você um desenvolvedor, designer, estudante ou profissional, esta ferramenta economiza tempo ao fornecer resultados instantâneos sem necessidade de instalar software ou criar conta.
Como usar
Usar o Guia R\u00e1pido Git é simples e direto. Basta inserir ou colar seus dados no campo de entrada, configurar as opções disponíveis e clicar no botão de ação para processar. O resultado aparece instantaneamente na área de saída. Você pode copiar o resultado para a área de transferência com um clique. Se precisar recomeçar, basta limpar a entrada e tentar novamente. A ferramenta aceita uma ampla variedade de entradas e lida com casos especiais de forma adequada.
Quando usar
Guia R\u00e1pido Git é útil em muitos cenários do dia a dia. Desenvolvedores usam durante sessões de codificação para processar dados rapidamente sem sair do navegador. Também é perfeito para tarefas pontuais onde instalar um aplicativo dedicado seria exagero. Estudantes e aprendizes acham útil para entender como o processo subjacente funciona. Como é baseado na web, você pode usar de qualquer dispositivo — desktop, laptop, tablet ou celular — sem nenhuma configuração.