Wednesday , November 18 2026
Breaking News

Git and GitHub Professional Certification Exam Answers 2026 (All 100 Questions)

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:

A. Programming language
B. Database
C. Distributed version control system ✔
D. Web browser

Correct answer: C. Distributed version control system

2. Which command creates a new local Git repository?

A. git init ✔
B. git new
C. git start
D. git create

Correct answer: A. git init

3. Which command stages changes for the next commit?

A. git push
B. git add ✔
C. git save
D. git stage-all

Correct answer: B. git add

4. Which command records staged changes with a message?

A. git commit -m "message" ✔
B. git save -m
C. git log -m
D. git push -m

Correct answer: A. git commit -m "message"

5. Which command shows the state of the working directory and staging area?

A. git show-all
B. git status ✔
C. git check
D. git info

Correct answer: B. git status

6. Which command downloads a repository from GitHub to your computer?

A. git download
B. git copy
C. git clone ✔
D. git fork

Correct answer: C. git clone

7. git push is used to:

A. Delete a branch
B. Create a repository
C. Download changes
D. Upload local commits to a remote repository ✔

Correct answer: D. Upload local commits to a remote repository

8. git pull does:

A. Only delete files
B. Fetch and merge changes from the remote branch ✔
C. Rename a repository
D. Create a commit

Correct answer: B. Fetch and merge changes from the remote branch

9. Which command creates a new branch named feature?

A. git checkout-only feature
B. git make feature
C. git new feature
D. git branch feature ✔

Correct answer: D. git branch feature

10. A pull request on GitHub is used to:

A. Delete a repository
B. Download Git
C. Change your password
D. Propose and review changes before merging ✔

Correct answer: D. Propose and review changes before merging

11. A merge conflict happens when:

A. You create a new branch
B. A file is too small
C. The internet is slow
D. Two branches change the same lines differently ✔

Correct answer: D. Two branches change the same lines differently

12. Which file tells Git which files to ignore?

A. .gitignore ✔
B. ignore.txt
C. .gitconfig only
D. README.md

Correct answer: A. .gitignore

13. git log shows:

A. Remote URLs only
B. The list of files only
C. The commit history ✔
D. Disk space

Correct answer: C. The commit history

14. Forking a repository on GitHub means:

A. Creating your own copy of someone else’s repository ✔
B. Renaming it
C. Locking it
D. Deleting it

Correct answer: A. Creating your own copy of someone else’s repository

15. HEAD in Git refers to:

A. The current commit or branch you are on ✔
B. The first commit ever
C. The largest file
D. The remote server

Correct answer: A. The current commit or branch you are on

16. Which command switches to an existing branch in modern Git?

A. git move branch-name
B. git goto branch-name
C. git jump branch-name
D. git switch branch-name ✔

Correct answer: D. git switch branch-name

17. git stash is used to:

A. Delete the repository
B. Push to GitHub
C. Temporarily save uncommitted changes ✔
D. Merge branches

Correct answer: C. Temporarily save uncommitted changes

18. The default name commonly used for the main remote repository is:

A. server
B. origin ✔
C. github
D. master-remote

Correct answer: B. origin

19. Which command shows differences between files?

A. git compare
B. git changes
C. git delta
D. git diff ✔

Correct answer: D. git diff

20. GitHub Actions is used for:

A. Automating workflows like CI/CD ✔
B. Photo editing
C. Video calls
D. Writing documents

Correct answer: A. Automating workflows like CI/CD

21. Git is:

A. A cloud hosting provider
B. A database
C. A programming language
D. A distributed version control system ✔

Correct answer: D. A distributed version control system

22. Git was created by:

A. Guido van Rossum
B. Mark Zuckerberg
C. Bill Gates
D. Linus Torvalds ✔

Correct answer: D. Linus Torvalds

23. GitHub is:

A. A cloud platform for hosting Git repositories and collaboration ✔
B. A compiler
C. The same thing as Git
D. An operating system

Correct answer: A. A cloud platform for hosting Git repositories and collaboration

24. git init is used to:

A. Push changes
B. Create a new local Git repository ✔
C. Delete a repository
D. Clone a remote repository

Correct answer: B. Create a new local Git repository

25. git clone is used to:

A. Merge branches
B. Copy a remote repository to your machine ✔
C. Delete history
D. Create an empty repo

Correct answer: B. Copy a remote repository to your machine

Questions 26 to 50

26. git status shows:

A. Commit history only
B. Remote URLs
C. Branch list only
D. The state of the working directory and staging area ✔

Correct answer: D. The state of the working directory and staging area

27. git add moves changes to:

A. The stash
B. A new branch
C. The remote repository
D. The staging area (index) ✔

Correct answer: D. The staging area (index)

28. git commit -m "msg" is used to:

