制作你的远程版本库

我们需要明白,远程版本库(权威版本库)是相对于你的初始版本库来说的!!!!!

首先查看你的初始版本库配置文件

[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/

现在我们的初始版本库和远程版本库建立了连接

你可能感兴趣的:(制作你的远程版本库)