Oral  Brekke

Oral Brekke


1 Minute To Become A Better Developer (#9)

Don’t lose your aliases again when switching computers!

Welcome to issue #9 of One Minute Better Developer, where you become a more successful software developer by reading short nuggets of knowledge, one minute at a time.

 🔛 ⏭️

Art by my buddy  Loor Nicolas


You get a new computer, you back up all your files but…

OH! you forgot to back up your ~/.bashrc or ~/.zshrc where all your custom aliases and functions live! Now you need to start over with them…


To save you this headache, I’m sharing my super-useful custom alias for updating my shell config that does the following:

  1. Opens your shell config file.
  2. Saves a copy of the updated file on a secret Github Gist.
  3. Refreshes your shell session so you can use the updated command right away.

Let’s set it up.

_This tutorial assumes you’re using _ zsh . If your are using bash , just replace _zsh_ and _.zshrc_ by _bash_ and _.bashrc_ in the next commands. You can find out which shell you’re using by running _echo $0_ .

  1. Let’s create a secret gist where our config will be saved:

Creating a secret  Gist.

#github #unix #command-line #github-gist #tips-and-tricks

1 Minute To Become A Better Developer (#9)