使用绝对路径获取Git仓库的URL。

16 浏览
0 Comments

使用绝对路径获取Git仓库的URL。

我可以在存储库文件夹中运行下面的命令来获取存储库路径(就像这里建议的那样):

git config --get remote.origin.url

怎样使用绝对路径获取Git存储库URL?

假设我在另一个文件夹中,并且我想从另一个文件夹获取存储库URL,使用绝对路径。

我尝试了这个,但不起作用。

git config --get remote.origin.url --path /home/username/myFolder

admin 更改状态以发布 2023年5月20日
0
0 Comments
git --git-dir=/home/username/myFolder/.git config --get remote.origin.url

,中文意为“123”。

0