如果代码已经由git管理,那么如何将这些代码推送到一个新的空仓库呢?

答: 示例如下:

cd old-repo (进入旧的仓库目录)
git remote set-url origin ssh://git@bitbucket.sw.nxp.com/dash/nfc-module.git (设定新的远程仓库地址)
git push -u origin --all (将所有的分支都推送到新的仓库)
git push origin --tags (将所有tag都推送到新的仓库)
原文地址:https://www.cnblogs.com/dakewei/p/13425889.html