Skip to content

Instantly share code, notes, and snippets.

@wbbradley
Last active December 21, 2015 01:09
Show Gist options
  • Save wbbradley/6225922 to your computer and use it in GitHub Desktop.
Save wbbradley/6225922 to your computer and use it in GitHub Desktop.
push-o-matic

Push-o-matic

Want to work locally on your web site but have your changes periodically (like every minute) updated on Heroku?

#!/bin/bash

while [ true ]
do
	echo "Pushing recent changes to Heroku..."
	# optional: git add .
	git commit -am 'wip'
	git push -f heroku master
	echo "Waiting a minute..."
	sleep 60
done

When you're done editing files, and you want to update your GitHub repository:

git rebase -i origin/master
# squash all the commits

git push origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment