I will also soon be publishing it on GeeksforGeeks
Introduction✨
In this blog, you will be learning how to install, setup and configure Git on Windows OS. This will take, like 10 minutes!, it's that easy.
Let's get started!
Step one - Installation
- Go to the download page.
- Download the Software for Windows.
- Click on the downloaded .exe file
Step two - Set-up
Allow the app to make changes to your device by clicking Yes on the User Account Control dialog that opens.
Give GNU General Public License a read, and then click on Next.
It is recommended to leave the options as default in the next few steps.
Leave the installation location on default and click on Next.
Leave the installation components on default and click on Next.
Set up will create the program's shortcut in a Start Menu folder. Click Next.
Open the drop-down menu to select a text editor of your choice. I have chosen VS Code here.
Set up for Git to name the branch after "git init". Leave it on default.
Adjusting your path environment - Select the recommended option.
The next option relates to server certificates. If you’re working in an Active Directory environment, you may need to switch to Windows Store certificates. Click Next.
Configuring the line ending conversions : Recommended to select the default option.
Choose the terminal emulator you want to use. The default MinTTY is recommended, for its features. Click on Next.
From here, the options are customizable, you can leave it default if you want.
Default option recommended. If you want to use symbolic links, which are like shortcuts for the command line, tick the box. Click Next.
Finish the Git setup
Launch Git Bash : Simply go to Start on your Windows, and then you will find a folder "Git". Click on it.
Step three - Make a test Directory
- Git command to make a new directory :
mkdir test
- To go into the test folder :
cd test
- To initialize it : Initializes an empty Git repository.
git init
- Go into the file path as shown on your terminal in the above step. As you can see below, a folder test has been created!
- To clear your terminal :
clear
Step four - Learn basic Git commands (Optional)
After making a directory, now you can add files to this directory!
You can learn Git commands from the resources in my blog below
👇
Step five - Configuration
- Configure Git with your username. Enter your full name or GitHub username in the code below.
git config --global user.name "Your-Full-Name-here"
- Configure Git with your e-mail. Enter your email address in the code below.
git config --global user.email "your-email-address-here"
Next, you can run
git config --list
- Configure Git with your chosen code editor.
If you use VSCode :
git config --global core.editor "code --wait"
If you use Sublime Text :
git config --global core.editor "'C:/Program Files/Sublime Text 2/sublime_text.exe' -n -w"
If you use Atom Editor :
git config --global core.editor "atom --wait"
You're all set up if -
✅ You've installed Git.
✅ You've configured Git with username and email.
✅ You've configured Git to your chosen editor.
Thank you for reading!🙌
Share your views in the comments down below! :)
My twitter
Like it and share it for more such articles.
Top comments (0)