Skip to content

Instantly share code, notes, and snippets.

@madsonic
Created August 16, 2019 06:16
Show Gist options
  • Select an option

  • Save madsonic/9d4e0474e312932efca43290a7935170 to your computer and use it in GitHub Desktop.

Select an option

Save madsonic/9d4e0474e312932efca43290a7935170 to your computer and use it in GitHub Desktop.
gitfu
# list of commands useful for scripting
# there are other shorter but gives less precise command mainly for human consumption
# rather than scripts. those commands are not the focus of this gist
# accidentally tracking a large repo via git fetch
# and to stop tracking unused remote branches
git br -d -r <branch-name>
# to remove everything in one command
git br -r | xargs git br -d -r
# show current br
git rev-parse --abbrev-ref HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment