git add -A is not adding all modified files in directories

后端 未结 9 932
旧时难觅i
旧时难觅i 2020-12-04 14:17

I want to add all files no matter what: whether it is deleted, created, modified, untracked, etc? I just don\'t want to git add ALL my files EVERY T

9条回答
  •  独厮守ぢ
    2020-12-04 14:50

    Let's quote the documentation for -A:

           -A, --all
           Like -u, but match  against files in the working tree in addition to the
           index. That means that it will find new files as well as staging modified content and
           removing files that are no longer in the working tree.
    

    Note the critical word: . You need to give it a pattern that matches, recursively, all the way down your tree.

提交回复
热议问题