有时想在别的机器上下载自己的上传的源代码,发现git不像svn那么方便一眼就能看到下载地址,这两天在网上查了一下,终于找到方法了.
一般本地的github目录下总会有一个.git目录,点击进入,可看到如下图所示的文件结构:
其中config即为我们要找寻的文件,将之打开,会看到类似如下内容,其中的url即为我们要找寻的下载地址
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
hideDotFiles = dotGitOnly
[remote "origin"]
url = https://git.oschina.net/luhouxiang/JavaStudy.git
puttykeyfile = C:\\Users\\luhx\\.ssh\\JavaStudy.ppk
pushurl = https://git.oschina.net/luhouxiang/JavaStudy.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
[gui]
wmstate = normal
geometry = 799x475+75+75 380 214