这是我在 github 上的一个测试仓。
这是仓的详细信息。
先克隆到本地。
git branch
zuo@DESKTOP-QN47U5R MINGW64 /d/a/test (i55)
$ git branch
i22
i33
* i55
i88
i99
ixx
iyy
zuo@DESKTOP-QN47U5R MINGW64 /d/a/test (i55)
$ git branch -r
origin/HEAD -> origin/i22
origin/i22
origin/i33
origin/i44
origin/i55
origin/i66
origin/i77
zuo@DESKTOP-QN47U5R MINGW64 /d/a/test (i55)
$ git branch -a
i22
i33
* i55
i88
i99
ixx
iyy
remotes/origin/HEAD -> origin/i22
remotes/origin/i22
remotes/origin/i33
remotes/origin/i44
remotes/origin/i55
remotes/origin/i66
remotes/origin/i77
git remote
zuo@DESKTOP-QN47U5R MINGW64 /d/a/test (i55) $ git remote origin zuo@DESKTOP-QN47U5R MINGW64 /d/a/test (i55) $ git remote -v origin https://github.com/factsbenchmarks/test.git (fetch) origin https://github.com/factsbenchmarks/test.git (push) zuo@DESKTOP-QN47U5R MINGW64 /d/a/test (i55) $ git remote show origin * remote origin Fetch URL: https://github.com/factsbenchmarks/test.git Push URL: https://github.com/factsbenchmarks/test.git HEAD branch: i22 Remote branches: i22 tracked i33 tracked i44 tracked i55 tracked i66 tracked i77 tracked Local branch configured for 'git pull': i22 merges with remote i22 Local refs configured for 'git push': i22 pushes to i22 (up to date) i33 pushes to i33 (up to date) i55 pushes to i55 (up to date) zuo@DESKTOP-QN47U5R MINGW64 /d/a/test (i55) $ git branch i22 i33 * i55 i88 i99 ixx iyy
.git 的目录结构
zuo@DESKTOP-QN47U5R MINGW64 /d/b/test/.git (GIT_DIR!) $ pwd /d/b/test/.git zuo@DESKTOP-QN47U5R MINGW64 /d/b/test/.git (GIT_DIR!) $ ll total 13 -rw-r--r-- 1 zuo 197609 300 9月 1 21:11 config -rw-r--r-- 1 zuo 197609 73 9月 1 20:55 description -rw-r--r-- 1 zuo 197609 20 9月 1 21:30 HEAD drwxr-xr-x 1 zuo 197609 0 9月 1 20:55 hooks/ -rw-r--r-- 1 zuo 197609 137 9月 1 21:30 index drwxr-xr-x 1 zuo 197609 0 9月 1 20:55 info/ drwxr-xr-x 1 zuo 197609 0 9月 1 20:55 logs/ drwxr-xr-x 1 zuo 197609 0 9月 1 20:55 objects/ -rw-r--r-- 1 zuo 197609 436 9月 1 20:55 packed-refs drwxr-xr-x 1 zuo 197609 0 9月 1 20:55 refs/
.git/config
zuo@DESKTOP-QN47U5R MINGW64 /d/b/test/.git (GIT_DIR!) $ cat config [core] repositoryformatversion = 0 filemode = false bare = false logallrefupdates = true symlinks = false ignorecase = true [remote "origin"] url = https://github.com/factsbenchmarks/test.git fetch = +refs/heads/*:refs/remotes/origin/* [branch "i22"] remote = origin merge = refs/heads/i22