Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make git track new files, not just existing files?

Tags:

git

Finally going to give up and ask for help. Having some git (windows) issues. If I make changes to an existing file,I can add-commit-push as usual. However, if I create a new file, git does not track it at all. Regardless of folder or extension. I am quite certain this is not a gitignore issue.

I've tried cloning a fresh instance. Tried adding several file types. No errors, git just doesn't seem to be aware of new files.

Thanks for any assistance!

like image 306
ScottVMeyers Avatar asked Sep 02 '25 07:09

ScottVMeyers


1 Answers

Make sure first those new files are not ignored:

cd /path/to/cloned/repo
git check-ignore -v -- a/new/file

If not, then a git status should list them, you can then add and commit said new files.

like image 108
VonC Avatar answered Sep 04 '25 23:09

VonC