Verbose display of a git add

I have a file that shows up in git status‘s "Changed but not updated" list as (modified content, untracked content), and whose status doesn’t change when I do git add on it.

I was wondering if there is a command that will give me more diagnostic information. The -v option didn’t to anything.

  • How to stop git add -patch not displaying prompt in mintty
  • Why does adding an existing repo as a submodule modify .git/config?
  • Are “git add file” and “git checkout — file” symmetric?
  • Can I split an already split hunk with git?
  • How to add a git sub-module to a super-project in code using libgit2
  • git add -p --ignore-submodules?
  • How to bring back removed file
  • How can I determine what commits cause a conflict?
  • Restore file from git repo without commit
  • Can I get the path of a .bbappend file?
  • Using git filter-branch to remove everything except one subdirectory
  • why git fast-import file modes are hardcoded?
  • 3 Solutions collect form web for “Verbose display of a git add”

    Make sure your file isn’t part of a submodule: adding a file of a submodule from its parent repo wouldn’t work.

    git status can display changes to a submdodule, unless the --ignore-submodules[=<when>] is used. (or if the config diff.ignoreSubmodules is set).

    Check the response of git ls-files --others --ignored --exclude-standard to see if Git believes it should be ignored. This would be the first debugging step that I would take.

    Then, you can try to force the addition with git add --force <filename> and see if that overcomes any ignoring that is preventing the addition to staging.

    Have you tried looking at your .gitignore file in the project’s root directory. You may have the file in question excluded from tracking. Hope that helps –

    Git Baby is a git and github fan, let's start git clone.