I can't reproduce your problem with a default setup.
Checking out a repo on linux, and adding an executable file:
bp@fischer:~$ git clone https://gitlab.com/thebjorn/bpsettings.git
Cloning into 'bpsettings'...
...
Unpacking objects: 100% (6/6), 552 bytes | 276.00 KiB/s, done.
bp@fischer:~$ cd bpsettings/
bp@fischer:~/bpsettings$ ls -l
total 16
drwxrwxr-x 3 bp dkadm 4096 Sep 29 10:25 ./
drwxr-xr-x 17 bp dkadm 4096 Sep 29 10:25 ../
drwxrwxr-x 8 bp dkadm 4096 Sep 29 10:25 .git/
-rw-rw-r-- 1 bp dkadm 124 Sep 29 10:25 README.md
bp@fischer:~/bpsettings$ touch build_apk.sh
bp@fischer:~/bpsettings$ chmod +x build_apk.sh
bp@fischer:~/bpsettings$ git add build_apk.sh
bp@fischer:~/bpsettings$ git commit -am "executable bit set"
[master a302fdf] executable bit set
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100755 build_apk.sh
bp@fischer:~/bpsettings$ git push
Enumerating objects: 4, done.
Counting objects: 100% (4/4), done.
Delta compression using up to 8 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 283 bytes | 283.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To https://gitlab.com/thebjorn/bpsettings.git
d6a8a13..a302fdf master -> master
cloning on windows
(dev35) go|c:\srv\tmp> git clone https://gitlab.com/thebjorn/bpsettings.git
Cloning into 'bpsettings'...
remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 9 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (9/9), done.
(dev35) go|c:\srv\tmp> cd bpsettings
(dev35) go|c:\srv\tmp\bpsettings> ls -l
total 4
-rw-rw-rw- 1 bp 0 0 2021-09-29 10:28 build_apk.sh
-rw-rw-rw- 1 bp 0 124 2021-09-29 10:28 README.md
(I have the gnuwin32 tools installed which gives me the ls command in dos).
The permission bits here are a bit irrelevant since the executable status of a file on windows is not controlled by permissions in the same way as linux.
Changing the executable file and committing:
(dev35) go|c:\srv\tmp\bpsettings> dir > build_apk.sh
(dev35) go|c:\srv\tmp\bpsettings> git st
On branch master
Your branch is up to date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: build_apk.sh
no changes added to commit (use "git add" and/or "git commit -a")
(dev35) go|c:\srv\tmp\bpsettings> git commit -am "changes to file with linux executable bit"
[master 82ebdb2] changes to file with linux executable bit
1 file changed, 11 insertions(+)
(dev35) go|c:\srv\tmp\bpsettings> git push
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 8 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 508 bytes | 254.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To https://gitlab.com/thebjorn/bpsettings.git
a302fdf..82ebdb2 master -> master
(dev35) go|c:\srv\tmp\bpsettings>
Pulling the file on linux
bp@fischer:~/bpsettings$ git pull
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), 488 bytes | 488.00 KiB/s, done.
From https://gitlab.com/thebjorn/bpsettings
a302fdf..82ebdb2 master -> origin/master
Updating a302fdf..82ebdb2
Fast-forward
build_apk.sh | 11 +++++++++++
1 file changed, 11 insertions(+)
bp@fischer:~/bpsettings$ ls -l
total 20
drwxrwxr-x 3 bp dkadm 4096 Sep 29 10:29 ./
drwxr-xr-x 17 bp dkadm 4096 Sep 29 10:29 ../
drwxrwxr-x 8 bp dkadm 4096 Sep 29 10:29 .git/
-rw-rw-r-- 1 bp dkadm 124 Sep 29 10:25 README.md
-rwxrwxr-x 1 bp dkadm 391 Sep 29 10:29 build_apk.sh*
bp@fischer:~/bpsettings$
The executable bits are still there...
My umask and git version on linux:
bp@fischer:~/bpsettings$ umask
0002
bp@fischer:~/bpsettings$ git --version
git version 2.25.1
git version and permissions on windows:
(dev35) go|c:\srv\tmp\bpsettings> git --version
git version 2.21.0.windows.1
(dev35) go|c:\srv\tmp\bpsettings> icacls .
. BUILTIN\Administrators:(I)(OI)(CI)(F)
NT AUTHORITY\SYSTEM:(I)(OI)(CI)(F)
BUILTIN\Users:(I)(OI)(CI)(RX)
NT AUTHORITY\Authenticated Users:(I)(M)
NT AUTHORITY\Authenticated Users:(I)(OI)(CI)(IO)(M)
Successfully processed 1 files; Failed processing 0 files