After a considerable amount of research, I finally understand how to use
chmod and what file permissions in linux actually mean.
It turns out that git can commit both regular files (644 permission) and
executable files (755 permission). This is great since changing file
permissions manually after a git clone is no longer needed.
This useful feature is enabled by default, however, it seems like I
disabled it a long time ago. If this is you, simply re-enable it by
setting `filemode` to true in your .git/config.