Skip to content

Instantly share code, notes, and snippets.

@simon-weber
Created April 27, 2013 22:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simon-weber/5474977 to your computer and use it in GitHub Desktop.
Save simon-weber/5474977 to your computer and use it in GitHub Desktop.
Checks out my entire sample source tree (for https://github.com/simon-weber/Predicting-Code-Popularity) to a certain date, in parallel. The argument to -P is the number of processes to use.
find /localdisk/winter-snapshot/code/ -mindepth 2 -maxdepth 2 | xargs -P 32 -n 1 -I {} bash -c 'cd $1; git checkout -q $(git rev-list -n 1 --before="2012-11-30" $(git rev-parse --abbrev-ref HEAD)) -- || pwd' -s {} 2>&1 | tee outputfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment