Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Migrate a file with history from one Git repo to another
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
You can’t perform that action at this time.