mirrorオプションでGitHubへリポジトリを移行する git clone --mirror taro@tarosserver.example.com:/path/to/PrivateProject.git git remote set-url --push origin git@github.com:Taro/PublicProject.git git push --mirror --mirror オプションを使用しない手順 移行元のリポジトリをcloneする git clone taro@tarosserver.example.com:/path/to/PrivateProject.git 移行元のリポジトリからすべてのリモートブランチをローカルにチェックアウトする git branch -a | grep -v HEAD | perl -ne 'chomp($_); s|^\*?\s*||; if (m|(.+)/(.+)| && not $d{$2}) {print qq(git branch --track $2 $1/$2\n)} else {$d{$_}=1}' | bash push/fetch先を変更する例 git remote rm origin git remote add origin git@github.com:Taro/PublicProject.git GitHubリポジトリを別名で追加する git remote add github git@github.com:Taro/PublicProject.git git remote -v ローカルにあるブランチとタグをpushする git push origin --all git push origin --tags