π How to Connect Git Software and GitHub Account
Git and GitHub work best when they are connected.
Connecting them helps you save your projects online, work with others, and keep your code safe.
You can think of:
- Git as your personal notebook where you make and save code changes locally (on your computer).
- GitHub as your online locker where you upload and share those projects with others.
π§© Why Do We Connect Git and GitHub?β
When you install Git and create a GitHub account, they donβt automatically know about each other.
You have to connect them so that:
- Git knows who you are when you make changes π§
- GitHub can check that you are the owner of the code π
- Your commits (saved work) are linked to your GitHub profile π§Ύ
βοΈ Steps to Connect Git with GitHub
Follow these simple steps to connect Git and GitHub on your computer.
πͺ Step 1: Open Git Bashβ
Open Git Bash on your computer.
This is a command window where youβll type the setup commands.
πͺ Step 2: Set Your GitHub Usernameβ
Type this command to tell Git your GitHub username:
git config --global user.name "YourGitHubUsername"
β‘οΈ Replace "YourGitHubUsername" with your real GitHub username.
Example:
git config --global user.name "RoadToCode"
πͺ Step 3: Set Your GitHub Emailβ
Now, tell Git which email you used to create your GitHub account:
git config --global user.email "[email protected]"
β‘οΈ Replace "[email protected]" with your GitHub email.
Example:
git config --global user.email "[email protected]"
πͺ Step 4: Check if the Connection Workedβ
You can check if Git saved your details correctly by typing:
git config --global --list
You should see something like this:

β If you see your username and email, your Git is now connected to your GitHub account! π
π― Great job! Youβve connected Git with GitHub. Now you can create repositories, upload code, and start collaborating easily! π