0
0
Gitdevops~10 mins

Resolving merge conflicts 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 start a merge that might cause conflicts.

Git
git [1] feature-branch
Drag options to blanks, or click blank then click option'
Acommit
Bmerge
Cpush
Dclone
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'commit' instead of 'merge' to combine branches.
Trying to 'push' before merging.
2fill in blank
medium

Complete the command to see files with merge conflicts.

Git
git [1] --name-only --diff-filter=[2]
Drag options to blanks, or click blank then click option'
Adiff
Bstatus
Clog
Dshow
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'git status' which shows all changes, not just conflicts.
Using 'git log' which shows commit history.
3fill in blank
hard

Fix the error in the command to mark a conflicted file as resolved.

Git
git [1] <file>
Drag options to blanks, or click blank then click option'
Acommit
Bcheckout
Cmerge
Dadd
Attempts:
3 left
💡 Hint
Common Mistakes
Trying to commit before adding resolved files.
Using 'checkout' which discards changes.
4fill in blank
hard

Fill both blanks to create a command that aborts a merge and returns to the previous state.

Git
git [1] [2]
Drag options to blanks, or click blank then click option'
Amerge
Babort
Creset
Drevert
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'git reset abort' which is invalid.
Using 'git revert' which creates a new commit instead of aborting.
5fill in blank
hard

Fill all three blanks to create a command that shows the conflict markers in a file.

Git
git [1] [2] [3]
Drag options to blanks, or click blank then click option'
Adiff
B--color
C<file>
D--check
Attempts:
3 left
💡 Hint
Common Mistakes
Using '--color' which only adds color but does not check conflicts.
Omitting the file name which is needed to see specific conflicts.