Created
February 27, 2015 17:06
-
-
Save igilham/9717b31ac3e9dca11156 to your computer and use it in GitHub Desktop.
Migrate a file with history from one Git repo to another
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
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