Download and install Git
- Download Git from https://git-scm.com.
- At Information, select Next.
- At Select Destination Location, select your preferred destination, and select Next.
- At Select Components, select your preferred components, and select Next.
- At Select Start Menu Folder, type the name that you want to appear in the start menu, and select Next.
- At Adjusting your PATH environment, check Use Git from Git Bash only and select Next.
- At Choosing the SSH executable, check Use OpenSSH and select Next.
- At Choosing HTTPS transport backend, check Use the OpenSSL library and select Next.
- At Configuring the line ending converation, check Checkout Windows-style, commit Unix-style line endings and select Next.
- At Configuring the terminal emulator to use with Git Bash, check Use MinTTY and select Next.
- At Configuring extra options, check Enable file system caching and Enable Git Credential Manager and select Install.
- Select the Windows Start icon, type git in search, and select Git Bash.
- Move to the directory where the files you want to track reside. In this example, the files reside in the C:/Users/john.doe/Sample directory.
$ cd C:/Users/john.doe/Sample
- Type git init and press enter. This will create the hidden .git folder.
In this example, the hidden .git folder is located at C:\Users\john.doe\Sample\.git.