Skip to content

Instantly share code, notes, and snippets.

@modamoda
Created August 29, 2014 07:01
Show Gist options
  • Save modamoda/94a52fe50d87e506d410 to your computer and use it in GitHub Desktop.
Save modamoda/94a52fe50d87e506d410 to your computer and use it in GitHub Desktop.
Git migration preserving history
# http://stackoverflow.com/questions/17371150/moving-git-repository-content-to-another-repository-preserving-history
git clone NEW_REPO
cd NEW_REPO
git checkout master
git remote add old_git_remote OLD_REPO
git fetch old_git_remote
git merge old_git_remote/master
git remote rm old_git_remote
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment