【发布时间】:2020-06-18 03:59:34
【问题描述】:
我的操作系统是 Ubuntu 20.04
我已经看过这篇帖子How to add chmod permissions to file in GIT?
我拥有的是这个文件https://github.com/PRATAP-KUMAR/focalgdm3/blob/master/focalgdm3
我在看什么
chmod +x 这样一旦我通过这个链接 wget https://raw.githubusercontent.com/PRATAP-KUMAR/focalgdm3/master/focalgdm3 从 github 下载文件,它就可以在 Ubuntu 20.04 中执行了
我尝试了git update-index 命令但出现错误..
pratap@i7-6550U:~$ git update-index --chmod=+x focalgdm3fatal: not a git repository (or any of the parent directories): .gitpratap@i7-6550U:~$
寻找一步一步的过程..
【问题讨论】:
-
为什么要跳过我在答案中提到的提交步骤?您不能添加,然后推送。它是
git add --chmod=+x focalgdm3,(带有=),然后是git commit -m "executable",然后是git push。如果它不起作用,那只是意味着您已经添加了可执行集。 -
是的,我已经编辑了答案以包含相关命令以避免该错误消息。
-
你想要达到的不可能:serverfault.com/questions/863522/…