![]() ![]() What can cause problems is using both a Windows and a Linux version of Git with the same repository. git update-index -chmod can help with that, though. As mentioned, they mark all files as executable (although the aforementioned gist may be able to help) and if that's the case, you're going to have some trouble if you need to adjust the permissions of files. gitconfig to always use LF endings.įor permissions, Windows file systems are not going to have the richness of permissions that Unix is. gitattributes file or set core.eol=lf in your per-user. Git for Windows will prompt you to select the behaviour you want, so if you turn off tocrlf, then that will be the desired behaviour for compatibility. The defaults for line endings may differ between a fresh installation of Git for Windows and a Linux Git. However, this gist may help you work through some of those issues.Īs far as hooks, I believe Windows drives pretend all files have the executable bit set, so typically hooks will work just fine for a Linux Git. Linux distros will not care that WSL breaks chmod because WSL is not something they ship or are responsible for, so there isn't going to be any interest in fixing it. If it works, then that version of Git should typically work just fine if not, then it won't for anything that involves modifying the permission of the config file ( git init or git config). You can test by running git init in a directory on your C drive and see if it pukes on running chmod(2). ![]() Sometimes that works on a Windows file system in WSL, and sometimes it doesn't. Using a Linux version of Git will expect chmod and friends to be fully functional (or at least fail silently). Many of these features and defaults are designed to work better on Windows for example, Git for Windows supports SChannel, the native Windows TLS library, and it defaults to opening manual pages in the web browser (because it doesn't ship man or roff). Git for Windows is a distribution of Git which contains a Git with some additional features and different defaults (generally those suited to Windows), along with bash, a limited version of Perl, and many Unix tools, as well as a terminal emulator. It is typically going to be configured such that using the -help option opens a manual page unless you've configured it differently, and it may or may not (depending on the distro) be configured to support the libsecret credential helper, which is standard on Linux. ![]() The Git binary as shipped with a Linux distro is going to be a pretty vanilla distribution of Git. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |