Skip to content

Instantly share code, notes, and snippets.

@bengarrett
Last active August 22, 2020 03:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bengarrett/5b66a3a44ec94ddb02c6f080365799aa to your computer and use it in GitHub Desktop.
Save bengarrett/5b66a3a44ec94ddb02c6f080365799aa to your computer and use it in GitHub Desktop.
Git tips
git branch -vv # branch detailed info

git status -sb # brief status

git reflog # reference log

git fsck --lost-found # orphaned files

git log -- somefile.txt # logs for file, even if long deleted

git fetch --tags -f # fixes would clobber existing tag

git gc --auto # git gc --auto

git count-objects -v -H # size of repo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment