How to "Push It Good" to Git

How to "Push It Good" to Git

Do you get the song "Push It" by Salt-n-Pepa in your head every time you push code to Git? I do. Here's how to push code and automatically begin a 4 minute and 29 second celebration with one command. This works on Mac OSX with Spotify.

Save the following short script in a file. I called mine "pushit". Make sure it's executable and put it in a directory that is in your $PATH.

#!/bin/bash git push origin open spotify:track:0GugYsbXWlfLOgsmtsdxzg

Alternatively, you can put the following line in your ~/.profile:

alias pushit="git push origin; open spotify:track:0GugYsbXWlfLOgsmtsdxzg;"

And remember to:

source ~/.profile

Then, you can push your code to Git and automatically start playing "Push It" in Spotify by typing "pushit" on the command line.

If, for some reason, you'd like to play another song such as Push It by Garbage when you push to git, just find that song in Spotify, right click on it, and copy the Spotify URI. Replace "spotify:track:0GugYsbXWlfLOgsmtsdxzg" in the script above with the URI for your preferred song.

Note that this uses the push.default setting in Git. In order to suppress a warning message, you may want to do:

git config --global push.default simple

on the command line. This setting means that the script will only push your current branch to its matching branch on the origin.

Push it Real Good!

4 Websites You Need to Stop Sharing Link Bait From in 2014

4 Websites You Need to Stop Sharing Link Bait From in 2014

Should you give startup advice? [FLOWCHART]

Should you give startup advice? [FLOWCHART]