0

So I am trying to change the Powershell Scripts as executable and commit them as such with an updated index. Is there a way I can do this?

I know in bash it's fairly easy:

sudo chmod +x some_file.sh
git update-index --chmod=+x some_file.sh
git add -A
git commit -a
git push

Any thoughts on how I can do this for Powershell Scripts within Windows Machines?

1 Answer 1

1

On Unix, you don't need any special command apart from git add, git can detect the executable bit from the worktree. git diff even lists mode changes.

On Windows, you can use git add --chmod +x file.

You can use git ls-files --stage to see which files are executable.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.