2014-02-25 107 views
0

我使用git远程命令显示远程分支机构,并显示输出:git的远程命令输出消息

$ git remote -v 
origin [email protected]:spider119/mygridview.git (fetch) 
origin [email protected]:spider119/mygridview.git (push) 

我不理解为什么远程分支机构显示像上面,似乎它们是相同的分支。我看到人们的命令输出是这样的:

$ git remote -v 
origin [email protected]:spider119/mygridview.git 

输出方式有什么不同?感谢

回答

1

您可以指定不同的存储库作为推动目标为每个远程的,有用的,当你叉你只读仓库的访问。例如,您可以看到Dictator and Lieutenants Workflow,这是用于Linux Kernel开发的那个。

在这种情况下,你不必有福仓库写权限,所以你总是从一个获取并推到另一个。

git-remote(1)

set-url 
Changes URL remote points to. Sets first URL remote points to matching regex <oldurl> (first URL if no <oldurl> is given) to <newurl>. If <oldurl> doesn’t match any URL, error occurs and nothing is changed. 

With --push, push URLs are manipulated instead of fetch URLs. 

至于消息中的不同,它主要是具有可与任何次要版本的变化,或者说它们之间切换一个小设置 - 我不认为这很重要,在所有,但如果它让你烦恼,随时做一点研究。