Skip to content

Instantly share code, notes, and snippets.

@flyfy1
Last active June 6, 2017 14:36
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 flyfy1/7dec8e00f47bb696e53a92d8619d266c to your computer and use it in GitHub Desktop.
Save flyfy1/7dec8e00f47bb696e53a92d8619d266c to your computer and use it in GitHub Desktop.
Collection of quick notes.. in bash
# Git Remove Merged Branch
git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d
# Git List branch, with commit id and message, ordered by last commit date
git for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'
# Remote the deleted branch in the remote `origin`
git remote prune origin
# Branch Description
git branch --edit-description
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment