All question banksWeb Development
Git & GitHub Questions Comprehensive guide to Version Control basics, core Git commands, branching strategies, and remote synchronization. Essential for developers and DevOps engineers.
1. What is Version Control? Beginner 2. Why use Version Control? Beginner 4. What is the difference between Git and GitHub? Beginner 5. What is the difference between Git and other VCS (SVN, Mercurial)? Intermediate 6. How do you install Git locally? Beginner 7. What is git init? Beginner 8. What is git config? Beginner 9. What is the difference between local and global config? Intermediate 10. How do you set username and email in Git? Beginner 11. What is a Git repository? Beginner 12. What is the difference between local and remote repository? Beginner 13. What is Working Directory? Beginner 14. What is Staging Area (Index)? Intermediate 15. What is the .git folder? Intermediate 16. What is git status? Beginner 17. What is git add? What does it do? Beginner 18. What is the difference between git add . and git add -A? Intermediate 19. What is git commit? Beginner 20. What is the difference between git commit -m and git commit -am? Intermediate 21. What is git log? What options can you use with it? Beginner 22. What is git diff? Beginner 23. What is the difference between git diff and git diff --staged? Intermediate 24. What is .gitignore? How does it work? Beginner 25. How do you ignore files that are already tracked? Advanced 26. What is git rm? Beginner 27. What is the difference between git rm and rm? Intermediate 28. What is git mv? Beginner 29. How do you view commit history? Beginner 30. What is HEAD in Git? Intermediate 31. What is a branch in Git? Beginner 32. Why do we use branches? Beginner 33. What is the default branch name? Beginner 34. What is git branch? Beginner 35. How do you create a new branch? Beginner 36. What is git checkout? Beginner 37. What is the difference between git checkout and git switch? Intermediate 38. How do you create and switch to a branch in one command? Beginner 39. What is git branch -d vs git branch -D? Intermediate 40. How do you rename a branch? Intermediate 41. How do you delete a branch? Beginner 42. What is git merge? Intermediate 43. What are the types of merges (Fast-forward, 3-way merge)? Advanced 44. What is a merge conflict? Intermediate 45. How do you resolve merge conflicts? Intermediate 46. What is a remote repository? Beginner 47. What is git remote? Beginner 48. How do you add a remote repository? Beginner 49. What is origin in Git? Beginner 50. What is git clone? Beginner 51. What is the difference between cloning and forking? Intermediate 52. What is git fetch? Intermediate 53. What is git pull? Beginner 54. What is the difference between git fetch and git pull? Intermediate 55. What is git push? Beginner 56. What is git push -u origin main? What does -u do? Intermediate 57. What is git push --force? When should you use it? Advanced 58. What is upstream branch? Intermediate 59. How do you set upstream branch? Intermediate 60. How do you delete a remote branch? Intermediate 61. What is GitHub? Beginner 62. How do you create a repository on GitHub? Beginner 63. What is the difference between public and private repositories? Beginner 64. What is a README file? Why is it important? Beginner 65. What is Markdown? Beginner 66. How do you write a good README? Intermediate 67. What are GitHub Issues? Beginner 68. What is a Pull Request (PR)? Beginner 69. What is the difference between Pull Request and Merge Request? Beginner 70. How do you create a Pull Request? Beginner 71. What are PR guidelines and best practices? Intermediate 72. What is code review? Beginner 73. How do you label issues and PRs? Beginner 74. What is forking? Beginner 75. What is the difference between fork and clone? Intermediate 76. How do you fork a repository? Beginner 77. What is a PR from a fork? Intermediate 78. How do you sync a forked repository? Advanced 79. What are collaborators in GitHub? Beginner 80. How do you add collaborators to a repository? Beginner 81. What are mentions (@username)? Beginner 82. What are reactions in GitHub? Beginner 83. What is commenting on PRs and commits? Intermediate 84. What are saved replies? Beginner 85. What are GitHub Discussions? Intermediate 86. What is branch naming convention? Beginner 87. What are commit message best practices? Intermediate 88. What is conventional commits? Advanced 89. What is Fast-Forward merge? Intermediate 90. What is Non-Fast-Forward merge? Advanced 91. What is git merge --no-ff? Advanced 92. What is Squash merge? Advanced 93. What is Rebase? Advanced 94. What is the difference between merge and rebase? Advanced 95. When should you use rebase vs merge? Advanced 96. What is Cherry-picking commits? Advanced 97. What is handling merge conflicts? Intermediate 98. What is merge conflict resolution strategies? Intermediate 99. What is git stash? Intermediate 100. When do you use git stash? Intermediate 101. What is git stash pop vs git stash apply? Intermediate 102. What is git stash list? Beginner 103. What is Detached HEAD state? Advanced 104. What is git checkout <commit-hash>? Intermediate 105. What is git log --oneline? Beginner 106. What is git log --graph? Intermediate 107. What is Linear vs Non-Linear history? Advanced 108. What is git reset? Intermediate 109. What are the types of reset: --soft, --mixed, --hard? Advanced 110. What is the difference between git reset --soft and --hard? Advanced 111. What is git revert? Intermediate 112. What is the difference between git reset and git revert? Advanced 113. When should you use reset vs revert? Intermediate 114. What is git checkout -- <file>? Beginner 115. What is git restore? Intermediate 116. How do you undo the last commit? Intermediate 117. How do you undo changes in working directory? Beginner 118. How do you undo staged changes? Intermediate 119. What is git clean? Intermediate 120. What is the difference between git clean -n and git clean -f? Intermediate 121. How do you view differences between commits? Beginner 122. How do you view differences between branches? Intermediate 123. What is git diff HEAD? Intermediate 124. How do you view changes in a specific file? Beginner 125. What is git commit --amend? Intermediate 126. When do you use git commit --amend? Intermediate 127. What is git rebase -i (interactive rebase)? Advanced 128. What is git filter-branch? Advanced 129. What is git push --force-with-lease? Advanced 130. What is rewriting commit history? Advanced 131. Why is rewriting history dangerous in shared branches? Advanced 132. What are GitHub Projects? Beginner 133. What is project planning on GitHub? Beginner 134. What are Kanban boards? Beginner 135. What are roadmaps in GitHub Projects? Intermediate 136. What are automations in GitHub Projects? Intermediate 137. What are GitHub Organizations? Beginner 138. What is the difference between user account and organization? Beginner 139. What are teams within organizations? Beginner 140. How do you add collaborators and members? Beginner 141. What are GitHub Actions? Intermediate 142. What is CI/CD? Intermediate 143. What is a workflow in GitHub Actions? Intermediate 144. What is YAML syntax for workflows? Intermediate 145. What are workflow triggers (push, pull_request, schedule)? Intermediate 146. What are scheduled workflows (cron jobs)? Intermediate 147. What are workflow runners? Advanced 148. What is workflow context? Advanced 149. What are secrets and environment variables? Intermediate 150. What are GitHub Actions use cases? Intermediate 151. What are client-side hooks vs server-side hooks? Advanced 152. What is caching dependencies in workflows? Advanced 153. What are storing artifacts in workflows? Intermediate 154. What is workflow status? Beginner 155. What are marketplace actions? Beginner 156. What is GitHub CLI? Intermediate 157. How do you install and set up GitHub CLI? Beginner 158. How do you manage repositories using CLI? Intermediate 159. How do you manage issues using CLI? Intermediate 160. How do you manage pull requests using CLI? Intermediate 161. What is GitHub REST API? Advanced 162. What is GitHub GraphQL API? Advanced 163. What is the difference between REST and GraphQL API? Expert 164. What is Git Reflog? Advanced 165. What is Git Bisect? Expert 166. What is Git Worktree? Expert 167. What is Git Attributes? Advanced 168. What is Git LFS (Large File Storage)? Intermediate 169. When do you need Git LFS? Intermediate 170. What are Git Hooks? Advanced 171. What are client-side hooks (pre-commit, post-commit, pre-push)? Advanced 172. What are server-side hooks? Expert 173. What are submodules in Git? Advanced 174. What is the difference between submodules and subtrees? Expert 175. How do you add and update submodules? Advanced 176. What are GitHub Pages? Beginner 177. How do you deploy a static website on GitHub Pages? Beginner 178. What are custom domains in GitHub Pages? Intermediate 179. What are static site generators (Jekyll)? Intermediate 180. What is GitHub Copilot? Beginner 181. What are GitHub Gists? Beginner 182. What are GitHub Packages? Intermediate 183. What is GitHub Codespaces? Beginner 184. What is GitHub Marketplace? Beginner 185. What is GitHub Education? Beginner 186. What is Student Developer Pack? Beginner 187. What is GitHub Classroom? Intermediate 188. What is Campus Program? Intermediate 189. What is GitHub Security? Intermediate 190. What is GitHub Sponsors? Beginner 191. What is Dependabot? Beginner 192. What is Secret Scanning? Intermediate 193. What is CodeQL? Advanced 194. What are GitHub environment secrets? Advanced 195. What is the GitHub advisory database? Intermediate 196. What are GitHub organizations vs personal accounts for security? Intermediate 197. What is the difference between Git cherry-pick and merge? Advanced 198. How do you undo a git rebase? Expert 199. What is git blame? Beginner 200. What is a bare repository? Advanced