gitgit-untracked

What causes a file to become untracked in Git?


I'm new to Git and have done some work on some .scss files which compile into .css files with Gulp.

I've done my work and am now ready to push my altered files to Github. However, I see 3 untracked files when I do git status: a log, a .js and a .scss.

How did these files get marked as untracked? I thought I had to specify that myself.


Solution

  • In git, all files which are in the working directory but haven't been explicitly added (i.e. git add) are marked as "untracked". This effectively means that they exist, but git is not keeping track of changes in them.