Skip to content

Instantly share code, notes, and snippets.

@index0h
Created October 10, 2016 16:38
Show Gist options
  • Save index0h/867ff9d9403390b8ba001eb35d6a90e1 to your computer and use it in GitHub Desktop.
Save index0h/867ff9d9403390b8ba001eb35d6a90e1 to your computer and use it in GitHub Desktop.
git-on-windows.md

Install on Windows

ATTENTION!!!

If your %HOMEPATH% contains non ASCII symbols, for example cyrillic - it's better to create another user.

Download and install Git

  • Step: Adjusting your PATH environment

Choose: Use Git from the Windows Command Prompt

  • Step: Configuring the line ending conversions

Choose: Checkout as-is, commit Unix-style line endings

  • Step: Configuring the terminal emulator to use with Git Bash

Choose: use MinTTY (the default terminal of MSys2)

Add to PATH variable real path to Git\usr\bin

For me it's: "C:\Program Files\Git\usr\bin"

Create new ssh key

  • Execute in cmd
ssh-keygen -t rsa
ssh git@gitlab.***

Create configuration for ssh forwarding to vagrant

  • Create file %HOMEPATH%.ssh\config with content:

Clone project to your working directory

cd {{ YOUR_WORKING_DIRECTORY }}

git clone git@gitlab.*****:group/project.git

Add global git configurations:

git config --global user.name "John Doe"
git config --global user.email johndoe@example.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment