Git status command - entire computer under untracked files

978 views Asked by At

I'm quite new to github. Today I was in the path Desktop/Projects and I made a new directory in it:

mkdir CV

inside it a ran the command:

echo "# CV" > README.md

because I wanted to create a Readme file inside the CV directory and just writing in it # CV.

At this stage I wanted to add my files onto Github so I went on Github website and I created a new repo. Then back on the terminal, before doing anything else, I first checked git status and that's what it came up:

warning: could not open directory 'Pictures/Libreria di Foto.photoslibrary/': Operation not permitted On branch master

No commits yet

Untracked files: (use "git add ..." to include in what will be committed)

.CFUserTextEncoding
.DS_Store
.adobe/
.atom/
.bash_history
.bash_profile
.bash_sessions/
.bashrc
.bundle/
.cache/
.config/
.cups/
.dropbox/
.gem/
.gitconfig
.gnupg/
.irb-history
.local/
.mkshrc
.oh-my-zsh/
.oracle_jre_usage/
.profile
.rvm/
.ssh/
.subversion/
.swp
.viminfo
.zcompdump-MacBook Air di Emanuele-5.3
.zlogin
.zoomus/
.zsh_history
.zshrc
.zshrc.pre-oh-my-zsh
Applications/
Creative Cloud Files/
Desktop/
Documents/
Downloads/
Dropbox/
Library/
Movies/
Music/
Parallels/
Pictures/
Public/
myFile
my_final_project/

My computer is currently entire under untracked files. I did not do git init anywhere. I also tried to follow the steps following the answer in another stackoverflow topic but didn't work out.

2

There are 2 answers

0
CodeWizard On BEST ANSWER

Delete the ~/.git and you will be fine.

You accidentally executed git init in your home folder

0
ik1ne On

In addition to the answer "remove ~/.git", you can figure out where the .git folder is by executing git rev-parse.

It will return .git if you're at repository's root, if not it will return absolute path to the repository's .git folder.