Recall & Review
beginner
What does 'squashing commits' mean in Git?
Squashing commits means combining multiple commits into one to make the history cleaner and easier to understand.
Click to reveal answer
beginner
Which Git command is commonly used to squash commits?
The command 'git rebase -i' (interactive rebase) is used to squash commits by editing the commit list.
Click to reveal answer
beginner
What is the main benefit of squashing commits before merging a feature branch?
It keeps the main branch history clean and easier to read by combining many small changes into one meaningful commit.
Click to reveal answer
intermediate
In an interactive rebase, what keyword do you replace 'pick' with to squash a commit?
You replace 'pick' with 'squash' or 's' to combine that commit with the previous one.
Click to reveal answer
intermediate
True or False: Squashing commits changes the commit history and can affect shared branches.
True. Squashing rewrites history, so it should be done carefully, especially if the branch is shared with others.
Click to reveal answer
What is the purpose of squashing commits in Git?
✗ Incorrect
Squashing combines commits to simplify the commit history.
Which command starts an interactive rebase to squash commits?
✗ Incorrect
'git rebase -i' opens the interactive rebase editor to squash commits.
During interactive rebase, which keyword do you use to squash a commit?
✗ Incorrect
'squash' merges the commit with the previous one.
What should you be careful about when squashing commits on a shared branch?
✗ Incorrect
Squashing rewrites history, so it can cause problems if others use the branch.
What happens to commit messages when you squash commits?
✗ Incorrect
During squash, Git lets you edit and combine commit messages into one.
Explain the process of squashing commits using interactive rebase in Git.
Think about editing commits in a list and merging them.
You got /4 concepts.
Why is it important to squash commits before merging a feature branch into the main branch?
Consider how commit history looks to others.
You got /4 concepts.