Skip to content

Instantly share code, notes, and snippets.

@tored
Last active October 26, 2015 14:36
Show Gist options
  • Save tored/4cd3f5149bfaf9352d98 to your computer and use it in GitHub Desktop.
Save tored/4cd3f5149bfaf9352d98 to your computer and use it in GitHub Desktop.
Move files between git repos keeping history
# http://stackoverflow.com/a/11426261
cd repository
git log --pretty=email --patch-with-stat --reverse --full-index --binary -- path/to/file_or_folder > patch
cd ../another_repository
git am < ../repository/patch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment