0
0
Gitdevops~10 mins

Rebase vs merge mental model in Git - Interactive Practice

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

Complete the command to merge branch 'feature' into the current branch.

Git
git [1] feature
Drag options to blanks, or click blank then click option'
Amerge
Brebase
Ccheckout
Dcommit
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'rebase' instead of 'merge' when you want to preserve history.
2fill in blank
medium

Complete the command to rebase the current branch onto 'main'.

Git
git [1] main
Drag options to blanks, or click blank then click option'
Acheckout
Brebase
Cmerge
Dreset
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'merge' when you want a linear history.
3fill in blank
hard

Fix the error in the command to rebase 'feature' branch onto 'main'.

Git
git checkout feature
git [1] main
Drag options to blanks, or click blank then click option'
Amerge
Bpush
Ccommit
Drebase
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'merge' instead of 'rebase' after checkout.
4fill in blank
hard

Fill both blanks to create a new branch 'feature' from 'main' and rebase it onto 'main'.

Git
git [1] feature main
git checkout feature
git [2] main
Drag options to blanks, or click blank then click option'
Abranch
Bmerge
Crebase
Dcommit
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'merge' to create a branch or 'commit' instead of rebase.
5fill in blank
hard

Fill all three blanks to merge 'feature' into 'main' and then delete 'feature' branch.

Git
git checkout [1]
git [2] feature
git branch -d [3]
Drag options to blanks, or click blank then click option'
Afeature
Bmerge
Dmain
Attempts:
3 left
💡 Hint
Common Mistakes
Deleting the wrong branch or merging into the wrong branch.