【问题标题】:How can I know the location from where I cloned my git repository [duplicate]我如何知道克隆 git 存储库的位置 [重复]
【发布时间】:2016-12-19 11:25:59
【问题描述】:

我已将 git repo 从我的服务器克隆到不同的文件夹。现在,我对克隆几个特定存储库的位置感到困惑。我如何知道我克隆 git 项目的位置?

【问题讨论】:

  • 试试git remote -v,你可能会看到一个“原始”存储库。

标签: git


【解决方案1】:

当您git clone 存储库时,Git 会自动添加一个名为 originremote,它指的是您克隆存储库的位置。

git remote -v

将显示您所有的遥控器及其网址。

如果你已经移除了这个遥控器,那么你就无法知道 repo 是从哪里克隆的。

【讨论】:

    【解决方案2】:

    使用...

    git remote -v
    

    这应该可以解决问题

    【讨论】:

      【解决方案3】:

      使用:

      git remote show origin
      

      或:

      git config --get remote.origin.url
      

      【讨论】:

        【解决方案4】:

        你这样做:

        vim REPO/.git/config
        

        或者:

        git remote show origin
        

        或者:

        git remote -v
        

        【讨论】:

          猜你喜欢
          • 2023-04-01
          • 2018-08-08
          • 2020-09-23
          • 2013-11-04
          • 2018-11-23
          • 2013-07-14
          • 1970-01-01
          • 2012-07-15
          • 1970-01-01
          相关资源
          最近更新 更多