Git Study Material
My Real Git Experience as an Intern: Mistakes, Learning & the Right Way to Push Code
When I started working as a software intern, Git felt scary.
So many commands, branches, errors, and warnings.
But once I started using Git daily, I realized one thing:
Git is not hard — confusion comes when basics are not clear.
In this blog, I want to share my real experience using Git and GitHub, the issues I faced, and the standard way I now follow to push code safely without conflicts.
This is written specially for freshers and interns.
What is Git and GitHub?
Git is a version control system.
It helps us track changes in code, work in teams, and avoid breaking each other’s work.
GitHub is an online platform where Git repositories are stored.
Teams use it to collaborate, review code, and manage projects.
👉 Think like this:
Git = tool on your system
GitHub = cloud storage for your code
My Early Git Confusion as an Intern
When I joined my internship, I faced issues like:
Pushing code without upstream branch
Repository not found error
Forgetting to pull before push
Confusion between main branch and my own branch
At first, these errors scared me.
But instead of giving up, I searched, read documentation, and asked seniors.
That helped a lot.
The Standard Git Flow I Follow Now (No Conflicts)
This is the safe and clean process I follow every time.
Step 1: Check Current Status
git status
➡️ Shows:
Which files are modified
Which files are staged
Current branch name
This is the first command I always run.
Step 2: Add Only Required Files
git add path/to/file
or
git add filename➡️ This stages only specific files, not everything.
As an intern, this helped me avoid pushing unnecessary changes.
Step 3: Commit With a Clear Message
git commit -m "short and clear message"
➡️ Commit message should explain what you changed, not just “update”.
Example:
"fix validation toaster""update UI spacing"
Step 4: Pull Latest Code
git pull
➡️ This brings the latest changes from remote repository.
Pulling before pushing helps avoid merge conflicts.
This step saved me many times.
Step 5: Push Code From Your Branch
git push
or first time:
git push --set-upstream origin branch_name
➡️ Always push from your own branch, not main.
⚠️ Lesson learned:
Never work directly on the main branch unless your senior allows it.
Common Git Issues I Faced & What I Learned
❌ Repository Not Found
Reason:
Wrong GitHub URL
Repository not created
Solution:
Double-check repo URL
Ask senior to confirm access
❌ No Upstream Branch
Reason:
Branch not linked to remote
Solution:
git push --set-upstream origin branch_name
❌ Confusion Between Branches
Reason:
Working on wrong branch
Solution:
git branch
Always check branch before coding.
Why Freshers Must Learn Git Early
From my experience, Git taught me:
Discipline in coding
Responsibility for changes
How teamwork works in real projects
How production-level development happens
Git is not just a tool —
it’s a professional habit.
My Advice to Juniors and Freshers
Don’t fear Git errors — everyone faces them
Always pull before push
Use meaningful commit messages
Never rush directly into main branch
Ask questions, research, and learn daily
As an intern, I am still learning.
But understanding Git properly gave me confidence.
Today, I push code without fear —
because I follow the right process.
If you are a fresher starting your journey: Learn Git slowly, practice daily, and trust yourself.
Comments
Post a Comment