0
0
Gitdevops~10 mins

Why version control matters in Git - Test Your Understanding

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

Complete the command to initialize a new Git repository.

Git
git [1]
Drag options to blanks, or click blank then click option'
Apush
Bcommit
Cinit
Dclone
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'commit' before initializing the repository
Trying to 'push' before any commits exist
2fill in blank
medium

Complete the command to save changes to the Git repository with a message.

Git
git commit -m [1]
Drag options to blanks, or click blank then click option'
A"Initial commit"
B'Initial commit'
CInitial_commit
DInitial commit
Attempts:
3 left
💡 Hint
Common Mistakes
Not using quotes around the message
Using single quotes which may not work on all systems
3fill in blank
hard

Fix the error in the command to add all changed files to the staging area.

Git
git [1] .
Drag options to blanks, or click blank then click option'
Aadd
Bpush
Ccommit
Dclone
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'commit' instead of 'add'
Using 'push' before committing
4fill in blank
hard

Fill both blanks to switch to the new-feature branch.

Git
git [1] [2]
Drag options to blanks, or click blank then click option'
Acheckout
Bbranch
Cnew-feature
Dcommit
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'branch' instead of 'checkout' to switch
Using 'commit' which is unrelated here
5fill in blank
hard

Fill all three blanks to push the current branch to the remote repository named 'origin'.

Git
git [1] [2] [3]
Drag options to blanks, or click blank then click option'
Apush
Borigin
Cmain
Dcommit
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'commit' instead of 'push'
Mixing up remote and branch names