-1

I did git status and it worked but it also brought out these files in red and I don't know what they mean.

I did it with the other files I already committed and it did not repeat that problem but anytime I commit a new one or another file it always does this c:/Users/User/Desktop/ see the image.

enter image description here

snakecharmerb
  • 47,570
  • 11
  • 100
  • 153
Oraz
  • 7
  • 2
  • It means `Untracked Files` as the output states. – tkausl Dec 28 '22 at 11:41
  • All those things showing untracked are my desktop files so should i start tracking my desktop files from the first one to the last – Oraz Dec 28 '22 at 12:15
  • https://stackoverflow.com/search?q=%5Bgit%5D+could+not+open+directory+Permission+denied – phd Dec 28 '22 at 12:39

1 Answers1

0

Oraz, it means that you have made modifications to those files. Added new files, folders, modified existing code on files within the project. Those changes need to be commited and pushed to the remote branch if you want.

We lack context here, but it looks like you have initialized git on a sub directory that isn't supposed to be a git project.

To start from scratch, and if you know what you are trying to achieve, delete .git and iniitialize a git project in a git directory. Ex:

mkdir test-git-project
cd /path/to/test-git-project
git init

Not on Desktop ,AppData, etc.

aamdevsecops
  • 104
  • 8
  • I don't remember making any modification at all like the file I used I turned it into git repository from my local disk then used the normal code of lines it worked for the ones i tried doing yesterday but today any new one i try it will put them in the staging phase like committing them but then those red ones will no show – Oraz Dec 28 '22 at 12:13
  • You need to reinitialize git on a git repository. Where your code project resides. Here, you have issued a "git init" command on your user profile path, most probably (c/Users/.../) which is not the right way to do. – aamdevsecops Dec 28 '22 at 13:09