unable to create file … Permission denied

后端 未结 12 1008
旧时难觅i
旧时难觅i 2020-12-14 00:48

i am currently working on windows.

Sometimes i have problems when i try :

git checkout origin develop

i have this error : error: un

12条回答
  •  南笙
    南笙 (楼主)
    2020-12-14 01:07

    First make sure to run your cmd/terminal as an administrator (right click on cmd.exe icon -> "Run as Administrator")

    I had the same issue with a git pull (using cmder on windows). What worked for me is this:

    This will delete your local changes:
    hard reset your branch and try again.
    $ git checkout origin develop - (failed)
    $ git reset --hard HEAD
    $ git checkout origin develop - (great success!)

    If this doesn't work try forcing the checkout:
    This will also throw away your local changes
    $ git checkout -f origin develop.

提交回复
热议问题