YouTube video
Step 1: Download Git
Visit the Official Git Website:
Open your browser and go to the official Git website:
https://git-scm.com/Download the Installer:
- Click the Download for Windows button.
- The website automatically detects your operating system and downloads the appropriate version.
Step 2: Run the Git Installer
Locate the Installer:
Navigate to your Downloads folder and find the file (e.g.,Git-<version>-64-bit.exe
).Run the Installer:
Double-click the installer to launch the setup wizard.
Step 3: Configure the Installation
License Agreement:
- Read and accept the license agreement by clicking Next.
Select Installation Folder:
- Choose the installation location or use the default:
C:\Program Files\Git
- Click Next.
- Choose the installation location or use the default:
Select Components:
- Leave the default options selected unless you have specific requirements.
- Ensure the following are selected:
- Git Bash Here: Adds Git Bash to the right-click context menu.
- Git GUI Here: Adds Git GUI to the context menu.
Choose the Default Editor:
- Select your preferred text editor for Git. The default is Vim, but you can choose Notepad++, Visual Studio Code, or others.
Adjust PATH Environment:
- Choose Git from the command line and also from 3rd-party software to make Git commands accessible globally.
- Click Next.
Select HTTPS Backend:
- Use the default setting: Use the OpenSSL library.
- Click Next.
Configure Line Endings:
- Select Checkout Windows-style and commit Unix-style line endings.
- Click Next.
Terminal Emulator:
- Choose Use MinTTY (the default terminal for Git Bash) for a better command-line experience.
- Click Next.
Enable Additional Features:
- Leave the default options selected or customize them based on your needs.
Start Installation:
- Click Install and wait for the installation to complete.
Finish the Installation:
- Check Launch Git Bash if you want to open it immediately after installation.
- Click Finish.
Step 4: Verify the Installation
Open Git Bash:
- Search for Git Bash in the Start menu and open it.
Check Git Version:
- Run the following command:
git --version
- You should see the installed version of Git (e.g.,
git version 2.x.x
).
- Run the following command:
Step 5: Configure Git
To use Git effectively, you need to set your user name and email address. These are used to identify changes in your commits.
Set User Name:
git config --global user.name "Your Name"
Set Email Address:
git config --global user.email "your.email@example.com"
Verify Configuration:
- Run the following command to check your configuration:
git config --list
- This will display your user name, email, and other global settings.
- Run the following command to check your configuration:
Optional: Use Git with a Graphical User Interface (GUI)
If you prefer a visual interface, Git also includes a GUI tool. You can launch it from the Start menu or right-click in a folder and select Git GUI Here.
Conclusion
You’ve successfully installed Git on Windows 11 and configured it for use. You can now start managing your projects with Git, whether using the command line or the GUI. Explore Git's powerful features like branching, merging, and collaboration with tools like GitHub to enhance your development workflow. Happy coding!
Comments
Post a Comment
Leave Comment