SHARE
TWEET

Untitled

a guest May 19th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. repo=<Repo Name>
  2. name=<Folder Name>
  3.  
  4. git remote add $name $repo
  5. git fetch $name
  6. git branch tmpbranch $name/master
  7. git checkout tmpbranch
  8. mkdir $name/
  9. git ls-tree -z --name-only HEAD | xargs -0 -I {} git mv {} $name/
  10. git commit -m "Moved files to sub dir/"
  11. git checkout master
  12. git merge -m 'merge repo' --allow-unrelated-histories tmpbranch
  13. git push
  14. git remote remove $name
  15. git branch -d tmpbranch
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top