Git error: Unable to append to .git/logs/refs/remotes/origin/master: Permission denied

后端 未结 6 776
野性不改
野性不改 2020-12-22 20:28

I am having a strange issue that I can\'t seem to resolve. Here is what happend:

I had some log files in a github repository that I didn\'t want there. I found this

6条回答
  •  囚心锁ツ
    2020-12-22 21:19

    In my case I created the files with root permission locally and tried to push the code to remote with local permissions. So I ran this command

    $find . -user root
    

    to find out what all files have "root" as owner. And then I changed owner for all the files that are under root to local using following command

    $sudo chown parineethat `find . -user root`
    

    Then I was able to push my code from local to remote.

提交回复
热议问题