How do I move files and history from one git repo to another?
I have a private git repo with some files that I would now like to put in a public, unrelated git repo, retaining their history.
How do I move files and history from one git repo to another?
I have a private git repo with some files that I would now like to put in a public, unrelated git repo, retaining their history.
To sync another repo with files and history from your local repository you may add the other repo as a new remote and push all changes.
git remote add anotherrepo <url to another repo>
git push anotherrepo master
This will push local master to the other repo, you may need to change this if you have other names for your branches.