git: check in executable file (+ on windows) (beginner - intermediate) anthony explains #284

preview_player
Показать описание
today I show how to check in an executable script, and the tricky command to do it on windows (which doesn't really have the same permissions model)

==========

I won't ask for subscriptions / likes / comments in videos but it really helps the channel. If you have any suggestions or things you'd like to see please comment below!
Рекомендации по теме
Комментарии
Автор

I develop on Windows and deploy on Linux so I do this all the time. In fact, I had an issue today where a deployment failed with that "Permission denied" error because I forgot to run this command.

One interesting thing. I do most all of my work in git bash on Windows and I noticed that while chmod does nothing, it seems to be the presence of a shebang that makes ls show a script as executable or not. My Python scripts that are entry points have shebangs and show as executable and ones that are additional helper modules do not. So ls must actually be reading the first few characters of every file? I kind of wish git did this as well. I wonder if there is some way for me to automate this with a git hook.

sparkyb