Skip to content

Instantly share code, notes, and snippets.

@disouzam
Last active October 29, 2023 23:01
Show Gist options
  • Save disouzam/199e15f8b94f10c69c46cade8c9acb3e to your computer and use it in GitHub Desktop.
Save disouzam/199e15f8b94f10c69c46cade8c9acb3e to your computer and use it in GitHub Desktop.
Bash configuration
alias cls=clear
alias dangcom='git fsck --no-progress --no-reflogs | grep '\''dangling commit'\'''
# alias dangcom='gitk --all --date-order '$(git fsck --no-progress --no-reflogs | \grep 'dangling commit' | \gawk '{printf $3; printf " "}')''
alias uptag='git show-ref --tags -s -d | grep 'refs' > list-of-tags.txt'
@disouzam
Copy link
Author

The drawback of this alias is that it gets expanded on shell starts - so, if a new dangling commit was created after the shell started, a new shell must be opened to get the full list of dangling commits.

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