This document serves as a beginner-friendly guide to understanding and using Git, a powerful version control system. It introduces Git's core purpose, explains commonly used commands such as cloning repositories, checking status, creating and switching branches, staging and committing changes, pushing and pulling updates, and merging branches. It also includes a image for a visual diagram to reinforce understanding of Git workflows. This guide aims to help new developers confidently manage code changes, collaborate on projects, and maintain clean development practices using Git.
Git is a free and open-source distributed version control system. It helps developers track changes in source code during software development, coordinate work among team members, and manage code history efficiently.
# Set your name
git config --global user.name "daretechie"
# Set your email
git config --global user.email "deeprince2020@gmail.com"Here are some essential Git commands to get you started:
git clone <repository_url>Copies a remote repository to your local machine.
git statusShows the current status of files in the working directory and staging area.
git branch <branch_name>Creates a new branch.
###🔹 Switch to a Branch
git checkout <branch_name>Switches to the specified branch.
git checkout -b <branch_name>Creates a new branch and switches to it immediately.
git add <file_name>
# or add all files
git add .git commit -m "Your commit message"Saves the staged changes with a message.
git push origin <branch_name>git pullFetches and merges changes from the remote repository into your current branch.
git merge <branch_name>Merges the specified branch into your current branch.
The html index is here.
✅ Tips
-
Always pull before you push to avoid merge conflicts.
-
Use meaningful commit messages.
-
Branching helps in managing features, bug fixes, and experiments without affecting the main codebase.









