我們需要明白,遠程版本庫(權威版本庫)是相對于你的初始版本庫來說的?。。。?!
首先查看你的初始版本庫配置文件
[root@git git]# cat .git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
我們在當前版本庫和遠程版本庫之間建立連接
[root@git git]# git remote add origin /tmp/Depot/new.git
現在我們再次查看初始版本庫的配置文件
[root@git git]# cat .git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = /tmp/Depot/new.git
fetch = +refs/heads/:refs/remotes/origin/
現在我們的初始版本庫和遠程版本庫建立了連接