我如何查看我的 git 远程网址?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/27366886/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 02:44:23  来源:igfitidea点击:

How do I see my git remote url?

gitintellij-idea

提问by Eran Medan

I'm sure this is a very silly question, but I searched here and online and couldn't find an answer. I have a project setup in intellij to some git server, I just want to see the details (e.g. to send to someone else the URL so they can clone etc...) how do I simply display the current project's git remote settings within Intellij IDEA, not using the command line? (version 14)

我确定这是一个非常愚蠢的问题,但我在这里和网上搜索并找不到答案。我在某个 git 服务器的 intellij 中有一个项目设置,我只想查看详细信息(例如,将 URL 发送给其他人以便他们可以克隆等...)我如何在 Intellij 中简单地显示当前项目的 git 远程设置IDEA,不使用命令行?(第 14 版)

Or do I have to go to the command line for that? (I know how to do it in the git command line)

或者我必须去命令行吗?(我知道如何在 git 命令行中执行此操作)

回答by Jaiwo99

try

尝试

git remote show origin

it will show the URL or the remote repo

它将显示 URL 或远程仓库

回答by SeDav

In WebStorm (almost same GUI like IntelliJ) it is done by clicking (Main menu) ->VCS->Git->Pull...

在 WebStorm(与 IntelliJ 几乎相同的 GUI)中,它是通过单击(主菜单)->VCS->Git->Pull... 来完成的。

there you have the Remote url in the dialog window that appears.

在出现的对话框窗口中有远程 url。

回答by yoAlex5

In Android Studio(3.1.2)that is based on Intellij IDEAyou can do

Android Studio(3.1.2)那是基于Intellij IDEA你可以做的

VCS -> Git -> Remotes...

VCS -> Git -> 远程...

enter image description here

在此处输入图片说明

回答by Tejas Savaliya

To find the Git repository URL:

要查找 Git 存储库 URL:

In the GIT shell, navigate to your repository folder and run the following command:

在 GIT shell 中,导航到您的存储库文件夹并运行以下命令:

git config --get remote.origin.url

回答by Ali Raza

In order to find remote url, or you are connected to internet and want to know the url you can use below command where your .git folder placed

为了找到远程网址,或者您已连接到互联网并想知道网址,您可以使用以下命令放置 .git 文件夹

git config --get remote.origin.url

git config --get remote.origin.url

of if you want to see the full out put and you have the internet then you can use below command

如果你想看到完整的输出并且你有互联网,那么你可以使用下面的命令

git remote show origin

git remote show origin

it will show you the URL that a local Git repository was originally cloned from.

它将向您显示最初克隆本地 Git 存储库的 URL。

hope this help

希望这有帮助