Product SiteDocumentation Site

3.3.4. Untracked files

Untracked files are those that Git does not recognize. This will occur if a file is newly created or for all files in a new project. The status of a file can be shown with the git status command. For a newly started project there will be files in the untracked status.
$ git status
# On branch master
# Untracked files:
#	(use "git add <file>..." to include in what will be committed)
#		filename
nothing added to commit but untracked files present (use "git add" to track)
As the status helpfully says, the files will not be included unless Git is told to include them with the git add command.
$ git add filename
The command git add filename will add that specific file first to the unmodified section. Use git add . to add all files in the current directory (including any sub-directories), or for example git add *.[ch] to add all .c and .h files in the current directory.