我们想把我们的git仓库移动到一个atlassian存储安装。 我已经创build了一个新的空的存储库,并从我已经执行的本地机器上的现有git存储库中创build:
git push stash-remote refs/remotes/origin/*:refs/heads/*
我已经在存储库中configuration/添加了隐藏远程服务器,在隐藏Web界面中显示正常。
这就是我需要做的,以获得我们的git存储库的完整副本存储,以便我们的开发人员可以继续在新的存储库上工作?
设置新的存储库后,在本地机器上设置你的git存储库的来源。 你可以从隐藏的URL作为ssh:// ..或http:// …
git remote add origin http://<your stash repo url>
然后推你的git回购存储:
git push origin master
这推动你的整个主分支存储,包括所有以前的提交。 推动所有(提交)分支存储使用
git push origin --all
你想要做的是在推送之前镜像存储库:
$ git clone --mirror [email protected]/upstream-repository.git $ cd upstream-repository.git $ git push --mirror [email protected]/new-location.git
这将创build一个包含所有分支和历史的完整副本。