Automatically apply “git update-index --chmod=+x” to executable files
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I frequently add bash scripts to my git repository, and the scripts have executable permissions in the linux filesystem prior to the git add . But after pushing the added files to a remote repository and pulling in another location, the files show up with non-executable permissions. There seem to be two ways to correct the problem: 1. chmod u + x $script git commit - am "fixing the script permissions... again..." or 2. git update - index -- chmod =+ x $script Instead of fixing up the permissions every time, is there a way to have