Last active
October 26, 2015 14:36
-
-
Save tored/4cd3f5149bfaf9352d98 to your computer and use it in GitHub Desktop.
Move files between git repos keeping history
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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