我有一个带有以下内容的git bare存储库
HEAD branches config description hooks info objects refs
info文件夹还包含info / mailist.txt和info / log
我的问题是,如果用户正在克隆此文件,那么如何使用clone命令忽略这两个文件
git clone --bare main new --ignore //????????
答案 0 :(得分:1)
经过测试,我发现clone --bare
无法克隆info/log
和info/mailist.txt
$ /c/prog/git/tests/t2 (BARE:master)
$ l ../t1/info/
total 1
-rw-r--r-- 1 VonC Administ 240 Mar 1 09:20 exclude
drwxr-xr-x 7 VonC Administ 0 Mar 1 09:20 ..
-rw-r--r-- 1 VonC Administ 2 Mar 1 09:21 log
drwxr-xr-x 2 VonC Administ 0 Mar 1 09:21 .
$ /c/prog/git/tests
$ git clone --bare t1 t2
Cloning into bare repository t2...
done.
warning: You appear to have cloned an empty repository.
$ /c/prog/git/tests/t2 (BARE:master)
$ l info/
total 1
-rw-r--r-- 1 VonC Administ 240 Mar 1 09:21 exclude
drwxr-xr-x 2 VonC Administ 0 Mar 1 09:21 .
drwxr-xr-x 7 VonC Administ 0 Mar 1 09:21 ..