git添加-A。不添加多个目录和文件
我正在尝试向我在WWW-github上创建的github repo添加几个新目录和文件。我首先在WWW-GitHub上创建了repo,并用自述文件对其进行了初始化。然后我将它克隆到我的本地框中,并添加了一堆文件,以及目录中的目录和文件 当我做了一个以前有效的git添加-A。不添加多个目录和文件,git,chef-infra,Git,Chef Infra,我正在尝试向我在WWW-github上创建的github repo添加几个新目录和文件。我首先在WWW-GitHub上创建了repo,并用自述文件对其进行了初始化。然后我将它克隆到我的本地框中,并添加了一堆文件,以及目录中的目录和文件 当我做了一个以前有效的git add./*时,我没有识别目录中的任何内容,并且说没有任何更改。所以我尝试了git add-A.和同样的东西。然后我使用了gitadd*,它只添加了一个目录,其中包含文件,但没有添加其他目录。目录结构为: zabbix_config_
git add./*
时,我没有识别目录中的任何内容,并且说没有任何更改。所以我尝试了git add-A.和同样的东西。然后我使用了gitadd*
,它只添加了一个目录,其中包含文件,但没有添加其他目录。目录结构为:
zabbix_config_manager
|
| - roles
|| - role_1.rb
|| - role_2.rb
|
| - zabbix_config_manager
|| - attributes
||| - default.rb
||
|| - recipes
||| - default.rb
||| - recipe_1.rb
git状态
显示:
$ git status
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# new file: roles/role_asp_zabbix_agent.rb
# new file: roles/role_corp_server_ceszabbixcrt01.rb
# new file: roles/role_corp_server_ceszabbixcrt02.rb
# new file: roles/role_corp_server_grdzabbixprd01.rb
# new file: roles/role_corp_zabbix_agent.rb
# new file: roles/role_corp_zabbix_javagateway.rb
# new file: roles/role_corp_zabbix_proxy.rb
# new file: roles/role_corp_zabbix_server.rb
#
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
# (commit or discard the untracked or modified content in submodules)
#
# modified: zabbix_config_manager (modified content)
#
$git状态
#论分行行长
#要提交的更改:
#(使用“git重置磁头…”取消分级)
#
#新文件:roles/role\u asp\u zabbix\u agent.rb
#新文件:roles/role_corp_server_ceszabbixcrt01.rb
#新文件:roles/role_corp_server_ceszabbixcrt2.rb
#新文件:roles/role_corp_server_grdzabbix prd01.rb
#新文件:roles/role_corp_zabbix_agent.rb
#新文件:roles/role_corp_zabbix_javagateway.rb
#新文件:roles/role_corp_zabbix_proxy.rb
#新文件:roles/role_corp_zabbix_server.rb
#
#未为提交而暂存的更改:
#(使用“git add…”更新将提交的内容)
#(使用“git签出--…”放弃工作目录中的更改)
#(提交或放弃子模块中未跟踪或修改的内容)
#
#修改:zabbix_配置_管理器(修改内容)
#
如何解决这个问题?我想,您不想将直接子目录命名为与存储库根目录相同的名称。那么它将完美地工作。我没有使用
zabbix\u config\u manager
并在其下直接有一个名为相同的文件夹,而是使用了zabbix config manager
,我能够使用git add.
并顺利地添加了所有内容 奇怪的事情:-)我注意到了命名上的巧合,但很快就把它作为问题的原因扔掉了。似乎很难相信像git这样伟大的软件中存在如此荒谬的bug。。。好吧,生活还在继续。谢谢你的回复。我现在将删除我的,以保持这个问题的清晰。