DEV Community

Discussion on: What are your UNIX pipeline commands that saved you from lot of coding/time?

Collapse
 
clawfire profile image
Thibault Milan

I know it's about pipe commande but since I saw some other interesting elements without pipe in it, I want to share some of them that help me daily. Hope you don't mind.

I have multiple aliases in my .aliases but some also in my .gitconfig more specific to git.
My favorite one is :

[alias]
        # Remove branches that have already been merged with master
    # a.k.a. ‘delete merged’
    dm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"
        # List contributors with number of commits
    contributors = shortlog --summary --numbered
        # pull repository, rebasing, by auto stashing before and restore after and prune"
        up = "pull --rebase --autostash --prune"

You can find more of them into my .dotfiles repo on github