Git查看远程仓库

Git查看远程仓库教程

我们查看 git 远程仓库的地址或者更详细的信息,可以使用 git remote 命令。

查看远程仓库详解

语法

git remote [options]

参数

参数 描述
options git remote 命令使用的参数。

git remote命令常用实例

实例

实例 描述
git remote -v 查看远程仓库地址。
git remote show origin 查看远程仓库信息。

说明

使用 git remote show origin 命令,查看 git 远程仓库的信息比 git remote -v 更详细。

查看远程仓库地址

语法

git remote -v

案例

我们使用 git remote 命令,查看当前工作区的 git 远程仓库的地址,具体命令如下:

git remote -v

执行完毕后,如下图所示:

02_git远程仓库git remote.png

我们看到,显示了远程仓库的地址。

查看远程仓库信息

语法

git remote show origin

案例

我们使用 git remote 命令,查看当前工作区的 git 远程仓库的信息,具体命令如下:

git remote show origin

执行完毕后,如下图所示:

03_git远程仓库git remote.png

我们看到,我们使用了 git remote 命令显示了远程仓库的信息。

Git查看远程仓库总结

我们查看 git 远程仓库的地址或者更详细的信息,可以使用 git remote 命令。