Using gists like git repositories

In the past couple of years I’ve been using gist to take notes and stash around small utility scripts I’ve had to run once in a while.

For all of this time, though, I didn’t really take advantage of the fact that each gist is an actual git repo, which gives you a lot of flexibility the online interface doesn’t bring to the table.

Once you create a gist, you can simply note down its id and clone it locally:

1
git clone [email protected]:YOUR_GIST_ID.git that-infamous-script

and after applying your changes and committing, you can simply push the changes to the gist (with a good old fashioned git push origin master) and you will see them at https://gist.github.com/YOUR_USERNAME/YOUR_GIST_ID.

Never underestimate the power of gists!


Hi there! I recently wrote an ebook on web application security, currently sold on leanpub, the Amazon Kindle store and gumroad.

It contains 160+ pages of content dedicated to securing web applications and improving your security awareness when building web apps, with chapters ranging from explaining how to secure HTTP cookies with the right flags to understanding why it is important to consider joining a bug bounty program.

Feel free to skim through some of the free chapters published on this blog and, if the content seems interesting enough to you, grab a copy on leanpub, the Amazon Kindle store, gumroad or simply checkout right down below!

Buy the Web Application Security ebook for $6.99

In the mood for some more reading?

...or check the archives.