Skip to content

Instantly share code, notes, and snippets.

@michael-simons
Created April 3, 2013 08:17
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 michael-simons/5299398 to your computer and use it in GitHub Desktop.
Save michael-simons/5299398 to your computer and use it in GitHub Desktop.
Move some specific files from one git repository into a new one preserving the history
cd ~/the/old/repo
find -E . -regex ".*(File1|File2)\.java" | xargs git log --pretty=email --patch-with-stat --reverse | (cd ~/the/new/repo && git am)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment