FAQ on Git & GitHub
1. Do I need to know Git before using GitHub?
Yes, at least the basics. Git is the core tool for version control. GitHub is a platform built on top of Git. You’ll use Git commands to interact with GitHub repositories.
2. Is GitHub free to use?
Yes. GitHub offers a free plan that supports unlimited public and private repositories, unlimited collaborators, and limited GitHub Actions minutes (2,000/month for private repos). Paid plans offer more features.
3. What is the difference between main
and master
branch?
They are functionally the same. master
was the default branch name earlier; GitHub now uses main
as the default to promote more inclusive language.
4. Can I use GitHub without the command line?
Yes! GitHub offers:
- GitHub Desktop (GUI for Windows/macOS)
- GitHub web interface (create/edit files, manage repos)
- GitHub CLI (for terminal lovers)
5. What happens when I fork a repository?
A fork creates a copy of someone else’s repository in your GitHub account. You can experiment, modify, and later propose changes to the original repo using a pull request.
6. What is a .gitignore
file?
A .gitignore
file tells Git which files or folders not to track (e.g., node_modules/
, env/
, or *.log
files). It helps keep your repo clean and avoids pushing sensitive or unnecessary files.
7. How can I undo a Git mistake?
There are many ways:
git reset
to undo commits or staginggit checkout
to discard changesgit revert
to undo a commit safely
Always usegit status
to see what’s going on.
8. What are GitHub Gists?
Gists are mini GitHub repositories for sharing code snippets, notes, or small scripts. Each Gist is a Git repo — public or private.
9. How do I share my GitHub portfolio with recruiters?
- Make sure your profile is clean and organized.
- Pin your best repositories.
- Add READMEs, descriptions, and live demo links.
- Use a professional username and profile photo.
10. Can I use GitHub for non-code projects?
Absolutely. Writers, designers, data analysts, and researchers use GitHub for managing:
- Markdown notes
- Documentation
- Design systems
- Data science notebooks
Anything that benefits from version control can live on GitHub.
C++ Interview
Master C++ programming and logic-based questions.
JavaScript Interview
Crack JavaScript questions from beginner to advanced.
CSS Interview
Learn CSS tips, tricks, and layout-based interview Qs.
HTML Interview
Explore important HTML concepts and DOM-related questions.
Python Interview
From data types to OOP—Python interview Q&A for all levels.
Java Interview
Practice Java coding, OOPs, and multi-threading questions.