Home

untracked

Untracked is a term commonly used in version control to describe files that exist in a project’s working directory but are not under the control of the version control system. In Git, untracked files are those that are not in the index (staging area) and therefore are not part of any commit or history. They remain on disk and can be created, modified, or deleted just like any other file, but they are not recorded by Git unless they are added.

In practice, untracked files appear when you create new files or copy files into a repository directory.

Common management actions include:

- Tracking a file: git add <file> then commit to include it in the repository history.

- Ignoring a file: add a pattern to .gitignore so Git does not report it as untracked.

- Removing an untracked file: delete it manually or use commands like git clean (with caution) to

Untracked is distinct from tracked files (those already added and committed) and from ignored files (those excluded

When
you
run
a
status
command,
such
as
git
status,
the
system
may
display
a
section
labeled
“Untracked
files”
with
a
list
of
these
items.
Git
will
not
include
untracked
files
in
commits
unless
you
explicitly
add
them
with
git
add.
If
you
want
Git
to
ignore
certain
untracked
files,
you
can
add
patterns
to
a
.gitignore
file;
ignored
files
do
not
show
up
as
untracked
in
status.
remove
untracked
files.
by
ignore
rules).
The
concept
is
central
to
understanding
how
changes
are
staged
and
recorded
in
a
repository.