0
0
Gitdevops~10 mins

git diff between branches - Interactive Code Practice

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

Complete the code to show differences between branch1 and branch2.

Git
git diff [1] [2]
Drag options to blanks, or click blank then click option'
Abranch1...branch2
Bbranch1..branch2
Cbranch1 branch2
Dbranch1-branch2
Attempts:
3 left
💡 Hint
Common Mistakes
Using dots or dashes between branch names instead of space.
Confusing the syntax with other git commands.
2fill in blank
medium

Complete the command to compare branchA with branchB using the three-dot syntax.

Git
git diff [1]
Drag options to blanks, or click blank then click option'
AbranchA branchB
BbranchA...branchB
CbranchA..branchB
DbranchA-branchB
Attempts:
3 left
💡 Hint
Common Mistakes
Using two dots instead of three dots.
Using space instead of dots.
3fill in blank
hard

Fix the error in the command to compare branchX and branchY.

Git
git diff [1]
Drag options to blanks, or click blank then click option'
AbranchX branchY
BbranchX-branchY
CbranchX..branchY
DbranchX...branchY
Attempts:
3 left
💡 Hint
Common Mistakes
Using dashes between branch names.
Using dots without understanding their meaning.
4fill in blank
hard

Fill both blanks to create a command that shows differences between branch1 and branch2 with color output.

Git
git diff [1] [2] --color
Drag options to blanks, or click blank then click option'
Abranch1
Bbranch2
C--word-diff
D--no-color
Attempts:
3 left
💡 Hint
Common Mistakes
Putting flags like --word-diff or --no-color as branch names.
Swapping branch names order.
5fill in blank
hard

Fill all three blanks to create a command that compares branchA and branchB, shows word differences.

Git
git diff [1] [2] [3]
Drag options to blanks, or click blank then click option'
AbranchA
BbranchB
C--word-diff
D-w
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up flags and branch names.
Using -w instead of --word-diff for word differences.