search

Home  >  Q&A  >  body text

No matter how git commits, it fails

Why does submitting htemes/next always fail?

$ git add -i
           staged     unstaged path
  1:    unchanged        +0/-0 themes/next

*** Commands ***
  1: status       2: update       3: revert       4: add untracked
  5: patch        6: diff         7: quit         8: help
What now> 4
No untracked files.

$ git add -A

$ git status
On branch blog
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:   themes/next (modified content)

no changes added to commit (use "git add" and/or "git commit -a")
过去多啦不再A梦过去多啦不再A梦2791 days ago761

reply all(5)I'll reply

  • 天蓬老师

    天蓬老师2017-05-02 09:46:38

    Use git add .

    reply
    0
  • 世界只因有你

    世界只因有你2017-05-02 09:46:38

    Even if you use the add i command, you should not choose the 4, because your file has not been tracked before. 4 is suitable for newly added files, so I think you should choose 2, or use the git add file name format instead

    reply
    0
  • 阿神

    阿神2017-05-02 09:46:38

    1. First git status查一下是否发生版本冲突了
    2.如果没问题就git rm --cache themes/next delete it from the library and try adding it again

    reply
    0
  • 为情所困

    为情所困2017-05-02 09:46:38

    git commit -m "updated"

    reply
    0
  • 大家讲道理

    大家讲道理2017-05-02 09:46:38

    First of all, the poster’s problem is not that he cannot submit it but that he cannot join the temporary storage area. I have encountered such a problem before using the git plug-in of VS, maybe because the file has not been modified at all. I suggest you open that file and save it. In addition, for further confirmation, check the changes in that file in git add之前可以使用git diff.

    reply
    0
  • Cancelreply