Skip to content

Instantly share code, notes, and snippets.

@lucenarenato
Created November 7, 2024 17:06
Show Gist options
  • Save lucenarenato/388c8586a76244b6c1a8836fe829ed34 to your computer and use it in GitHub Desktop.
Save lucenarenato/388c8586a76244b6c1a8836fe829ed34 to your computer and use it in GitHub Desktop.
Listar commits, git discard local changes and pull

Listar commits:

git log --pretty=oneline
git log --pretty=format:"%h - %an, %ar : %s"

Ir para um commit específico:

git reset --hard 33145a2d8e2d767ec7a8e04d46e2926883c02d99

git discard local changes and pull

git fetch --all 
git reset --hard 
git pull origin <your_branch>
git stash save --keep-index --include-untracked   

Apagar arquivos que não monitorados:

git clean -df

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment