0

when I tried to change the permission of the file from 644 to 700 in git, it doesn't take effect. It set the permission to 755 automatically.

Git config filemode enabled:

core.filemode=true

Git log :

[root@1123 test]# git add .
[root@1123 test]# git commit -m "test"
[master (root-commit) 3111b80] test
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 welcome.sh
[root@1123 test]# 
[root@1123 test]# 
[root@1123 test]# chmod 700 welcome.sh 
[root@1123 test]# git diff
diff --git a/welcome.sh b/welcome.sh
old mode 100644
new mode 100755
[root@1123 test]# 

Please someone help on this. Thanks.

KMG
  • 889
  • 2
  • 14
  • 36
  • 1
    see https://stackoverflow.com/q/39666585/1256452 and https://stackoverflow.com/q/11230171/1256452 (and note in particular the comment: https://stackoverflow.com/questions/11230171/git-is-changing-my-files-permissions-when-i-push-to-server#comment46417996_11231682) – torek Feb 22 '18 at 06:01
  • open terminal as admin and try again. – TheLittleNaruto Feb 22 '18 at 06:02
  • @ThelittleNaruto actually I'm on root account and doing all such testing operations. – KMG Feb 22 '18 at 06:40

0 Answers0