30 quizzes
Update your local main branch with the latest changes from the central repository before starting work
git origin mainClick an option to fill the blank:
Create a new feature branch from your current branch to isolate changes
git -b feature/collab-workflowClick an option to fill the blank:
Send your completed feature branch to the shared remote so teammates can open a pull request
git origin feature/user-settingsClick an option to fill the blank:
Download the latest changes from the upstream repository into your fork without modifying your working files
git upstreamClick an option to fill the blank:
Create a new release branch from the develop branch in a Gitflow workflow
git -b release/2.0.0 developClick an option to fill the blank:
In a Centralized Workflow, what do most developers typically commit directly to?
What is the main benefit of a Feature Branch Workflow compared to committing directly to main?
In Gitflow, which branch is always considered production-ready?
Why is the Forking Workflow especially common in open-source projects?
During a code review, what is the MOST appropriate focus?
Order the steps to contribute to an open-source project using the Forking Workflow and a pull request.
Drag and drop to reorder, or use the arrows.
Order the steps to keep your fork’s main branch in sync with the upstream main branch.
Drag and drop to reorder, or use the arrows.
Order the steps for implementing a new feature in a Feature Branch Workflow and integrating it into main.
Drag and drop to reorder, or use the arrows.
Order the steps for handling a hotfix using Gitflow.
Drag and drop to reorder, or use the arrows.
You are currently on branch feature/login. What will this command print?
1git branch --show-currentOn your fork, you just ran git checkout -b feature/docs from main. What will this command print?
1git rev-parse --abbrev-ref HEADYour current branch is develop. What will this command print?
1git symbolic-ref --short HEADYou just ran git remote add upstream https://github.com/org/project.git. What will this command print?
1git remote get-url upstreamFind the incorrect command in this Centralized Workflow sequence.
Click on the line(s) that contain the bug.
git clone https://example.com/repo.gitcd repogit add .git commit -m "Initial work"git push origin commit Find the incorrect command while preparing a feature branch for a pull request.
Click on the line(s) that contain the bug.
git checkout maingit pull origin maingit checkout -b feature/reportsgit add .git commit -m "Add reports feature"git push feature/reports origin Find the incorrect command in this Gitflow hotfix sequence.
Click on the line(s) that contain the bug.
git checkout maingit checkout -b hotfix/login-buggit add .git commit -m "Fix login bug"git merge main Match each workflow with its key characteristic.
Click an item on the left, then click its match on the right. Click a matched item to unmatch.
Match each pull request concept with its description.
Click an item on the left, then click its match on the right. Click a matched item to unmatch.
Match each code review guideline with its purpose.
Click an item on the left, then click its match on the right. Click a matched item to unmatch.
Complete the commands to update your local main from upstream and push it to your fork.
git fetch git checkout git merge /maingit push mainClick an option to fill blank 1:
Complete the commands to start a new feature in a Gitflow-style project.
git checkout git pull origin git checkout -b /Click an option to fill blank 1:
Complete the commands to prepare code for review from a feature branch.
git statusgit add git commit -m git push origin Click an option to fill blank 1:
Select the line that shows the current branch in a collaborative Branch model.
Click on the line to select.
main* feature/payment-flow feature/cleanup Select the line indicating the remote that points to the original repository (upstream).
Click on the line to select.
origin https://github.com/YOU/project.git (fetch)origin https://github.com/YOU/project.git (push)upstream https://github.com/ORIGINAL_OWNER/project.git (fetch)upstream https://github.com/ORIGINAL_OWNER/project.git (push) Select the line that shows your own review comment on a pull request diff.
Click on the line to select.
diff --git a/app.js b/app.js+ console.log('Hello');Comment (you): Consider removing this debug log before merging.Comment (teammate): Agreed, please clean this up.