Skip to main content

git for Windows: notes from the field

Git for Windows
Git for Windows

Download link

https://git-scm.com/download/win

Installation













Configuration

There are three levels of configuation: system, global, and local.

Config file location
    --system              use system config file
    --global              use global config file
    --local               use repository config file
C:\Users\tuyendq>git config --global user.name "Tuyen Dang"

C:\Users\tuyendq>git config --global user.email tuyendq@company.com

C:\Users\tuyendq>git config --global core.editor "'C:\Program Files (x86)\Microsoft VS Code\Code.exe' -multiInst -nosession"

C:\Users\tuyendq>git config --list
core.symlinks=false
core.autocrlf=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
help.format=html
http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
sendemail.smtpserver=/bin/msmtp.exe
diff.astextplain.textconv=astextplain
rebase.autosquash=true
credential.helper=manager
user.name=Tuyen Dang
user.email=tuyendq@company.com
core.editor='C:\Program Files (x86)\Microsoft VS Code\Code.exe' -multiInst -nosession

C:\Users\tuyendq>
git config --global init.defaultBranch main

Popular posts from this blog

Linux command: wc - word count

Sharon McCutcheon on Unsplash "/> wc - print newline, word, and byte counts for each file

error setting certificate verify locations when run git clone

I run into this error while using git clone. D:\Projects>git clone https://github.com/jonmountjoy/facebook-template-ruby Cloning into 'facebook-template-ruby'... fatal: unable to access 'https://github.com/jonmountjoy/facebook-template-ruby/': error setting certificate verify locations:   CAfile: C:/Program Files (x86)/Git/mingw32/ssl/certs/ca-bundle.crt   CApath: none How to fix Run DOS Prompt as Administrator, and run git config --system http.sslcainfo "Path to ca-bundle.crt" Microsoft Windows [Version 10.0.10586] (c) 2015 Microsoft Corporation. All rights reserved. C:\WINDOWS\system32> git config --system http.sslcainfo "C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt" C:\WINDOWS\system32> Then, I can run git clone successfully. D:\Projects>git clone https://github.com/jonmountjoy/facebook-template-ruby Cloning into 'facebook-template-ruby'... remote: Counting objects: 177, done. remote: Total 1...