Create a gist now

Instantly share code, notes, and snippets.

@neofob /
Created Nov 16, 2015

moving from one git repo to another one
git remote add other /path/to/XXX
git fetch other
git checkout -b ZZZ other/master
mkdir ZZZ
git mv stuff ZZZ/stuff             # as necessary
git commit -m "Moved stuff to ZZZ"
git checkout master                
git merge ZZZ                      # should add ZZZ/ to master
git commit
git remote rm other
git branch -d ZZZ                  # to get rid of the extra branch before pushing
git push                           # if you have a remote, that is


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment