- during installation, set config to enabled
- edit policy, add your user on Local Comp Policy > Computer Configuration > Windows Settings > Security Settings > Local Policies > User Rights Assignment > Create symbolic links
- enable Windows Developer mode to bypass UAC requirement
- Search > For developer settings > Dev mode
-
-
Save huenisys/1efb64e57c37cfab7054c65702588fce to your computer and use it in GitHub Desktop.
Re: "search > dev settings > dev mode".
I was confused for awhile because underneath the Developer Mode heading there's only a single slider and text saying "enable installing apps from any source", but nothing about file system permissions etc. I'd read elsewhere than machines in a corporate Active Directory domain might have some developer settings disabled. These two things led me to believe I was not seeing another slider(s) for more settings. That's not the case, just use "install from any source" that is turning on dev mode!
Also see this stack overflow answer https://stackoverflow.com/a/52097145/14420 for how to recover symlinks in an existing checkout as well as ensuring symlinks is set in each repository.
For existed repo directorys, addition from git config --global core.symlinks true
as above,
I tried to set
git config --local core.symlinks true
and git reset --hard HEAD
to bring up the soft links.
Oof. Doing dev work on a corporate laptop that has overly aggressive STIGs. I wish Git would have added support for using directory junctions as a fallback option...
Enable Developer Mode from command line:
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" /t REG_DWORD /f /v "AllowDevelopmentWithoutDevLicense" /d "1"
@maphew HKEY_LOCAL_MACHINE
requires administrator access to modify.
err, yes. I c/should have noted that @James-E-A.
For sake of completeness, it's my understanding that hard- and directory junction links also require admin privs on Windows (each time they're made).
@maphew no, actually; the reason I wished Git would check out symlinks locally as directory junctions is that you can create them as an unprivileged user on Windows, and they provide a UX almost identical to Linux's symlinks.
"By default, only Administrators can create symbolic links. The security setting 'Create symbolic links' can be granted at: Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment\
Creating a symbolic link requires elevation, but from Windows 10 build 14972, symlinks can be created without needing to elevate the console as administrator - this does however require that you have Developer Mode enabled."
Hi @markcornwell
I'm not using Windows anymore but likely was referring to this:
git config --global core.symlinks true