How can I make a script executable in windows. just like what the chmod +x command does in linux. I have browsed but got no definite solution. Thanks for helping out.
Run:
git add --chmod=+x filename
This git adds the file, and makes it executable before you then git commit to push.
You need to give the file an executable extension. Windows executes .bat, .com and .exe files by default, but the PATHEXT environment variable determines which extensions can be executed without even writing out their extensions and in what order they will be tried.
What will be actually executed depends on the registry settings under HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\
, which are also edited by the "Open with..." graphical dialogs in the Explorer. For details about that, see the answer for a different question: https://mcmap.net/q/388808/-where-does-windows-store-its-quot-open-with-quot-settings
In your case the git-ftp script uses bash which is not pre-installed on most Windows machines. If your Windows edition supports the Windows Subsystem for Linux optional component, I suggest just installing that. But there are other options, like Cygwin, Wubi or a virtual machine.
As you wrote in your comment, Git for Windows includes an MSys2 bash shell, which is a successor of Cygwin in some sense.
ls -al
you see: drwxr-xr-x
. I see some python files have it, others don't, so don't tell me it is determined by the extension... –
Bullen "attrib +x filename" might work!
© 2022 - 2024 — McMap. All rights reserved.