In git you would need to initialize a Repository first which would be empty at the start point.
We are going to create a test directory and initialize the directory as our git Repository
~ $ mkdir test
~ $ cd test/
~/test $ git init
Initialized empty Git repository in /root/test/.git/
Initializing a directory creates a subdirectory of .git which includes files used by git to track the changes
~/test $ cd .git/
~/test/.git $ ll
total 32
drwxr-xr-x. 2 root root 4096 May 1 20:11 branches
-rw-r--r--. 1 root root 92 May 1 20:11 config
-rw-r--r--. 1 root root 73 May 1 20:11 description
-rw-r--r--. 1 root root 23 May 1 20:11 HEAD
drwxr-xr-x. 2 root root 4096 May 1 20:11 hooks
drwxr-xr-x. 2 root root 4096 May 1 20:11 info
drwxr-xr-x. 4 root root 4096 May 1 20:11 objects
drwxr-xr-x. 4 root root 4096 May 1 20:11 refs
If we are going to check in the test directory , the git will show there is nothing to commit
~/test $ git status
# On branch master
#
# Initial commit
#
nothing to commit (create/copy files and use "git add" to track)
So we are going to create an test.txt file
~/test $ echo "This is just my test file" > test.txt
Now if we are going to check the git status , it will treat this as untracked since its not been added to git yet
~/test $ git status
# On branch master
#
# Initial commit
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# test.txt
nothing added to commit but untracked files present (use "git add" to track)
We are going to create a test directory and initialize the directory as our git Repository
~ $ mkdir test
~ $ cd test/
~/test $ git init
Initialized empty Git repository in /root/test/.git/
Initializing a directory creates a subdirectory of .git which includes files used by git to track the changes
~/test $ cd .git/
~/test/.git $ ll
total 32
drwxr-xr-x. 2 root root 4096 May 1 20:11 branches
-rw-r--r--. 1 root root 92 May 1 20:11 config
-rw-r--r--. 1 root root 73 May 1 20:11 description
-rw-r--r--. 1 root root 23 May 1 20:11 HEAD
drwxr-xr-x. 2 root root 4096 May 1 20:11 hooks
drwxr-xr-x. 2 root root 4096 May 1 20:11 info
drwxr-xr-x. 4 root root 4096 May 1 20:11 objects
drwxr-xr-x. 4 root root 4096 May 1 20:11 refs
If we are going to check in the test directory , the git will show there is nothing to commit
~/test $ git status
# On branch master
#
# Initial commit
#
nothing to commit (create/copy files and use "git add" to track)
So we are going to create an test.txt file
~/test $ echo "This is just my test file" > test.txt
Now if we are going to check the git status , it will treat this as untracked since its not been added to git yet
~/test $ git status
# On branch master
#
# Initial commit
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# test.txt
nothing added to commit but untracked files present (use "git add" to track)