1

I changed 2 java files deep in my directory structure relative to the root of the project. At the root of my project i gave command git add --all and then git commit -m "some message". Git only added files that changed at the root of the project and git push only pushed changed files at root of the project to the remote git. When i manually tried adding the files and doing a commit, git said no changes and hence commit was ignored.

How do i get git to recognize changed files?

Jimm
  • 8,165
  • 16
  • 69
  • 118

1 Answers1

1

The possible reasons are:

  • git update-index was used to set assume-unchanged or skip-worktree (check it here)
  • your files are part of a nested git repo (there is a .git somewhere in your subfolders)
  • your files are part of a submodule (check for a .gitmodules file)
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250