Git: file “changed but not updated”

后端 未结 3 1078
小蘑菇
小蘑菇 2021-02-02 09:15

What does \"Changed but not updated mean\"? These files are in git, they\'ve been modified but when I run \"git status,\" these changes appear under \"Changed but not updated\"

3条回答
  •  旧巷少年郎
    2021-02-02 09:30

    You have to use git add every time OR use git commit -a or git commit --all instead of plain git commit.

    from Git docs:

    -a
    --all
      Tell the command to automatically stage files that have been modified
      and deleted, but new files you have not told git about are not affected.
    

    add is basically the "take notice of this file/directory" command. Not CVS's or subversion's track changes to this file.

提交回复
热议问题