1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to Version Control with Git

Exercise

How do I add new files?

Git does not track files by default. Instead, it waits until you have used git add at least once before it starts paying attention to a file.

In the diagram you saw at the start of the chapter, the untracked files won't have a blob, and won't be listed in a tree.

The untracked files won't benefit from version control, so to make sure you don't miss anything, git status will always tell you about files that are in your repository but aren't (yet) being tracked.

Instructions 1/3

undefined XP
  • 1

    You are in the dental repository. Use git status to find the files that aren't yet being tracked.

  • 2

    Use git add to add the new file to the staging area.

  • 3

    Use git commit to save the staged files with the message "Starting to track data sources."