0
0
Gitdevops~10 mins

Interactive rebase (git rebase -i) - 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 an interactive rebase for the last 3 commits.

Git
git rebase -i HEAD~[1]
Drag options to blanks, or click blank then click option'
A4
B2
C3
D5
Attempts:
3 left
💡 Hint
Common Mistakes
Using a number too small or too large changes the commits included.
Forgetting to use -i for interactive mode.
2fill in blank
medium

Complete the command to edit a commit message during an interactive rebase.

Git
In the interactive rebase editor, replace 'pick' with '[1]' to edit a commit message.
Drag options to blanks, or click blank then click option'
Aedit
Bdrop
Csquash
Dfixup
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'squash' when wanting to edit a message.
Confusing 'drop' with 'edit'.
3fill in blank
hard

Fix the error in the command to continue the rebase after editing a commit.

Git
After editing a commit, run 'git [1] --continue' to proceed.
Drag options to blanks, or click blank then click option'
Acommit
Bpush
Cmerge
Drebase
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'git commit --continue' instead of 'git rebase --continue'.
Trying to use 'git push --continue' which does not exist.
4fill in blank
hard

Fill both blanks to squash the second commit into the first during interactive rebase.

Git
In the interactive rebase editor, change the second commit's action from '[1]' to '[2]'.
Drag options to blanks, or click blank then click option'
Apick
Bedit
Csquash
Ddrop
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'drop' instead of 'squash' which deletes the commit.
Changing the first commit instead of the second.
5fill in blank
hard

Fill all three blanks to reorder commits during an interactive rebase.

Git
In the editor, move the commit lines so that the commit with message '[1]' comes before '[2]', then save and exit with '[3]'.
Drag options to blanks, or click blank then click option'
A:wq
Bfix typo
Cadd feature
Dreorder commits
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing commit messages and moving the wrong lines.
Not saving the file properly after reordering.