A. Upload to GitHub
B. Undo changes
C. Record staged changes with a message ✔
D. Create a branch

Correct answer: C. Record staged changes with a message

29. git log shows:

A. Unstaged changes
B. Ignored files
C. Remote branches only
D. The commit history ✔

Correct answer: D. The commit history

30. git diff shows:

A. Branch names
B. Remote URLs
C. The commit log
D. Line-by-line changes not yet staged ✔

Correct answer: D. Line-by-line changes not yet staged

31. git diff –staged shows:

A. Unstaged changes
B. Pushed commits
C. Deleted branches
D. Changes that are staged for the next commit ✔

Correct answer: D. Changes that are staged for the next commit

32. A commit hash (SHA) is:

A. A password
B. A file name
C. A branch name
D. A unique identifier for a commit ✔

Correct answer: D. A unique identifier for a commit

33. The HEAD in Git points to:

A. The stash
B. The first commit always
C. The remote server
D. The currently checked-out commit or branch ✔

Correct answer: D. The currently checked-out commit or branch

34. A branch in Git is:

A. A copy of the whole disk
B. A movable pointer to a commit for independent work ✔
C. A remote server
D. A tag only

Correct answer: B. A movable pointer to a commit for independent work

35. git branch feature creates:

A. A tag
B. A remote
C. A new branch named feature ✔
D. A new repository

Correct answer: C. A new branch named feature

36. git switch or git checkout is used to:

A. Delete a branch
B. Create a remote
C. Change to another branch ✔
D. Push code

Correct answer: C. Change to another branch

37. git switch -c newbranch:

A. Merges branches
B. Creates and switches to a new branch ✔
C. Deletes a branch
D. Renames main

Correct answer: B. Creates and switches to a new branch

38. git merge feature:

A. Deletes feature
B. Renames feature
C. Pushes feature
D. Integrates the feature branch into the current branch ✔

Correct answer: D. Integrates the feature branch into the current branch

39. A fast-forward merge happens when:

A. There are conflicts
B. Branches diverged
C. The current branch has no new commits since branching ✔
D. The remote is offline

Correct answer: C. The current branch has no new commits since branching

40. A merge conflict occurs when:

A. A branch is created
B. Files are identical
C. You run git status
D. The same lines were changed differently in both branches ✔

Correct answer: D. The same lines were changed differently in both branches

41. Conflict markers in a file look like:

A. <<<<<<<, ======= and >>>>>>> ✔
B. — and ++
C. ### and ***
D. {{ and }}

Correct answer: A. <<<<<<<, ======= and >>>>>>>

42. After resolving conflicts you should:

A. Force push immediately
B. Stage the files and commit ✔
C. Run git init
D. Delete the repository

Correct answer: B. Stage the files and commit

43. git rebase is used to:

A. Clone repos
B. Create tags
C. Delete commits permanently always
D. Replay commits on top of another base for a linear history ✔

Correct answer: D. Replay commits on top of another base for a linear history

44. You should avoid rebasing:

A. Local private commits
B. Unpublished work
C. Feature branches before review
D. Commits that others have already pulled from a shared branch ✔

Correct answer: D. Commits that others have already pulled from a shared branch

45. git remote add origin URL:

A. Clones a repo
B. Creates a branch
C. Connects the local repo to a remote named origin ✔
D. Deletes the remote

Correct answer: C. Connects the local repo to a remote named origin

46. git push sends:

A. Stashes
B. Local commits to a remote repository ✔
C. Files to the trash
D. Remote commits to local

Correct answer: B. Local commits to a remote repository

47. git fetch:

A. Downloads remote changes without merging them ✔
B. Pushes code
C. Merges automatically
D. Deletes local changes

Correct answer: A. Downloads remote changes without merging them

48. git pull:

A. Pushes commits
B. Only fetches
C. Fetches and integrates remote changes into the current branch ✔
D. Deletes branches

Correct answer: C. Fetches and integrates remote changes into the current branch

49. git push -u origin main:

A. Pushes and sets upstream tracking for main ✔
B. Clones main
C. Renames main
D. Deletes main

Correct answer: A. Pushes and sets upstream tracking for main

50. git stash temporarily saves:

A. Commits permanently
B. Remote branches
C. Uncommitted changes so you can switch tasks ✔
D. Tags

Correct answer: C. Uncommitted changes so you can switch tasks

Questions 51 to 75

51. git stash pop:

A. Pushes stash
B. Reapplies stashed changes and removes them from the stash ✔
C. Creates a branch
D. Deletes all stashes

Correct answer: B. Reapplies stashed changes and removes them from the stash

52. .gitignore is used to:

A. Define branches
B. List contributors
C. Specify files Git should not track ✔
D. Store passwords

Correct answer: C. Specify files Git should not track

53. Files like node_modules or .env are usually:

