Forem

Masaud Ahmod
Masaud Ahmod

Posted on

πŸš€ Why Every Beginner (Especially Non-Tech Students) Should Learn Git

πŸš€ Why Should Beginner Programmers (Especially Non-Tech Students) Learn Git?
If you're new to programming and not from a tech background, you might wonder:
_"Why should I learn Git? Isn't it for advanced developers?"
_*Well, Git is not just for experienced programmersβ€”it's a must-have tool for beginners too! Here’s why:
*

**πŸ”Ή What is Git?
**Git is a version control system that helps you track changes in your code, collaborate with others, and prevent accidental data loss. Think of it as Google Docs for your code, where you can:
βœ… Save different versions of your project
βœ… Undo mistakes easily
βœ… Work on projects without fear of breaking something
βœ… Collaborate with developers worldwide

πŸ”Ή How to Install Git Locally & Set Up a Global Git Account

Step 1: Install Git on Your System
πŸ”Ή** Windows Users**
1️⃣ Download Git from Git’s official website
2️⃣ Run the downloaded .exe file and follow the installation process
3️⃣ Choose "Git Bash" during installation (this will help you run Git commands)

πŸ”Ή** Mac Users**
1️⃣ Open Terminal and type:

brew install git
Enter fullscreen mode Exit fullscreen mode

(If you don’t have Homebrew, install it first from brew.sh)

πŸ”Ή** Linux Users**
1️⃣ Open Terminal and type:

sudo apt install git  # For Ubuntu/Debian  
sudo dnf install git  # For Fedora 
Enter fullscreen mode Exit fullscreen mode

Step 2: Verify Git Installation
After installation, open Command Prompt (Windows) / Terminal (Mac & Linux) and run:

git --version
Enter fullscreen mode Exit fullscreen mode

_If it returns something like git version 2.x.x, your installation was successful. βœ…
_
**Step 3: **Set Up Git Account Globally in Local Machine
Now, link Git with your personal identity (GitHub account).

1️⃣ Configure Your Name & Email (Globally)
Use your GitHub email and name:

git config --global user.name "Your Name"
git config --global user.email "your-email@example.com"
Enter fullscreen mode Exit fullscreen mode

Verify your setup by running:

git config --global --list
Enter fullscreen mode Exit fullscreen mode

2️⃣ Generate SSH Key & Connect GitHub (Optional but Recommended)
This step lets you push code to GitHub without entering your password every time.

Generate an SSH key:

ssh-keygen -t rsa -b 4096 -C "your-email@example.com"
Enter fullscreen mode Exit fullscreen mode

Press Enter multiple times (default options are fine). Then, copy the SSH key to GitHub:

cat ~/.ssh/id_rsa.pub
Enter fullscreen mode Exit fullscreen mode

Copy the output and paste it into GitHub under:
πŸ‘‰ GitHub Settings β†’ SSH and GPG keys β†’ New SSH key

πŸ”Ή Why is Git Important for Beginners?

1️⃣ Mistakes are normal – Git helps you roll back to a previous working version if you mess up.
2️⃣ Backup for your projects – You won’t lose progress if your computer crashes.
3️⃣ Learn team collaboration – Most companies use Git for software development.
4️⃣ Showcase your work – Platforms like GitHub act as a portfolio for developers.

πŸ”Ή Basic Git Commands Every Beginner Should Know
πŸ’» git init β†’ Start a new Git project
πŸ’» git add . β†’ Add all changes to be tracked
πŸ’» git commit -m "Your message" β†’ Save changes with a message
πŸ’» git push origin main β†’ Upload your project to GitHub
πŸ’» git clone [repo URL] β†’ Download a project from GitHub
πŸ’» git pull origin main β†’ Get the latest updates from a project

πŸ”Ή Discussion: What Confuses You About Git?
What part of Git feels difficult or confusing? Drop your questions below & let’s discuss! πŸ‘‡πŸ”₯

Top comments (0)