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

前端 未结 10 2007
情话喂你
情话喂你 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:20

    Maybe someone comes along having the same trouble like I had: In my case this error was thrown while using husky (commit hooks) https://github.com/typicode/husky

    It was just an error because of encodings. My source was located in a directory that contains a special character ("ö")

    Seems like husky uses "git add" with the absolute path of the source which fails somehow at this point

    I renamed the path and it worked fine.

提交回复
热议问题