A. Renamed
B. Added to .gitignore ✔
C. Committed always
D. Pushed publicly

Correct answer: B. Added to .gitignore

54. Secrets accidentally committed should be:

A. Rotated immediately and removed from history ✔
B. Shared
C. Kept for convenience
D. Ignored

Correct answer: A. Rotated immediately and removed from history

55. git restore file:

A. Discards unstaged changes in the working directory ✔
B. Creates a file
C. Pushes a file
D. Renames a file

Correct answer: A. Discards unstaged changes in the working directory

56. git reset –soft HEAD~1:

A. Creates a tag
B. Undoes the last commit but keeps changes staged ✔
C. Deletes all changes
D. Pushes the commit

Correct answer: B. Undoes the last commit but keeps changes staged

57. git reset –hard:

A. Discards changes in the working directory and staging area ✔
B. Only unstages
C. Keeps all changes
D. Creates branches

Correct answer: A. Discards changes in the working directory and staging area

58. git revert creates:

A. A deleted history
B. A tag
C. A new commit that undoes a previous commit ✔
D. A new branch

Correct answer: C. A new commit that undoes a previous commit

59. git revert is safer than reset for shared branches because:

A. It skips review
B. It does not rewrite published history ✔
C. It deletes commits
D. It is faster

Correct answer: B. It does not rewrite published history

60. git tag v1.0 is used to:

A. Mark a specific commit, often a release ✔
B. Merge code
C. Create a branch
D. Delete history

Correct answer: A. Mark a specific commit, often a release

61. git cherry-pick applies:

A. All commits
B. Only merges
C. Only tags
D. A specific commit onto the current branch ✔

Correct answer: D. A specific commit onto the current branch

62. git blame shows:

A. Remote URLs
B. Branch list
C. Deleted files
D. Who last changed each line of a file ✔

Correct answer: D. Who last changed each line of a file

63. git log –oneline shows:

A. Only authors
B. Full diffs
C. A compact one-line-per-commit history ✔
D. Only tags

Correct answer: C. A compact one-line-per-commit history

64. A fork on GitHub is:

A. Your own copy of someone else’s repository ✔
B. A tag
C. A commit
D. A local branch

Correct answer: A. Your own copy of someone else’s repository

65. A pull request (PR) is used to:

A. Propose changes and request review before merging ✔
B. Delete branches
C. Create issues only
D. Download code

Correct answer: A. Propose changes and request review before merging

66. Code review in PRs helps to:

A. Catch bugs and share knowledge ✔
B. Slow work without benefit
C. Hide changes
D. Skip testing

Correct answer: A. Catch bugs and share knowledge

67. GitHub Issues are used to:

A. Run CI only
B. Store code
C. Host websites
D. Track bugs, tasks and feature requests ✔

Correct answer: D. Track bugs, tasks and feature requests

68. GitHub Actions is used for:

A. Automating workflows such as CI/CD ✔
B. Writing documentation
C. Hosting databases
D. Designing logos

Correct answer: A. Automating workflows such as CI/CD

69. GitHub Actions workflows are defined in:

A. JSON in the root
B. Markdown files
C. YAML files under .github/workflows ✔
D. Python scripts only

Correct answer: C. YAML files under .github/workflows

70. GitHub Pages lets you:

A. Send emails
B. Host static websites from a repository ✔
C. Host Docker containers
D. Run databases

Correct answer: B. Host static websites from a repository

71. A README.md file usually contains:

A. Logs
B. Binary files
C. Passwords
D. Project description and instructions ✔

Correct answer: D. Project description and instructions

72. Markdown is:

A. A Git command
B. A database
C. A programming language
D. A lightweight formatting language used in READMEs ✔

Correct answer: D. A lightweight formatting language used in READMEs

73. A LICENSE file defines:

A. Branch rules
B. CI steps
C. Who can push
D. How others may use the code ✔

Correct answer: D. How others may use the code

74. Branch protection rules can require:

A. No commits ever
B. Deleting history
C. Public access
D. Reviews and passing checks before merging ✔

Correct answer: D. Reviews and passing checks before merging

75. CODEOWNERS file specifies:

A. CI runners
B. Who must review changes to certain files ✔
C. License terms
D. Who owns the company

Correct answer: B. Who must review changes to certain files

Questions 76 to 100

76. Semantic commit messages help to:

A. Increase file size
B. Avoid reviews
C. Hide changes
D. Make history readable and automate changelogs ✔

Correct answer: D. Make history readable and automate changelogs

77. A good commit message:

A. Is empty
B. Says "update"
C. Briefly explains what changed and why ✔
D. Is a joke

Correct answer: C. Briefly explains what changed and why

78. Small, focused commits make it easier to:

A. Avoid history
B. Hide bugs
C. Skip testing
D. Review, revert and understand changes ✔

Correct answer: D. Review, revert and understand changes

79. Git Flow uses branches such as:

A. Only tags
B. Only main
C. Only forks
D. main, develop, feature, release and hotfix ✔

Correct answer: D. main, develop, feature, release and hotfix

80. Trunk-based development favours:

A. Short-lived branches merged frequently into main ✔
B. Long-lived branches for months
C. No merges
D. No branches

Correct answer: A. Short-lived branches merged frequently into main

81. SSH keys are used with GitHub to:

A. Host pages
B. Authenticate securely without typing passwords ✔
C. Encrypt files
D. Create branches

Correct answer: B. Authenticate securely without typing passwords

82. Personal access tokens replace:

A. Branch names
B. Passwords for HTTPS Git operations on GitHub ✔
C. SSH keys always
D. Commit hashes

Correct answer: B. Passwords for HTTPS Git operations on GitHub

83. git config –global user.name sets:

A. The remote URL
B. The author name recorded in commits ✔
C. The branch name
D. The repository name

Correct answer: B. The author name recorded in commits

84. A detached HEAD state means:

A. The repository is deleted
B. You are offline
C. You have no commits
D. You are on a specific commit rather than a branch ✔

Correct answer: D. You are on a specific commit rather than a branch

85. git reflog helps to:

A. Delete history
B. Create tags
C. Push faster
D. Recover lost commits by showing where HEAD has been ✔

Correct answer: D. Recover lost commits by showing where HEAD has been

86. Squash merging combines:

A. All PR commits into a single commit on merge ✔
B. Two remotes
C. Two repositories
D. Two tags

Correct answer: A. All PR commits into a single commit on merge

87. git clean -fd removes:

A. Committed files
B. Branches
C. Untracked files and directories ✔
D. Remotes

Correct answer: C. Untracked files and directories

88. Submodules allow:

A. Deleting history
B. Including another Git repository inside a repository ✔
C. Creating tags
D. Merging repos permanently

Correct answer: B. Including another Git repository inside a repository

89. Git LFS is used for:

A. Managing large binary files efficiently ✔
B. Branch protection
C. Small text files
D. CI pipelines

Correct answer: A. Managing large binary files efficiently

90. Dependabot on GitHub helps to:

A. Design UIs
B. Host websites
C. Write code
D. Keep dependencies updated and flag vulnerable ones ✔

Correct answer: D. Keep dependencies updated and flag vulnerable ones

91. Secret scanning on GitHub detects:

A. Slow tests
B. Credentials accidentally committed ✔
C. Bugs in CSS
D. Typos

Correct answer: B. Credentials accidentally committed

92. GitHub Discussions are used for:

A. Storing secrets
B. Deploying apps
C. Running CI
D. Community conversations and Q&A ✔

Correct answer: D. Community conversations and Q&A

93. GitHub Projects boards help to:

A. Compile code
B. Plan and track work visually ✔
C. Host databases
D. Encrypt files

Correct answer: B. Plan and track work visually

94. Releases on GitHub provide:

A. Branch protection
B. Code review
C. Packaged versions with notes and downloadable assets ✔
D. Secret storage

Correct answer: C. Packaged versions with notes and downloadable assets

95. GitLab and Bitbucket are:

A. Databases
B. Alternative Git hosting platforms ✔
C. Programming languages
D. Git commands

Correct answer: B. Alternative Git hosting platforms

96. Version control mainly helps teams to:

A. Write less code
B. Avoid backups
C. Track changes, collaborate and recover previous versions ✔
D. Remove testing

Correct answer: C. Track changes, collaborate and recover previous versions

97. git mv renames:

A. A file and stages the rename ✔
B. A branch
C. A tag
D. A remote

Correct answer: A. A file and stages the rename

98. git rm removes:

A. A remote
B. A branch
C. A commit
D. A file from the working tree and stages the removal ✔

Correct answer: D. A file from the working tree and stages the removal

99. git show displays:

A. Ignored files
B. Remote URLs
C. Details and changes of a specific commit ✔
D. Stash list only

Correct answer: C. Details and changes of a specific commit

100. An upstream branch is:

A. A fork only
B. The remote branch a local branch tracks ✔
C. A tag
D. A deleted branch

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

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.

About Priya Dogra

Priya Dogra runs priyadogra.com, where she shares free certification courses, internships, jobs, scholarships and exam preparation guides for Indian students and freshers. Follow her on YouTube, LinkedIn and Instagram for the latest opportunities.

Check Also

Unix/ Linux Certification exam answers 2026

Unix/ Linux Certification Exam Answers 2026 (All 100 Questions)

All 100 Unix/ Linux Certification exam questions with correct answers highlighted - updated 2026.

Leave a Reply

Your email address will not be published. Required fields are marked *