1οΈβ£ What is Git?
A: Git is a distributed version control system to track changes in source code during development.
2οΈβ£ What is GitHub?
A: GitHub is a cloud-based platform that hosts Git repositories and supports collaboration, issue tracking, and CI/CD.
3οΈβ£ Git vs GitHub
- Git: Version control tool (local)
- GitHub: Hosting service for Git repositories (cloud-based)
4οΈβ£ What is a Repository (Repo)?
A: A storage space where your projectβs files and history are saved.
5οΈβ£ Common Git Commands:
-
git initβ Initialize a repo -
git cloneβ Copy a repo -
git addβ Stage changes -
git commitβ Save changes -
git pushβ Upload to remote -
git pullβ Fetch and merge from remote -
git statusβ Check current state -
git logβ View commit history
6οΈβ£ What is a Commit?
A: A snapshot of your changes. Each commit has a unique ID (hash) and message.
7οΈβ£ What is a Branch?
A: A separate line of development. The default branch is usually main or master.
8οΈβ£ What is Merging?
A: Combining changes from one branch into another.
9οΈβ£ What is a Pull Request (PR)?
A: A GitHub feature to propose changes, request reviews, and merge code into the main branch.
π What is Forking?
A: Creating a personal copy of someone elseβs repo to make changes independently.
1οΈβ£1οΈβ£ What is .gitignore?
A: A file that tells Git which files/folders to ignore (e.g., logs, temp files, env variables).
1οΈβ£2οΈβ£ What is Staging Area?
A: A space where changes are held before committing.
1οΈβ£3οΈβ£ Difference between Merge and Rebase
- Merge: Keeps all history, creates a merge commit
- Rebase: Rewrites history, makes it linear
1οΈβ£4οΈβ£ What is Git Workflow?
A: A set of rules like Git Flow, GitHub Flow, etc., for how teams manage branches and releases.
1οΈβ£5οΈβ£ How to Resolve Merge Conflicts?
A: Manually edit the conflicted files, mark resolved, then commit the changes.
π¬ Tap β€οΈ if you found this useful!
Top comments (0)