0
0
Gitdevops~10 mins

Fork and pull request workflow in Git - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the command to clone a forked repository to your local machine.

Git
git [1] https://github.com/username/repo.git
Drag options to blanks, or click blank then click option'
Aclone
Bpush
Ccommit
Dmerge
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'push' instead of 'clone' will try to send changes, not download.
2fill in blank
medium

Complete the command to create a new branch for your changes.

Git
git [1] feature-branch
Drag options to blanks, or click blank then click option'
Abranch
Bmerge
Ccheckout
Dcommit
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'checkout' creates and switches branches, but here we only want to create.
3fill in blank
hard

Fix the error in the command to switch to your new branch.

Git
git [1] feature-branch
Drag options to blanks, or click blank then click option'
Abranch
Bcommit
Cpush
Dcheckout
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'branch' only creates branches but does not switch.
4fill in blank
hard

Fill both blanks to add all changes and commit with a message.

Git
git [1] .
git [2] -m "Add new feature"
Drag options to blanks, or click blank then click option'
Aadd
Bcommit
Cpush
Dclone
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'push' before committing will fail because there are no commits yet.
5fill in blank
hard

Fill all three blanks to push your branch and create a pull request.

Git
git [1] origin [2]
# Then go to GitHub and create a pull request from [3] branch
Drag options to blanks, or click blank then click option'
Aclone
Bpush
Cfeature-branch
Dmain
Attempts:
3 left
💡 Hint
Common Mistakes
Pushing to 'main' instead of your feature branch will not create the correct pull request.