DEV Community

Discussion on: Aliases: Making the command line your friend

Collapse
 
joekaiser profile image
Joe • Edited

This one formats the git log to be more concise: ls = git log --pretty=format:"%ci\\ %C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate

2019-11-08 15:41:44 -0800 de01370 add dev warning to admin config [Joe Kaiser]
2019-11-07 15:36:34 -0800 eab0f32 sort configItems after search [Joe Kaiser]
2019-11-06 22:18:59 -0800 ea7cf65 new/delete config items [Joe Kaiser]
2019-11-06 21:29:29 -0800 aafafb2 admins can update config items [Joe Kaiser]
2019-11-05 17:29:16 -0800 a21a51e admin user pages [Joe Kaiser]

Delete all branches that were once part of origin, but are no longere there. Any local branches you have made but not pushed will be safe. prune-branches = git remote prune origin && git branch -vv | grep ': gone]' | awk '{print $1}' | xargs -r git branch -D

$> git prune-branches
Pruning origin
 * [pruned] origin/emailTrack
 * [pruned] origin/failedPause
 * [pruned] origin/fullheight
 * [pruned] origin/inboxui