Git Setup
March 13, 2022
March 13, 2022
Updated: December 10, 2022
Here is my basic flow for setting up git
. My repository
is rather large so I need to perform some special steps on Windows to
get it working right.
Install git using chocolatey
choco install git
refreshenv
Or if you prefer to just use the installer, make sure you checkout
and commit as UNIX if you’re all about that lf
life!
Long File Paths Configuration
On Windows, using regedit
, navigate to:
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\FileSystem
Then set registry key LongPathsEnabled
from
0
to 1
.
Configure Git
git config --global core.longpaths true
git config --global user.name "Username"
git config --global user.email "user@example.com"
If you want to scope down to individual repositories, try this at the root of your repository
git config --global core.longpaths true
git config --local user.name "Username"
git config --local user.email "user@example.com"
Conclusion
That’s pretty much it!