====== Migrate git repository ====== * create new repository * clone original repository repo-dir$ for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master`; do git branch --track ${branch##*/} $branch; done repo-dir$ git remote rm origin repo-dir$ git remote add origin new-server:new-repo.git repo-dir$ git push --all origin