What's your most used shortcut?

Fábio Guerreiro - Dec 7 '20 - - Dev Community

As I’m writing this article, I just finished adding two new commands alias to my git config file :

  • git config --global alias.list-old-branches "!git branch -vv | grep 'origin/.*: gone]' | awk '{print $1}'" - to list all the branches that exist on my local repository but have been deleted from remote
  • git config --global alias.clean-old-branches "!git list-old-branches | xargs git branch -D" - to pick the list of branches returned by the previous command and delete them from my local repository

And then it made me think 'How can we improve our productivity with more of these shortcuts? 🤔'

Alt Text

I hope that each one of us has one or more shortcuts added either to our terminal/VSCode/git. So I decided to write this article for it to work as a centralized repository of shortcuts that can easily be shared among us.

It's not convenient to go through the whole history of 'that'-hot-tips channel. Or having to go through individual SO questions, to look for that VSCode shortcut that allows you to run all the tests from a single file.

Hope this article helps everyone, from an experienced programmer to a newbie! And please, add your own shortcuts in the comments.

Take care, BEAR hugs ฅʕ•ᴥ•ʔฅ

. . . . . . . . . . . . . . . . . . . . . . . . . . . .