Guys, even after using "git add ." I still have untracked files that I can't commit.
There was another question with the same problem, but in that case it was related to case-sensitive folder. I didn't change the name of any folders here.
The easiest way to add all files to your Git repository is to use the “git add” command followed by the “-A” option for “all”. In this case, the new (or untracked), deleted and modified files will be added to your Git staging area.
Untracked files are those that are in the repo's directory but have not yet been added to the repo's index with git add .
The .
in the git add .
command refers to the "current directory". So, running git add .
will add all the files in the current directory and its subdirectories. You should ensure that you are in the correct directory before running git add .
.
If you're one level down in a subdirectory, then git add ..
would be equivalent to cd ..; git add .
.
git add -A is what you want. It will add everything. This includes files you deleted.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With