Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我们的 git 服务器将是本地的,但我们想要一个服务器,我们的本地 repo 也保持在线,但仅用于push时尚。
push
怎么可能做到这一点?
您可以添加遥控器git remote add <name> <url>
git remote add <name> <url>
然后,您可以推送到远程git push <name> master:master以将本地主分支推送到远程主分支。
git push <name> master:master
当您使用git clone远程创建存储库时,您origin可以为您的在线服务器创建一个public存储库并使用git push public master:master
git clone
origin
public
git push public master:master