Answer in the bottom.
I am trying to see the status
of my files in the git_test2
directory which contains 3 files named test1.txt
, test2.txt
and test3.txt
.
This is what I typed into Terminal:
cd Desktop
cd git_test2
git status
Everything is good until the git status
command. It should show me just 3 untracked files but instead I get this text from the Terminal:
On branch master
Initial commit
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: ../../AndroidStudioProjects/Sunshine/app/src/main/res/layout/list_item_forecast.xml
new file: ../../Library/Preferences/AndroidStudio1.2/options/fileEditorProviderManager.xml
new file: ../../Library/Preferences/AndroidStudio1.2/options/git.xml
new file: ../../Library/Preferences/AndroidStudio1.2/options/other.xml
new file: ../../Library/Preferences/AndroidStudio1.2/options/runner.layout.xml
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: ../../AndroidStudioProjects/Sunshine/app/src/main/res/layout/list_item_forecast.xml
modified: ../../Library/Preferences/AndroidStudio1.2/options/runner.layout.xml
Untracked files:
(use "git add <file>..." to include in what will be committed)
../../.CFUserTextEncoding
../../.Rsupport/
and after the last line there are many lines just like the last one (in red color)
I just found out the reason:
All I needed to do is git init
, now it shows exactly what I expected. Thank you everyone!