I am trying to push my files to github using bash. They are already on there, and I am uploading a newer version with new lines and code, etc. But when I try git add<
try to use git add *
then git commit
Ran into the issue, but it was only two directories and unknown to me was that both those directories ended up being configured as git submodules. How that happened I have no clue, but the process was to follow some of the instructions on this link, but NOT remove the directory (as he does at the end) but rather do git add path/to/dir
I had a problem where once upon a time I set the git index to 'assume unchanged' on my file.
You can tell git to stop ignoring changes to the file with:
git update-index --no-assume-unchanged path/to/file
If that doesn't help a reset may be enough for other weird cases.
In practice I found removing the cached file and resetting it to work:
git rm --cached path/to/file
git reset path/to/file
The git rm --cached
means to only remove the file from the index, and reset
tells git to reload the git index from the last commit.
In general with this issue, first check that you're editing the file you think you are! I had this problem when I was editing a transpiled JavaScript file instead of the source file (the transpiled version wasn't under source control).
Make sure not to create symlinks (ln -s source dest
) from inside of Git Bash for Windows.
It does NOT make symlinks, but does a DEEP copy of the source to the dest
I experienced same behavior as OP on a MINGW64 terminal from Git Bash for Windows (version 2.16.2) to realize that my 'edited' changes actually were in the original directory, and my git bash commands were from within a deep copy that had remained unchanged.
I had the same problem. Turns out I had two copies of the project and my terminal was in the wrong project folder!