Skip to content

Instantly share code, notes, and snippets.

@joelanman
Created June 18, 2015 09:38
Show Gist options
  • Save joelanman/0e6b94bba235370d4fe0 to your computer and use it in GitHub Desktop.
Save joelanman/0e6b94bba235370d4fe0 to your computer and use it in GitHub Desktop.
roll back multiple repos to the same date
#!/usr/bin/env python
import subprocess
#Places variables into a list/array
repos = [
"ida-build-scripts",
"ida-compliance-tool",
"ida-frontend",
"ida-hub",
"ida-hub-acceptance-tests",
"ida-hub-federation-config",
"ida-metadata",
"ida-msa",
"ida-sample-rp",
"ida-stub-idp",
"ida-utils",
"ida-webops",
"saml-lib"
]
for repo in repos:
print(repo)
subprocess.call("cd " + repo + '; git checkout `git rev-list -n 1 --before="2015-05-22 12:00" master`', shell=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment