Skip to content

Instantly share code, notes, and snippets.

@yrevar
Created March 17, 2016 19:51
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Backup your bashrc on gist with a very simple command. It preserves the gist url and updates the same file you backed up on gist before.
# Target OS: Linux/Mac
# Prerequisites: Make sure you have installed and setup gist (https://github.com/defunkt/gist), and modified bashrc path as per your own setup which in my case was $HOME/.bash_profile.
gist -u $(cat $HOME/.bashrc_gisturl) -c -p -f "my_last_bashrc" -d "`date`" $HOME/.bash_profile > $HOME/.bashrc_gisturl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment