Git and GitHub Professional Certification exam answers 2026: This page lists all 100 questions of the official Git and GitHub Professional Certification exam by Itronix Solutions, each with its four answer options and the correct answer highlighted in green. Use it to revise every topic before you attempt the test and earn your verifiable certificate.
About this certification: Check your version control skills with Git and GitHub: repositories, commits, branches, merging, pull requests and collaboration.
| Certification | Git and GitHub Professional Certification |
| Provider | Itronix Solutions |
| Category | Programming & Development |
| Total questions | 100 multiple-choice questions |
| Marks | 1 mark per question (100 marks) |
| Passing score | 80% (80 out of 100) |
| Retake | Available if you do not pass |
| Certificate | Verifiable online certificate |
Take the exam: Git and GitHub Professional Certification on Itronix Solutions. See every other Itronix exam in our complete list of Itronix certification answers.
Git and GitHub Exam Questions and Answers
Questions 1 to 25
1. Git is a:
Correct answer: C. Distributed version control system
2. Which command creates a new local Git repository?
Correct answer: A. git init
3. Which command stages changes for the next commit?
Correct answer: B. git add
4. Which command records staged changes with a message?
Correct answer: A. git commit -m "message"
5. Which command shows the state of the working directory and staging area?
Correct answer: B. git status
6. Which command downloads a repository from GitHub to your computer?
Correct answer: C. git clone
7. git push is used to:
Correct answer: D. Upload local commits to a remote repository
8. git pull does:
Correct answer: B. Fetch and merge changes from the remote branch
9. Which command creates a new branch named feature?
Correct answer: D. git branch feature
10. A pull request on GitHub is used to:
Correct answer: D. Propose and review changes before merging
11. A merge conflict happens when:
Correct answer: D. Two branches change the same lines differently
12. Which file tells Git which files to ignore?
Correct answer: A. .gitignore
13. git log shows:
Correct answer: C. The commit history
14. Forking a repository on GitHub means:
Correct answer: A. Creating your own copy of someone else’s repository
15. HEAD in Git refers to:
Correct answer: A. The current commit or branch you are on
16. Which command switches to an existing branch in modern Git?
Correct answer: D. git switch branch-name
17. git stash is used to:
Correct answer: C. Temporarily save uncommitted changes
18. The default name commonly used for the main remote repository is:
Correct answer: B. origin
19. Which command shows differences between files?
Correct answer: D. git diff
20. GitHub Actions is used for:
Correct answer: A. Automating workflows like CI/CD
21. Git is:
Correct answer: D. A distributed version control system
22. Git was created by:
Correct answer: D. Linus Torvalds
23. GitHub is:
Correct answer: A. A cloud platform for hosting Git repositories and collaboration
24. git init is used to:
Correct answer: B. Create a new local Git repository
25. git clone is used to:
Correct answer: B. Copy a remote repository to your machine
Questions 26 to 50
26. git status shows:
Correct answer: D. The state of the working directory and staging area
27. git add moves changes to:
Correct answer: D. The staging area (index)
28. git commit -m "msg" is used to:
Correct answer: C. Record staged changes with a message
29. git log shows:
Correct answer: D. The commit history
30. git diff shows:
Correct answer: D. Line-by-line changes not yet staged
31. git diff –staged shows:
Correct answer: D. Changes that are staged for the next commit
32. A commit hash (SHA) is:
Correct answer: D. A unique identifier for a commit
33. The HEAD in Git points to:
Correct answer: D. The currently checked-out commit or branch
34. A branch in Git is:
Correct answer: B. A movable pointer to a commit for independent work
35. git branch feature creates:
Correct answer: C. A new branch named feature
36. git switch or git checkout is used to:
Correct answer: C. Change to another branch
37. git switch -c newbranch:
Correct answer: B. Creates and switches to a new branch
38. git merge feature:
Correct answer: D. Integrates the feature branch into the current branch
39. A fast-forward merge happens when:
Correct answer: C. The current branch has no new commits since branching
40. A merge conflict occurs when:
Correct answer: D. The same lines were changed differently in both branches
41. Conflict markers in a file look like:
Correct answer: A. <<<<<<<, ======= and >>>>>>>
42. After resolving conflicts you should:
Correct answer: B. Stage the files and commit
43. git rebase is used to:
Correct answer: D. Replay commits on top of another base for a linear history
44. You should avoid rebasing:
Correct answer: D. Commits that others have already pulled from a shared branch
45. git remote add origin URL:
Correct answer: C. Connects the local repo to a remote named origin
46. git push sends:
Correct answer: B. Local commits to a remote repository
47. git fetch:
Correct answer: A. Downloads remote changes without merging them
48. git pull:
Correct answer: C. Fetches and integrates remote changes into the current branch
49. git push -u origin main:
Correct answer: A. Pushes and sets upstream tracking for main
50. git stash temporarily saves:
Correct answer: C. Uncommitted changes so you can switch tasks
Questions 51 to 75
51. git stash pop:
Correct answer: B. Reapplies stashed changes and removes them from the stash
52. .gitignore is used to:
Correct answer: C. Specify files Git should not track
53. Files like node_modules or .env are usually:
Correct answer: B. Added to .gitignore
54. Secrets accidentally committed should be:
Correct answer: A. Rotated immediately and removed from history
55. git restore file:
Correct answer: A. Discards unstaged changes in the working directory
56. git reset –soft HEAD~1:
Correct answer: B. Undoes the last commit but keeps changes staged
57. git reset –hard:
Correct answer: A. Discards changes in the working directory and staging area
58. git revert creates:
Correct answer: C. A new commit that undoes a previous commit
59. git revert is safer than reset for shared branches because:
Correct answer: B. It does not rewrite published history
60. git tag v1.0 is used to:
Correct answer: A. Mark a specific commit, often a release
61. git cherry-pick applies:
Correct answer: D. A specific commit onto the current branch
62. git blame shows:
Correct answer: D. Who last changed each line of a file
63. git log –oneline shows:
Correct answer: C. A compact one-line-per-commit history
64. A fork on GitHub is:
Correct answer: A. Your own copy of someone else’s repository
65. A pull request (PR) is used to:
Correct answer: A. Propose changes and request review before merging
66. Code review in PRs helps to:
Correct answer: A. Catch bugs and share knowledge
67. GitHub Issues are used to:
Correct answer: D. Track bugs, tasks and feature requests
68. GitHub Actions is used for:
Correct answer: A. Automating workflows such as CI/CD
69. GitHub Actions workflows are defined in:
Correct answer: C. YAML files under .github/workflows
70. GitHub Pages lets you:
Correct answer: B. Host static websites from a repository
71. A README.md file usually contains:
Correct answer: D. Project description and instructions
72. Markdown is:
Correct answer: D. A lightweight formatting language used in READMEs
73. A LICENSE file defines:
Correct answer: D. How others may use the code
74. Branch protection rules can require:
Correct answer: D. Reviews and passing checks before merging
75. CODEOWNERS file specifies:
Correct answer: B. Who must review changes to certain files
Questions 76 to 100
76. Semantic commit messages help to:
Correct answer: D. Make history readable and automate changelogs
77. A good commit message:
Correct answer: C. Briefly explains what changed and why
78. Small, focused commits make it easier to:
Correct answer: D. Review, revert and understand changes
79. Git Flow uses branches such as:
Correct answer: D. main, develop, feature, release and hotfix
80. Trunk-based development favours:
Correct answer: A. Short-lived branches merged frequently into main
81. SSH keys are used with GitHub to:
Correct answer: B. Authenticate securely without typing passwords
82. Personal access tokens replace:
Correct answer: B. Passwords for HTTPS Git operations on GitHub
83. git config –global user.name sets:
Correct answer: B. The author name recorded in commits
84. A detached HEAD state means:
Correct answer: D. You are on a specific commit rather than a branch
85. git reflog helps to:
Correct answer: D. Recover lost commits by showing where HEAD has been
86. Squash merging combines:
Correct answer: A. All PR commits into a single commit on merge
87. git clean -fd removes:
Correct answer: C. Untracked files and directories
88. Submodules allow:
Correct answer: B. Including another Git repository inside a repository
89. Git LFS is used for:
Correct answer: A. Managing large binary files efficiently
90. Dependabot on GitHub helps to:
Correct answer: D. Keep dependencies updated and flag vulnerable ones
91. Secret scanning on GitHub detects:
Correct answer: B. Credentials accidentally committed
92. GitHub Discussions are used for:
Correct answer: D. Community conversations and Q&A
93. GitHub Projects boards help to:
Correct answer: B. Plan and track work visually
94. Releases on GitHub provide:
Correct answer: C. Packaged versions with notes and downloadable assets
95. GitLab and Bitbucket are:
Correct answer: B. Alternative Git hosting platforms
96. Version control mainly helps teams to:
Correct answer: C. Track changes, collaborate and recover previous versions
97. git mv renames:
Correct answer: A. A file and stages the rename
98. git rm removes:
Correct answer: D. A file from the working tree and stages the removal
99. git show displays:
Correct answer: C. Details and changes of a specific commit
100. An upstream branch is:
Correct answer: B. The remote branch a local branch tracks
How to Pass the Git and GitHub Exam
- Read every question carefully; most options look similar, so look for the most precise answer.
- Revise the questions above topic by topic rather than memorising letters, because option order can change in the live test.
- You need 80 correct answers out of 100 to pass, so aim to understand at least 85 to stay safe.
- If you do not clear it on the first attempt, review the questions you missed and use the retake option.
Frequently Asked Questions
How many questions are in the Git and GitHub Professional Certification exam?
The exam has 100 multiple-choice questions, each worth 1 mark.
What is the passing score for the Git and GitHub Professional Certification?
You need at least 80% (80 out of 100) to pass and receive the certificate.
Can I retake the Git and GitHub Professional Certification exam?
Yes. If you score below 80%, you can retry the test after reviewing the topics.
Is the Itronix certificate verifiable?
Yes. Every certificate issued by Itronix Solutions has a unique ID that can be checked on the Itronix verify-certificate page.
More Programming & Development Certification Answers
- Advanced Java Certification Exam Answers
- Android Development Certification Exam Answers
- Automation Testing Certification Exam Answers
- Blockchain Certification Exam Answers
- C & C++ Programming Language Certification Exam Answers
- Certified Quality Engineer Professional Certification Exam Answers
- Core Java Programming Professional Certification Exam Answers
- Data Structures and Algorithm Certification Exam Answers
Disclaimer: These answers are provided for learning and revision. Questions and answers are checked regularly; if you find a mistake, let us know in the comments.
Priya Dogra – Free Certifications, Exam Answers & Career Guides Free certification exam answers, courses, scholarships and career guides for learners worldwide