Skip to content

Instantly share code, notes, and snippets.

@paulintrognon
Created February 24, 2015 14:28
Show Gist options
  • Save paulintrognon/9bc7db190b93e1c7c4ce to your computer and use it in GitHub Desktop.
Save paulintrognon/9bc7db190b93e1c7c4ce to your computer and use it in GitHub Desktop.
Loop of Git Pushes until it works. Written during a BitBucket outage...
typeset -i i=1 START=$(date +%s); until echo Try Number $i... $(( $(date +%s) - $START ))s elapsed so far; git push 2> /dev/null ; do let i++; sleep 1; done; date; echo Done with $i trials - Took $(( $(date +%s) - $START )) seconds
@paulintrognon
Copy link
Author

Don't forget to change the git push into whatever that needs to be done =)

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