Saving files with Windows programs makes Git in Cygwin track filemode changes -



Saving files with Windows programs makes Git in Cygwin track filemode changes -

i developing cygwin, git in cygwin , windows editor under windows. quite annoying saving files native windows programs makes file executable in cygwin. want track filemodes have unix executables updating files windows shoudn't alter existing mode. i'd take setting filemode 1 time in cygwin before committing file first time.

i read https://cygwin.com/cygwin-ug-net/using-filemodes.html i'm on ntfs , don't know how acls impact file permissions. after adding noacl /etc/fstab didn't stop ls -l showing files executable after updating them windows.

these 2 approaches seem possible:

make cygwin maintain original x bit on existing files after updated windows.

configure git ignore filemode changes existing files. want save x flag when add together unix executable files why git config core.filemode false not solution. saves files non-executable. (sorry emphasizing while doing research read many articles people happily dropping x bit info @ , considering solution)

what solution either approach? i'd prefer 1st 1 feels cleaner.

update: since started using komodo edit rather geany files don't x bit anymore. there difference between different windows programs saving files. pretty much solves problem me although think there must solution geany, too.

i see 2 situations here

changed locally +x, ignore change changed locally +x, commit change

to 1, have code in ~/.bashrc. ~/.bash_profile should work too

class="lang-sh prettyprint-override">prompt_command=' if [ -d .git ] if [ ! -g .git/config ] git config core.filemode 0 chmod +s .git/config fi fi '

then 2, have script this

git update-index --skip-worktree --chmod=+x hello-world.sh git update-index --no-skip-worktree hello-world.sh

run this

git chmod.sh hello-world.sh

.bashrc

git-chmod.sh

git ignoring gitconfig?

how create git take mode changes without accepting text changes?

windows git cygwin file-permissions git-config

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -