0
0
Gitdevops~10 mins

Fast-forward merge 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 perform a fast-forward merge of branch 'feature' into 'main'.

Git
git checkout main && git merge [1]
Drag options to blanks, or click blank then click option'
Aclone
Bcommit
Creset
Dfeature
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'commit' or 'reset' instead of the branch name.
Trying to merge without checking out the main branch first.
2fill in blank
medium

Complete the command to update the local branch with a fast-forward merge from the remote 'origin/main'.

Git
git fetch origin && git merge [1]
Drag options to blanks, or click blank then click option'
Aorigin/feature
Borigin/main
Cmain
Dorigin/develop
Attempts:
3 left
💡 Hint
Common Mistakes
Merging a local branch instead of the remote branch after fetch.
Using the wrong remote branch name.
3fill in blank
hard

Complete the command to perform a fast-forward ONLY merge of branch 'feature' into 'main'.

Git
git checkout main && git merge [1] feature
Drag options to blanks, or click blank then click option'
A--ff-only
B--no-ff
C--ff
Dorigin
Attempts:
3 left
💡 Hint
Common Mistakes
Using '--no-ff' which disables fast-forward merges.
Omitting the option (defaults to fast-forward if possible, but not enforced).
4fill in blank
hard

Fill both blanks to create a fast-forward merge command that updates 'main' with 'feature' branch changes.

Git
git checkout [1] && git merge [2]
Drag options to blanks, or click blank then click option'
Amain
Bfeature
Cdevelop
Dmaster
Attempts:
3 left
💡 Hint
Common Mistakes
Switching the order of branches.
Using 'develop' or 'master' instead of 'main' or 'feature'.
5fill in blank
hard

Fill all three blanks to perform a safe fast-forward update of 'main' from the remote 'origin'.

Git
git checkout [1] && git fetch [2] && git merge --ff-only [3]
Drag options to blanks, or click blank then click option'
Amain
Borigin
Cfeature
Dorigin/main
Attempts:
3 left
💡 Hint
Common Mistakes
Merging local 'main' instead of 'origin/main'.
Wrong remote name or forgetting fetch.
Using 'feature' instead of 'main' remote.