0
0
Gitdevops~10 mins

git rebase basic usage - 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 rebasing the current branch onto the master branch.

Git
git rebase [1]
Drag options to blanks, or click blank then click option'
Amerge
Bmaster
Ccommit
Dbranch
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'merge' instead of the branch name causes an error.
Using 'commit' or 'branch' are not valid targets for rebase.
2fill in blank
medium

Complete the command to abort an ongoing rebase process.

Git
git rebase --[1]
Drag options to blanks, or click blank then click option'
Aabort
Bcontinue
Cskip
Dedit
Attempts:
3 left
💡 Hint
Common Mistakes
Using '--continue' tries to resume the rebase instead of aborting.
Using '--skip' skips the current patch but does not abort the whole rebase.
3fill in blank
hard

Fix the error in the command to rebase interactively starting from the last 3 commits.

Git
git rebase -i HEAD~[1]
Drag options to blanks, or click blank then click option'
A5
B2
C4
D3
Attempts:
3 left
💡 Hint
Common Mistakes
Using a number less than 3 will not include all desired commits.
Using a number greater than 3 includes more commits than intended.
4fill in blank
hard

Fill both blanks to create a new branch and rebase it onto master.

Git
git checkout -b [1] && git rebase [2]
Drag options to blanks, or click blank then click option'
Afeature
Bdevelop
Cmaster
Dmain
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'develop' as the new branch name when the task expects 'feature'.
Rebasing onto 'develop' instead of 'master' changes the base branch.
5fill in blank
hard

Fill all three blanks to squash the last two commits into one during an interactive rebase.

Git
git rebase -i HEAD~[1] # change 'pick' to [2] for the second commit and save the [3] file
Drag options to blanks, or click blank then click option'
A2
Bsquash
Ceditor
D3
Attempts:
3 left
💡 Hint
Common Mistakes
Using HEAD~3 includes too many commits.
Using 'fixup' instead of 'squash' changes commit messages differently.
Not saving the editor file stops the rebase process.