0
0
Gitdevops~10 mins

Why remotes enable collaboration in Git - Test Your Understanding

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

Complete the code to add a remote repository named 'origin'.

Git
git remote [1] https://github.com/user/repo.git
Drag options to blanks, or click blank then click option'
Aclone
Bpush
Cadd
Dcommit
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'clone' instead of 'add' to add a remote.
2fill in blank
medium

Complete the command to fetch changes from the remote repository.

Git
git [1] origin
Drag options to blanks, or click blank then click option'
Apush
Bmerge
Ccommit
Dfetch
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'push' instead of 'fetch' to get updates.
3fill in blank
hard

Fix the error in the command to push local changes to the remote.

Git
git [1] origin main
Drag options to blanks, or click blank then click option'
Apush
Bclone
Cpull
Dcommit
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'pull' or 'clone' instead of 'push' to send changes.
4fill in blank
hard

Fill both blanks to create a new branch and push it to the remote.

Git
git [1] feature-branch

git [2] -u origin feature-branch
Drag options to blanks, or click blank then click option'
Acheckout -b
Bcommit
Cpush
Dfetch
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'commit' instead of 'checkout -b' to create branch.
5fill in blank
hard

Fill all three blanks to clone a repository, create a branch, and push it.

Git
git [1] https://github.com/user/repo.git

git [2] new-feature

git [3] -u origin new-feature
Drag options to blanks, or click blank then click option'
Aclone
Bcheckout -b
Cpush
Dfetch
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'fetch' instead of 'clone' to copy repo.