Why while trying to test my repositories, and typing git status
it gives me this reply:
.VirtualBox/
.bash_history
.git-for-windows-updater
.gitconfig
.idlerc/
.lesshst
.vscode/
3D Objects/
AppData/
Contacts/
Downloads/
Favorites/
Links/
Moon/
Moonlight/
Music/
NTUSER.DAT
NTUSER.DAT{53b39e87-18c4-11ea-a811-000d3aa4692b}.TxR.0.regtrans-ms
NTUSER.DAT{53b39e87-18c4-11ea-a811-000d3aa4692b}.TxR.1.regtrans-ms
NTUSER.DAT{53b39e87-18c4-11ea-a811-000d3aa4692b}.TxR.2.regtrans-ms
NTUSER.DAT{53b39e87-18c4-11ea-a811-000d3aa4692b}.TxR.blf
NTUSER.DAT{53b39e88-18c4-11ea-a811-000d3aa4692b}.TM.blf
NTUSER.DAT{53b39e88-18c4-11ea-a811-000d3aa4692b}.TMContainer00000000000000000001.regtrans-ms
NTUSER.DAT{53b39e88-18c4-11ea-a811-000d3aa4692b}.TMContainer00000000000000000002.regtrans-ms
OneDrive/
PycharmProjects/
Saved Games/
Searches/
Videos/
VirtualBox VMs/
ntuser.dat.LOG1
ntuser.dat.LOG2
ntuser.ini
php
test/
I also tried running git add .
and it gives the same output.
CodePudding user response:
It looks like something initialized a repo in your userprofile on windows. You may have executed git init
in the wrong terminal window or folder.
CodePudding user response:
Either you must have git init in wrong directory than your root project as mentioned by jessehouwing or your git files are corrupt
do this only after taking proper backup of your current project by moving or copying to another location,
- Now what you can do is try deleting your
.git
files from earlier where you might have initiated the git bygit init
command and then again properly re-initiate git withgit init
from your desired root project, - Next run
git add .
- Now to check whether desired files are staged for commit run
git status
it will list all the files which are staged for commit - then commit your message by firing this
git commit -m "message here for commit"
- To push your local repository to remote branch you nee to run below two commands from your desired root project directory,
git remote add origin 'your commit message'
git push -u origin main