Detailed display of git add

I have a file that appears in the git status list "Changed but not updated" as (modified content, untracked content) , and whose status does not change when I git add on it.

I was wondering if there is a team that will give me more diagnostic information. The -v did nothing.

+4
source share
3 answers

Make sure your file is not part of the submodule : adding a submodule file from the parent repo will not work.

git status can display changes to the pallet if not used --ignore-submodules[=<when>] . (or if config diff.ignoreSubmodules ).

+3
source

Check the answer git ls-files --others --ignored --exclude-standard to make sure Git thinks it should be ignored. This will be the first debugging step I will take.

Then you can try to force add with git add --force <filename> and see if this overcomes any kind of ignoring that prevents adding to the stage.

+1
source

Have you tried looking at your .gitignore file in the project root directory. The file in question may be excluded from tracking. Hope this helps -

0
source

Source: https://habr.com/ru/post/1343877/


All Articles