What are these untracked files showing up that I didn't create?


#1

Question

When I do git status, several files show up in red that I didn’t create, like ‘init_test.rb.’ What are these files?

Answer

These are files created by Codecademy’s environment to check that you’re completing the exercises successfully. They’re not part of the project and don’t need to be considered.

However, they do offer a valuable lesson! When you’re working with a project that generates files that you aren’t interested in tracking with your Git repo, you don’t always have to add them, and it’s okay for them to remain red.

For example, often at times you’ll use a .gitignore file and specify file types to be ignored by Git. These will be file types that are generated for logging, by your operating system, or any other file that doesn’t need to be tracked and maintained as part of the essential project. It’s just good to be mindful of the fact that such files can be generated, so using git status to see what files are modified is a good way to keep track of that.