




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The GitHub Foundations Exam is an entry-level certification that assesses general knowledge of GitHub tools, workflows, and collaboration features. Topics include repository creation, branching, pull requests, issues and project boards, Git basics, markdown usage, and open-source contribution principles. Passing demonstrates readiness to use GitHub as a collaborative development platform.
Typology: Exams
1 / 115
This page cannot be seen from the preview
Don't miss anything!





























































































Question 1. What is the primary difference between a centralized version control system and a distributed version control system (DVCS)? A) Centralized systems store full history on each client, DVCS stores only the latest snapshot. B) DVCS allows offline commits, centralized systems require network access for every commit. C) Centralized systems use SHA-1 hashes, DVCS uses numeric IDs. D) DVCS cannot be used for large binary files, centralized systems can. Answer: B Explanation: In a DVCS like Git each developer has a complete copy of the repository, enabling commits without network connectivity. Centralized systems (e.g., Subversion) need a server connection for most operations.
Question 2. Which statement correctly distinguishes Git from GitHub? A) Git is a cloud service; GitHub is a command-line tool. B) Git is a version-control engine; GitHub provides hosting, collaboration tools, and a web UI. C) Git can only be used on Windows; GitHub works on all OSes. D) Git automatically creates pull requests; GitHub does not. Answer: B Explanation: Git is the underlying open-source VCS. GitHub is a SaaS platform that hosts Git repositories and adds features like issues, PRs, and actions.
Question 3. In Git terminology, what does a SHA-1 hash represent? A) The size of a repository in megabytes. B) A unique identifier for a commit object. C) The number of branches in a repo. D) The permission level of a user. Answer: B Explanation: Every commit in Git is identified by a 40-character SHA-1 hash that ensures integrity and uniqueness.
Question 4. Which of the following is NOT a core Git object? A) Blob B) Tree C) Commit D) Fork Answer: D Explanation: Blobs, trees, and commits are the three fundamental Git objects. A fork is a GitHub concept, not a Git object.
Question 5. What is the correct order of steps in the GitHub Flow? A) Open PR → Create branch → Merge → Delete branch → Commit B) Create branch → Commit changes → Open PR → Review → Merge → Delete branch C) Clone repo → Delete branch → Open PR → Commit → Merge
Explanation: Three hash symbols denote an H3 heading; two hashes are H2, one is H1, four are H4.
Question 8. What command clones a remote repository to your local machine? A) git fork B) git init C) git clone D) git pull Answer: C Explanation: git clone creates a copy of the remote repository locally, including all history.
Question 9. Which file is commonly used to declare the open-source license for a repository? A) README.md B) LICENSE C) CONTRIBUTING.md D) CODEOWNERS Answer: B Explanation: The LICENSE file contains the full text of the chosen open-source license.
Question 10. When viewing a repository’s network graph on GitHub, what information is primarily displayed? A) Open issues count B) Branching and merging history across forks C) List of contributors’ email addresses D) CI workflow run times Answer: B Explanation: The network graph visualizes how branches and forks diverge and merge over time.
Question 11. If two branches modify the same line of a file, what Git term describes the resulting situation when you try to merge them? A) Fast-forward merge B) Rebase conflict C) Merge conflict D) Stash conflict Answer: C Explanation: Overlapping changes on the same line cause a merge conflict that must be resolved manually.
B) The author is still working on the changes and does not want reviewers to approve yet. C) The PR has failed all status checks. D) The PR contains only documentation updates. Answer: B Explanation: Draft PRs signal that the work is incomplete, allowing reviewers to provide early feedback without formal approval.
Question 15. Which keyword automatically closes an issue when a pull request is merged? A) Fixes # B) Closes # C) Resolves # D) All of the above Answer: D Explanation: GitHub recognizes Fixes #, Closes #, and Resolves # in PR descriptions to close the referenced issue upon merge.
Question 16. When assigning a reviewer to a pull request, which permission level must the reviewer have at minimum? A) Read B) Triage C) Write
D) Admin Answer: C Explanation: Reviewers need Write permission (or higher) to comment, approve, or request changes on a PR.
Question 17. What is the primary purpose of a GitHub Issue label? A) To change the repository’s visibility. B) To categorize and filter issues for easier tracking. C) To grant write access to a user. D) To automatically merge the issue. Answer: B Explanation: Labels are metadata tags (e.g., bug, enhancement) that help organize and search issues.
Question 18. Which feature is specifically designed for community-wide Q&A, announcements, and brainstorming, separate from issues? A) Projects B) Discussions C) Wikis D) Gists Answer: B
Question 21. Which of the following is NOT a valid GitHub Actions job attribute? A) runs-on B) steps C) environment D) clone-depth Answer: D Explanation: clone-depth is an attribute for the checkout action, not a top-level job property.
Question 22. What is the purpose of a “devcontainer.json” file in a GitHub Codespace? A) To define the repository’s license. B) To configure the development environment, extensions, and container settings. C) To list all open pull requests. D) To store CI secret variables. Answer: B Explanation: devcontainer.json tells Codespaces which Docker image, VS Code extensions, and settings to provision.
Question 23. When using github.dev, which of the following is true?
A) It requires a local installation of VS Code. B) It provides a full-featured IDE with remote debugging. C) It opens the repository in a lightweight web-based editor without any installation. D) It can only edit Markdown files. Answer: C Explanation: Pressing “.`” on a GitHub repo launches the web-based editor at github.dev.
Question 24. InnerSource primarily encourages which practice within a private organization? A) Keeping all code behind closed firewalls. B) Treating internal projects as open-source, allowing any employee to contribute. C) Using only proprietary licenses. D) Disabling pull requests for security. Answer: B Explanation: InnerSource applies open-source collaboration principles (transparent code, contributions from anyone) inside an organization.
Question 25. In the new GitHub Projects (beta), which view mimics a Kanban board? A) Table view B) Board view
Explanation: Saved Replies let users quickly insert pre-written responses, improving efficiency.
Question 28. When creating a Team within a GitHub Organization, which permission can be granted at the team level? A) Admin only B) Read, Write, or Maintain (and others) across all repositories the team has access to. C) No permissions; teams are only for mentions. D) Only the ability to delete repositories. Answer: B Explanation: Teams can be assigned repository permissions such as Read, Triage, Write, Maintain, or Admin.
Question 29. Two-Factor Authentication (2FA) improves account security by requiring: A) A password and a security question. B) A password and a second factor such as an authenticator app or hardware key. C) Only a password, but entered twice. D) A biometric scan plus a password. Answer: B Explanation: 2FA adds a second verification step (e.g., OTP, hardware security key) beyond the password.
Question 30. Which repository visibility option is only available to GitHub Enterprise Cloud organizations? A) Public B) Private C) Internal D) Archived Answer: C Explanation: “Internal” repositories are visible to all members of the same enterprise but not to the public.
Question 31. What does the “Maintain” permission level allow a user to do? A) Only read the repository. B) Manage the repository’s settings, including webhooks and secrets, but not delete the repo. C) Delete the repository. D) Only merge pull requests. Answer: B Explanation: Maintain grants broad administrative rights (e.g., managing branches, settings) without full admin capabilities like deleting the repo.
A) Unused branches. B) Hard-coded API keys, tokens, or passwords committed to the repository. C) Large binary files exceeding 100 MB. D) Misspelled words in README files. Answer: B Explanation: Secret scanning searches commit history for patterns that resemble private credentials.
Question 35. When you “star” a repository on GitHub, you are primarily: A) Forking the repository. B) Adding it to your personal list of favorites for easy discovery. C) Granting yourself write access. D) Triggering a CI build. Answer: B Explanation: Starring bookmarks a repository and signals interest, but does not affect permissions.
Question 36. Which GitHub feature allows you to embed a short snippet of code that can be shared via a URL? A) Wiki B) Gist C) Project board
D) Release asset Answer: B Explanation: Gists are lightweight repositories for sharing single or multiple files, accessible via a unique URL.
Question 37. In the GitHub Marketplace, an “App” can be installed at which of the following levels? A) User account only B) Organization or repository level C) Only on private repositories D) Only on public repositories Answer: B Explanation: Marketplace apps can be scoped to an entire organization, a specific repository, or the user’s personal account.
Question 38. What is the purpose of a CODEOWNERS file? A) To list the repository’s license. B) To define default reviewers for specific paths, automatically requesting their review on PRs. C) To store CI configuration. D) To configure GitHub Pages settings. Answer: B
Question 41. What does the git rebase -i command allow you to do? A) Merge two unrelated histories automatically. B) Interactively edit, reorder, squash, or drop commits in the current branch. C) Delete the remote repository. D) Convert a repository from Git to Mercurial. Answer: B Explanation: Interactive rebase (-i) opens an editor where you can manipulate the commit list.
Question 42. Which of the following is a valid reason to delete a feature branch after merging? A) To free up storage on the remote server. B) To prevent future accidental pushes to an outdated branch. C) To hide the branch from the repository’s commit history. D) To automatically delete the associated pull request. Answer: B Explanation: Deleting merged branches reduces clutter and avoids confusion about where new work should be based.
Question 43. In a pull request review, what does the “Request changes” action indicate?
A) The reviewer approves the PR as is. B) The reviewer wants the author to modify the code before merging. C) The reviewer wants the PR to be closed immediately. D) The reviewer is assigning the PR to another team. Answer: B Explanation: “Request changes” blocks merging until the author addresses the reviewer’s feedback.
Question 44. Which Git command shows the list of remote repositories configured for the local repo? A) git remote -v B) git branch -a C) git fetch --list D) git log --remotes Answer: A Explanation: git remote -v displays the names and URLs of all remotes (origin, upstream, etc.).
Question 45. What is the effect of setting core.autocrlf to true on Windows? A) Git will automatically convert LF line endings to CRLF on checkout and back to LF on commit. B) Git will reject any file containing CRLF line endings.