Skip to content
Marius Storhaug edited this page Dec 23, 2021 · 2 revisions

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

Git is easy to learn and has a tiny footprint with lightning fast performance. It outclasses SCM tools like Subversion, CVS, Perforce, and ClearCase with features like cheap local branching, convenient staging areas, and multiple workflows.

Download

Download Git today!

If you are using Windows 10 and have winget, you can use the following command to install Git.

winget install Git.Git --silent

Configure

The following steps should be performed as soon as you have downloaded and installed Git

git config --global user.name "FIRST_NAME LAST_NAME"
git config --global user.email "MY_NAME@example.com"

Long file paths

git config --system core.longpaths true
#required run-as admin
Set-ItemProperty 'HKLM:\System\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled' -value 1

Sitting behind a proxy

    git config --global http.proxy <proxy path>
    git config --global http.sslVerify false

GPG Signing (Signing commits)

    #$gpg = New-Object -ComObject gpg.application
    #$gpg.sign_key('<key id>')
if (Test-Path -Path 'c:\Program Files\Git\usr\bin\gpg.exe') {
    $Git_Executable = 'c:\Program Files\Git\usr\bin\gpg.exe'
} else {
    winget install --id gnuPG.Gpg4win --silent
    $Git_Executable = 'C:\Program Files (x86)\GnuPG\bin\gpg.exe'
}



gpg --full-generate-key
gpg --armor --export <keyID> | clip
gpg --edit-key <keyID>
adduid

git config --global user.signingkey <keyID>
git config --global commit.gpgsign true
git config --global gpg.program $Git_Executable
git config --global gpg.use-agent true
git config --global gpg.passphrase-fd 0

    git config --global user.signingkey <key id>
    git config --global commit.gpgsign true

References

Clone this wiki locally