Reputation: 5490
I have created and worked on a git repository github.com/softtimur/old
. I just created another git repository github.com/softtimur/Documents
, which has its own .../Documents/.git/
. Now I want to create .../Documents/old
and move everything of github.com/softtimur/old
under it while keeping the commit history. And then, I want to remove github.com/softtimur/old
.
Does anyone know how to do this moving properly?
Upvotes: 0
Views: 90
Reputation: 440
I would add another remote to your local checkout of github.com/softtimur/old
to allow you to to merge them and then push the result back
git clone [email protected]/softtimur/old.git
cd old
git remote add new [email protected]/softtimur/Documents.git
git fetch new
git checkout master
git merge new/master
git push -u new master
Upvotes: 1