我是git的新手.我只是用它来控制本地机器的版本.我已经初始化了我的git repo git init.我手动添加了一些我需要的文件夹git add "folder name".有一个特定的文件夹,我无法通过使用相同的命令添加.它与其他目录包含在同一目录中.但我一直在努力fatal: Not a git repository "some path".我不明白问题是什么.
root@CTO:/home/kougaikw/test# git --version
git version 1.8.3.2
root@CTO:/home/kougaikw/test# git status
# On branch master
#
# Initial commit
#
# Changes to be committed:
# (use "git rm --cached <file>..." to unstage)
#
# new file: main.html
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# .DS_Store
# css/
# fonts/
# images/
# instance-config.json
root@CTO:/home/kougaikw/test# ls -l
total 36
drwxr-xr-x 2 root root 4096 Apr 5 17:04 css
drwxr-xr-x 2 root root 4096 Apr 5 17:04 fonts
drwxr-xr-x 5 root root 4096 Apr 5 17:04 images
-rw-r--r-- 1 root root 1004 Mar 13 08:25 instance-config.json
drwxr-xr-x 10 root root 4096 Apr 5 17:05 js
-rw-r--r-- 1 root root 695 Jan 7 08:50 main.html
drwxr-xr-x 8 root root 4096 Apr 5 17:06 mocks
drwxr-xr-x 13 root root 4096 Apr 5 17:07 plugins
drwxr-xr-x 14 root root 4096 Apr 5 17:07 templates
root@CTO:/home/kougaikw/test# git add js
fatal: Not a git repository: js/libs/testfolder/../../../../.git/testfolder/html/js/libs/modules
Run Code Online (Sandbox Code Playgroud)
我在js/libs/testfolder目录下有一个名为".git"的文件夹.删除它,并正常工作
| 归档时间: |
|
| 查看次数: |
7999 次 |
| 最近记录: |