Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- repo=<Repo Name>
- name=<Folder Name>
- git remote add $name $repo
- git fetch $name
- git branch tmpbranch $name/master
- git checkout tmpbranch
- mkdir $name/
- git ls-tree -z --name-only HEAD | xargs -0 -I {} git mv {} $name/
- git commit -m "Moved files to sub dir/"
- git checkout master
- git merge -m 'merge repo' --allow-unrelated-histories tmpbranch
- git push
- git remote remove $name
- git branch -d tmpbranch
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement