Skip to content

TiagoRueda/GIT_COMANDO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

Descrição Comando
Inicializa o Git git init
Adicionar mudanças git add .
Mudar o nome da branch atual git branch -M main
Commitar mudanças git commit -m "Initial Commit"
Adicionar um repositório remoto git remote add origin https://<repo>.git
Fazer push do commit atual git push -u origin main
Forçar e sobrescrever um commit (cuidado!) git push --force origin main
Apagar histórico history -c && history -w
Criar uma branch git branch branch_new
Alternar de branch git checkout (ou switch) branch_new
Mostrar todos os commits git log
Mostrar todas as branches git branch
Ver alterações antes do commit git status
Ver diferenças nos arquivos antes de adicionar git diff
Clonar um repositório git clone https://<repo>.git
Restaurar um arquivo modificado antes do commit git checkout -- arquivo.txt
Excluir uma branch local git branch -d branch_new
Excluir uma branch remota git push origin --delete branch_name
Fazer um commit sem precisar adicionar (git add .) git commit -am "Mensagem do commit"
Resetar para um commit anterior (cuidado!) git reset --hard <commit_hash>
Baixar atualizações do repositório remoto sem aplicar git fetch
Puxar as últimas atualizações e aplicar no código local git pull origin main

About

Tabela de comandos básicos do Git

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published