For a project I'm working on, I want to use:
git add . -A
to add some files to the stage. The problem is that Git thinks these files are unchanged from the last commit, so they are ignored. However, I personally changed the file, but Git still sees the file as unchanged.
How can I "forcefully" add that single file to my repository?
git add -A
. With that command you rob yourself of the chance to review your own changes before committing them. My experience is, that staging my work file by file, giving at least a fleeting glance at all the diffs avoids quite a number of erroneous commits. Stuff like committing debug code, committing two changes in one commit that should really be two different commits, committing local changes that never should become public, etc.git add -A .
may be nice and easy to use, but it leads to commits of significantly lower quality. – Litha