Skip to content

Instantly share code, notes, and snippets.

@jonathanmoore
Created January 28, 2014 21:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonathanmoore/8677283 to your computer and use it in GitHub Desktop.
Save jonathanmoore/8677283 to your computer and use it in GitHub Desktop.
Combining Repos

Steps to Combine Git Repos w/ Perserving History

# Add a remote for and fetch the old repo
git remote add -f theme_name <theme_name repo URL>

# Merge the files from theme_name/master into new/master
git merge theme_name/master

# Move the old_a repo files and folders into a subdirectory so they don't collide with the other repo coming later
mkdir theme_name
git mv *.* theme_name/.
git mv _/ theme_name/.

# Commit the move
git commit -m "Merge Theme_Name into themes"

# Remove remote
git remote rm theme_name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment