简体   繁体   English

git远程-v的output详细信息

[英]Details of output of git remote -v

When I send command git remote -v当我发送命令git remote -v

Like following result was returned.像以下结果一样被返回。

backup  ssh://git.test.com:2222/product/sample/backup/user (fetch)
backup  ssh://git.test.com:2222/product/Sample/backup/user (push)
origin  ssh://git.test.com:2222/product/Sample (fetch)
origin  ssh://git.test.com:2222/product/Sample (push)
share   ssh://git.test.com:2222/product/Sample/share/user (fetch)
share   ssh://git.test.com:2222/product/Sample/share/user (push)
  • What is the difference between backup, origin, share?备份、来源、共享有什么区别?
  • Why the url starts with ssh?为什么 url 以 ssh 开头? how to see repository in console?如何在控制台中查看存储库?

Those URLS come from your local git configuration:这些 URL 来自您本地的 git 配置:

cd /path/to/repo
git config -local -l 

You can add as many remote URL as you want with git remote set-url --add origin... , either with HTTPS or SSH. You can add as many remote URL as you want with git remote set-url --add origin... , either with HTTPS or SSH.

While origin generally references the original remote repository you have cloned, backup and share are only meaningful for the one who has added them.虽然origin通常引用您克隆的原始远程存储库,但backupshare仅对添加它们的人有意义。

I would guess in this case:我猜在这种情况下:

  • origin : original repository, read-only (you cannot push back) origin :原始存储库,只读(您不能推回)
  • backup : personal backup for that repository, in the user namespace of the remote Git repository hosting server backup :该存储库的个人备份,在远程 Git 存储库托管服务器的用户命名空间中
  • shared : shared remote repository, accessed by other users, where you modification are visible (by other contributors) shared :共享远程存储库,由其他用户访问,您的修改是可见的(由其他贡献者)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM