GH-900 · Domain 1: Understand Git and GitHub basics · 30% of the exam
Task 1.2: Working with GitHub
Personal, organization and enterprise accounts and plans, GitHub flow, Markdown in issues and pull requests, and when GitHub Desktop, GitHub Mobile or GitHub CLI fits.
Study it
Personal, organization and enterprise accounts, plans and deployment options
Lesson coming
GitHub flow from branch to merge
Lesson coming
Writing on GitHub with Markdown
Lesson coming
GitHub Desktop, GitHub Mobile and GitHub CLI: which tool when
Lesson coming
Sample questions
Try each one before opening the answer. Every option is explained, with the GitHub documentation page that proves it.
Question 1 · choose 1
A startup creates a GitHub organization for its product. The founder suggests one shared username and password that everyone uses to sign in to the organization. How does GitHub expect this to work?
AThe organization gets its own password, which the owner shares with members
BEach person signs in to their own user account and is added to the organization as a member
CEveryone signs in to the founder's personal account, which owns the organization and its repositories
DOne machine user account is created for the team, and everyone signs in to it
Show the answer and why
AThe organization gets its own password, which the owner shares with members
Incorrect
Organizations have no sign-in of their own.
BEach person signs in to their own user account and is added to the organization as a member
Correct
You can't sign in to an organization; members use their own user accounts, and their actions are attributed to them.
CEveryone signs in to the founder's personal account, which owns the organization and its repositories
Incorrect
Each person needs their own user account; actions are attributed to the account that takes them.
DOne machine user account is created for the team, and everyone signs in to it
Incorrect
Machine users are for automation, not for people sharing one identity.
Every person who uses GitHub signs in to a user account. Organizations are shared accounts where many people collaborate, but nobody signs in to an organization: each person signs in to their user account, and actions on organization resources are attributed to that account. Members get roles that set their access.
A freelance developer keeps client work in private repositories owned by her personal account. She now wants protected branches and a wiki in those repositories, and wants to pay as little as possible. Which plan should she choose?
AGitHub Team for her personal account
BGitHub Pro for her personal account
CGitHub Free, which already includes these tools in private repositories
DGitHub Enterprise Cloud with a new enterprise account
Show the answer and why
AGitHub Team for her personal account
Incorrect
GitHub Team is a plan for organizations, not for personal accounts.
BGitHub Pro for her personal account
Correct
GitHub Pro adds protected branches, wikis and other advanced tools to private repositories of a personal account.
CGitHub Free, which already includes these tools in private repositories
Incorrect
GitHub Free gives private repositories a limited feature set without these tools.
DGitHub Enterprise Cloud with a new enterprise account
Incorrect
That plan is for organizations and enterprises and costs more than she needs.
Personal accounts use GitHub Free or GitHub Pro. GitHub Free covers public repositories with a full feature set but private repositories with a limited one. GitHub Pro adds advanced tools to private repositories, including required reviewers, protected branches, code owners, wikis and repository insights graphs. GitHub Team and GitHub Enterprise are plans for organizations and enterprises.
A writer on the documentation team wants to fix a page in the team's repository and follow GitHub flow. What is her first step?
AOpen a pull request against the default branch
BCommit the fix directly to the default branch
CAsk an administrator to protect the default branch
DCreate a branch with a short, descriptive name
Show the answer and why
AOpen a pull request against the default branch
Incorrect
A pull request comes after changes have been committed and pushed to a branch.
BCommit the fix directly to the default branch
Incorrect
GitHub flow keeps changes off the default branch until they are reviewed and merged.
CAsk an administrator to protect the default branch
Incorrect
Protecting branches is a repository setting, not a step in proposing a change.
DCreate a branch with a short, descriptive name
Correct
GitHub flow starts with a branch, a space to work without affecting the default branch.
GitHub flow is a lightweight, branch-based workflow. It begins with a branch: creating one gives you a space to work without affecting the default branch, and a short, descriptive name lets collaborators see ongoing work at a glance. Changes are then committed to the branch and proposed in a pull request.
In an issue description, a maintainer wants a checklist of steps that readers can see ticked off as each is done. Which Markdown should she write for each step?
AA line starting with "- [ ]", changed to "- [x]" when the step is complete
BA line starting with "[ ]" and no hyphen before it
CA line starting with "1." followed by the step
DThe step in bold, then struck through with ~~ ~~ once it is done, so readers see progress
Show the answer and why
AA line starting with "- [ ]", changed to "- [x]" when the step is complete
Correct
A hyphen and a space followed by [ ] creates a task list item; [x] marks it complete.
BA line starting with "[ ]" and no hyphen before it
Incorrect
A task list item needs the hyphen and space before the brackets.
CA line starting with "1." followed by the step
Incorrect
That creates a numbered list, without checkboxes.
DThe step in bold, then struck through with ~~ ~~ once it is done, so readers see progress
Incorrect
Formatting changes how the text looks; readers get no checkbox.
To create a task list, preface list items with a hyphen and a space followed by [ ]. To mark a task as complete, use [x].
A designer who is new to Git edits several lines of a file but wants only some of those lines in her next commit. She doesn't want to learn command-line syntax. Which tool fits?
AGitHub Desktop
BGitHub Mobile
CThe repository's Insights tab
DGitHub CLI
Show the answer and why
AGitHub Desktop
Correct
GitHub Desktop's visual interface lets you choose which changed lines to include in a commit without remembering any syntax.
BGitHub Mobile
Incorrect
GitHub Mobile doesn't work with the changed files on her computer, so it can't build a commit from some of their lines.
CThe repository's Insights tab
Incorrect
Insights shows repository activity; it doesn't create commits.
DGitHub CLI
Incorrect
GitHub CLI is a command-line tool, which she wants to avoid.
GitHub Desktop is a free, open source application with a graphical interface that simplifies Git commands and helps you visualize changes. Because it is visual, less common Git tasks, such as choosing which changed lines to include in a commit, are easy to reach without memorizing syntax.
A company has five GitHub organizations, each with its own owners and its own bill. Leadership wants central control of the rules people work under and of the payments for all five. Which two statements describe what an enterprise account provides? (Choose TWO.)
AIt replaces the five organizations, so their repositories move into the enterprise account itself
BIt lets administrators set policies, such as repository and Copilot policies, for all of them
CIt is included with GitHub Team for any company with more than one organization
DIt gives every member owner rights in all five organizations
EIt brings billing for all the organizations together in one place
Show the answer and why
AIt replaces the five organizations, so their repositories move into the enterprise account itself
Incorrect
Repositories stay owned by organizations; they aren't held directly by the enterprise account.
BIt lets administrators set policies, such as repository and Copilot policies, for all of them
Correct
Enterprise administrators can set policies that govern how people work across the enterprise.
CIt is included with GitHub Team for any company with more than one organization
Incorrect
Enterprise accounts are part of GitHub Enterprise, not GitHub Team.
DIt gives every member owner rights in all five organizations
Incorrect
Most users keep non-administrative roles; enterprise roles are granted separately.
EIt brings billing for all the organizations together in one place
Correct
An enterprise account centralizes policy and billing for multiple organizations.
GitHub Enterprise Cloud and GitHub Enterprise Server include enterprise accounts, which let administrators centrally manage policy and billing for multiple organizations. An enterprise account may contain one or more organizations; repositories stay owned by those organizations.
In a pull request in her team's repository, a developer wants to reference issue 88 in a different repository, acme/payments, so that it renders as a link. What should she type?
Aacme/payments#88
B#88
Cpayments#88
Dissue:acme/payments/88
Show the answer and why
Aacme/payments#88
Correct
The owner/repository# form links an issue in another repository.
B#88
Incorrect
#88 links issue 88 in the current repository.
Cpayments#88
Incorrect
The reference needs the owner as well as the repository name.
Dissue:acme/payments/88
Incorrect
That isn't a reference form GitHub converts into a link.
GitHub turns references to issues and pull requests into shortened links. #26 or GH-26 refers to issue or pull request 26 in the current repository; to refer to one in another repository, use owner/repository#26.
AAnyone working in a repository, including writers and policy teams
BOnly developers writing application code in a programming language
COnly organizations on GitHub Enterprise
DOnly repository administrators
Show the answer and why
AAnyone working in a repository, including writers and policy teams
Correct
GitHub flow is useful for everyone, not just developers.
BOnly developers writing application code in a programming language
Incorrect
GitHub uses the flow for documentation and policy too.
COnly organizations on GitHub Enterprise
Incorrect
It needs only an account and a repository.
DOnly repository administrators
Incorrect
Contributors follow it to propose changes.
GitHub flow is a lightweight, branch-based workflow that is useful for everyone, not just developers; GitHub itself uses it for its site policy, documentation and roadmap. All you need is a GitHub account and a repository.