“git add” returning “fatal: outside repository” error

前端 未结 10 2022
情话喂你
情话喂你 2021-01-31 16:34

I\'m just entering into the wonderful world of git. I have to submit a bunch of changes that I\'ve made on my program, located in a directory called /var/www/myapp

10条回答
  •  花落未央
    2021-01-31 17:12

    Okay, this error came up for me because I moved the project from one computer to another.
    So the git was not able to figure my global git user.name and user.email

    I opened the command prompt and specified my old git user.name and user.email from previous computer. Kindly run the following commands and it should be fixed.

    cd pathToMyProjectDirectory
    git config user.name "myName" 
    git config user.email "myEmail" 
    

提交回复
热议问题