Skip to content

Instantly share code, notes, and snippets.

@kujiy
Last active March 11, 2021 14:17
Show Gist options
  • Save kujiy/00756fc547febc90dd40 to your computer and use it in GitHub Desktop.
Save kujiy/00756fc547febc90dd40 to your computer and use it in GitHub Desktop.
git init with templatedir on windows 8.1(64bit)
% git config --global init.templatedir "C:/Users/%username%/.git_template/"
# be careful the things below
-must use " not '
-must use / not \
-needed last / don't omit last /
-don't use baskslash
#-----------------------
✓ okay 1 ✓
[init]
templatedir = "C:/Users/YOURNAMEHERE/.git_template/"
✓ okay 2 ✓
[init]
templatedir = C:/Users/YOURNAMEHERE/.git_template/
-----------------------
☓ bad 1☓
use single quotation
templatedir = 'C:/Users/YOURNAMEHERE/.git_template/'
☓ bad 2☓
no last slash
templatedir = "C:/Users/YOURNAMEHERE/.git_template"
☓ bad 3☓
use backslash
templatedir = "C:\Users\YOURNAMEHERE\.git_template"
☓ bad 4☓
escape backslash
templatedir = "C:\\Users\\YOURNAMEHERE\\.git_template"
-----------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment