为什么我的git变化不会通过?

时间:2017-03-30 04:34:50

标签: git

我想做的就是添加所有文件。

现在我有了只是图标的目录,我之前从未见过这样的东西。

我只想添加所有文件。我做了

git add *
git commit -m "added"
git push

现在我得到了这个难以理解的混乱。

enter image description here

你怎么解释这个状态?

2 个答案:

答案 0 :(得分:2)

这些灰色文件夹是 gitlinks special entry in the index) 它们代表嵌套的git repos :父代repo只记录他们的SHA1(你在灰色图标旁边看到)

您需要决定是否:

  • 将其正确记录为 submodules
  • 完全忽略它们
  • 在您的仓库中添加内容(删除内部.git文件夹)

注意:请勿使用git add **由shell扩展 使用git add .

答案 1 :(得分:0)

您可以在cmd,cli,shell或git bash上使用以下代码。

  1. git status
  2. git add -A
  3. git commit -m" [您的提交消息]"
  4. git push origin {your-branch}
  5. 示例:

    1. git status [enter]
    2. git add -A [enter]
    3. git commit -m" new commit" [输入]
    4. git push origin master [enter]
    5. 请勿使用" git add。",因为它会覆盖您的所有代码。