Skip to content

Instantly share code, notes, and snippets.

@BondAnthony
Last active October 7, 2023 07:48
Show Gist options
  • Save BondAnthony/232ae496ab5aa0858ec14a425542d199 to your computer and use it in GitHub Desktop.
Save BondAnthony/232ae496ab5aa0858ec14a425542d199 to your computer and use it in GitHub Desktop.
Git!

Helpful Git Commands

Git log in a pretty format

git log --graph --decorate --pretty=oneline --abbrev-commit

Clean up merged branches from local

git fetch -p && for branch in `git branch -vv | grep ': gone]' | awk '{print $1}'`; do echo "Delete: ${branch}"; git branch -D ${branch}; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment