git commit 报nothing added to commit but untracked files present,git add -A 和 git add . 的区别

发布于 / bug飞 / 0条评论 / Tags: git / 3 次浏览

git commit 报 nothing added to commit but untracked files present ,git ,看来git add -A 和 git add . 的区别,git add . 只会加已经track的working tree,而git add -A 根路径下的全部

1.首先尝试,发现不起作用

git add .
git status

2.使用如下,发现其作用了

git add --all
  1. summary--- git add -A 等于 git add . 加 git add -u

     git add -A stages all changes
    
     git add . stages new files and modifications, without deletions
    
     git add -u stages modifications and deletions, without new files

    评论区(暂无评论)