Git & GitHub Workflow Quiz.

Git & GitHub Workflow Quiz.

1. What does Git primarily track?

A) Files
B) Changes in files
C) Folders
D) Servers
Answer: B

2. Which command initializes a new Git repository?

A) git start
B) git init
C) git new
D) git create
Answer: B

3. Which command stages changes?

A) git stage
B) git add
C) git push
D) git save
Answer: B

4. Which command records staged changes?

A) git commit
B) git push
C) git record
D) git save
Answer: A

5. Which command uploads local commits to a remote repository?

A) git upload
B) git push
C) git sync
D) git send
Answer: B

6. Which command downloads changes from a remote repository?

A) git fetch
B) git pull
C) git clone
D) git download
Answer: B

7. What does git clone do?

A) Deletes repo
B) Copies repository locally
C) Commits changes
D) Merges branches
Answer: B

8. What is a branch in Git?

A) A folder
B) A copy of a file
C) A parallel line of development
D) A remote server
Answer: C

9. Command to create a new branch?

A) git branch new
B) git new branch
C) git branch <name>
D) git checkout new
Answer: C

10. Switch branches using:

A) git change
B) git checkout
C) git move
D) git swap
Answer: B

11. Modern command to switch branches:

A) git change
B) git switch
C) git move
D) git branch switch
Answer: B

12. Merge one branch into another using:

A) git combine
B) git merge
C) git join
D) git attach
Answer: B

13. What causes a merge conflict?

A) Same file changed differently in branches
B) File deleted
C) Branch renamed
D) Commit message error
Answer: A

14. Command to see commit history:

A) git status
B) git log
C) git history
D) git show
Answer: B

15. What does git status show?

A) Remote commits
B) Current repo state
C) Deleted files only
D) Git version
Answer: B

16. What is a remote repository?

A) Local folder
B) Cloud-hosted Git repo
C) Backup file
D) Branch copy
Answer: B

17. Default branch name commonly used today:

A) master
B) main
C) primary
D) root
Answer: B

18. What is a Pull Request (PR) on GitHub?

A) Delete request
B) Feature request
C) Proposal to merge changes
D) Clone request
Answer: C

19. What does git fetch do?

A) Merge changes
B) Download changes without merging
C) Delete branch
D) Push commits
Answer: B

20. Command to delete a local branch:

A) git remove branch
B) git delete
C) git branch -d
D) git erase
Answer: C

21. What is .gitignore used for?

A) Ignoring commits
B) Ignoring files from tracking
C) Ignoring branches
D) Ignoring users
Answer: B

22. What does git reset do?

A) Creates branch
B) Undo changes
C) Push changes
D) Fetch remote
Answer: B

23. What is git stash used for?

A) Save uncommitted changes temporarily
B) Delete commits
C) Push changes
D) Merge branches
Answer: A

24. What is a fork on GitHub?

A) Branch
B) Copy of repo to your account
C) Commit
D) Issue
Answer: B

25. What is an Issue in GitHub?

A) Bug tracking item
B) Commit
C) Branch
D) Merge tool
Answer: A

26. What does git remote -v show?

A) Version
B) Remote URLs
C) Branch list
D) Commit history
Answer: B

27. What is origin in Git?

A) Default branch
B) Default remote name
C) Local repo
D) Commit tag
Answer: B

28. What is rebasing?

A) Deleting branch
B) Rewriting commit history
C) Staging changes
D) Pushing commits
Answer: B

29. Command to see branches:

A) git show
B) git branch
C) git list
D) git view
Answer: B

30. Fast-forward merge occurs when:

A) Conflict exists
B) No new commits in target branch
C) Branch deleted
D) Rebase used
Answer: B

31. What does git diff show?

A) File history
B) Differences between changes
C) Remote URL
D) Branch name
Answer: B

32. What is a tag in Git?

A) Branch
B) Named reference to a commit
C) Folder
D) Issue
Answer: B

33. Command to create a tag:

A) git tag <name>
B) git create tag
C) git label
D) git mark
Answer: A

34. What does git pull equal?

A) fetch + merge
B) fetch only
C) merge only
D) push + merge
Answer: A

35. What is CI/CD commonly integrated with GitHub?

A) Code reviews
B) Automated testing & deployment
C) File storage
D) Documentation only
Answer: B

36. What is a protected branch?

A) Cannot commit
B) Cannot delete
C) Restricted merging rules
D) Hidden branch
Answer: C

37. What is a commit hash?

A) Branch name
B) Unique identifier for commit
C) Password
D) Folder
Answer: B

38. Command to amend last commit:

A) git commit –fix
B) git amend
C) git commit –amend
D) git fix
Answer: C

39. What does HEAD represent?

A) First commit
B) Current branch pointer
C) Remote repo
D) Deleted file
Answer: B

40. What is cherry-picking?

A) Deleting commit
B) Selecting specific commit to apply
C) Merging branch
D) Rebasing
Answer: B

41. What is GitHub Actions?

A) Branch type
B) Automation tool
C) Commit tool
D) Fork option
Answer: B

42. What is squash merge?

A) Delete branch
B) Combine commits into one
C) Rebase
D) Reset
Answer: B

43. What is upstream in Git?

A) Original repository
B) Local branch
C) Tag
D) Commit
Answer: A

44. Command to set upstream branch:

A) git set upstream
B) git push -u origin branch
C) git upstream
D) git remote set
Answer: B

45. What does git revert do?

A) Deletes history
B) Creates new commit that undoes changes
C) Resets repo
D) Deletes branch
Answer: B

46. What is code review?

A) Delete code
B) Reviewing changes before merging
C) Running tests
D) Reset branch
Answer: B

47. What is a draft PR?

A) Deleted PR
B) In-progress pull request
C) Approved PR
D) Merged PR
Answer: B

48. What is a detached HEAD?

A) Branch deleted
B) HEAD pointing to commit instead of branch
C) Remote issue
D) Fork error
Answer: B

49. Command to rename branch:

A) git branch -m
B) git rename
C) git branch rename
D) git mv branch
Answer: A

50. Best practice for workflow?

A) Commit directly to main
B) Use feature branches + PR
C) Never pull
D) Never merge
Answer: B

Conclusion.

Mastering Git and GitHub workflows is essential for every modern developer. Whether you’re collaborating on team projects, contributing to open source, or managing your own applications, understanding branching strategies, pull requests, rebasing, and version control best practices gives you a serious professional advantage.

This 50-question quiz wasn’t just about memorizing commands like git commit or git push. It was designed to test your understanding of real-world workflows used daily on platforms like GitHub.

If you scored:

  • 45–50 → 🔥 Advanced Git Pro
  • 35–44 → 💪 Strong Workflow Knowledge
  • 20–34 → 📈 Intermediate (Keep Practicing!)
  • Below 20 → 🚀 Time to Review the Fundamentals

Remember:
Version control isn’t just about tracking changes it’s about collaboration, safety, and clean project management.

Keep practicing:

  • Create feature branches
  • Open pull requests
  • Review code
  • Resolve merge conflicts
  • Contribute to open-source projects

The more you use Git in real projects, the more natural it becomes.

shamitha
shamitha
Leave Comment
Share This Blog
Recent Posts
Get The Latest Updates

Subscribe To Our Newsletter

No spam, notifications only about our New Course updates.

Enroll Now
Enroll Now
Enquire Now