這可能是缺少咖啡,但我剛剛有一些,所以我會繼續前進,問問。爲什麼git像添加文件一樣添加我的目錄?
下面是我與我的終端進行的字面上的演講,爲了便於閱讀,使用了換行符。
$ ls -la
total 28
drwxr-xr-x 5 thomas thomas 4096 2010-10-02 09:32 .
drwxr-xr-x 153 thomas thomas 12288 2010-10-02 09:30 ..
drwxr-xr-x 5 thomas thomas 4096 2010-10-02 09:31 content
drwxr-xr-x 3 thomas thomas 4096 2010-10-02 09:31 template
drwxr-xr-x 7 thomas thomas 4096 2010-10-02 09:31 typely
$ git --version
git version 1.7.0.4
$ git init .
Initialized empty Git repository in /home/thomas/typely/.git/
$ git add -A
$ git st
# On branch master
#
# Initial commit
#
# Changes to be committed:
# (use "git rm --cached <file>..." to unstage)
#
# new file: content
# new file: template
# new file: typely
#
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: content
# modified: typely
#
但這些都是目錄!而且,自從我添加它們以來,它們還沒有被修改過。
認爲目錄可能有問題,我試圖cp -r
到一個新的目錄,但同樣的事情發生。如果我直接將文件git add
,git不會抱怨,但它們也不會在git st
中出現。
我在想我嗎?