Home > Software design >  What is meant by Not Tracked in Git / Sourcetree
What is meant by Not Tracked in Git / Sourcetree

Time:12-22

I've coded lot of changes also created new components. Now I've to commit all these. But I faced something new when I went to source tree. There are changes I've to commit but whenever I hovered over newly created components I saw "Not tracked". Don't know what is this and how to handle this.

CodePudding user response:

"Not tracked" simply means that Git doesn't have a record of those files—they have never been committed nor have they been added to the staging area.

From the Git book:

Remember that each file in your working directory can be in one of two states: tracked or untracked. Tracked files are files that were in the last snapshot, as well as any newly staged files; they can be unmodified, modified, or staged. In short, tracked files are files that Git knows about.

Untracked files are everything else — any files in your working directory that were not in your last snapshot and are not in your staging area.

Adding the files to staging area with git add is enough for Git to start tracking them and show them as "new".

CodePudding user response:

Newly created components are still on local. hence they are not tracked. Once you commit and push your changes to server. component or files will be tracked hereafter.

  • Related