CS FundamentalsHardProduct-company placement · Git interview
During git rebase -i, what is the difference between marking a commit 'squash' and marking it 'fixup'?
- A. squash deletes the commit; fixup keeps it
- B. They are identical
- C. fixup moves the commit to the end of the list
- D. Both meld the commit into the previous one; squash lets you combine and edit both commit messages, while fixup discards the fixup commit's message
Correct answer: D. Both meld the commit into the previous one; squash lets you combine and edit both commit messages, while fixup discards the fixup commit's message
fixup is for 'oops' commits whose messages add nothing; squash is used when both messages contain useful information. git commit --fixup plus rebase --autosquash automates the ordering.
Practise more Software Engineering, Git and Cloud Basics questionsSoftware Engineering, Git and Cloud Basics: notes and key points
More Software Engineering, Git and Cloud Basics questions
- On main you need the version of config.yml that exists on branch release, without merging anything else. Which command does this, and what…
- A file was renamed from util.js to helpers.js three months ago. git log helpers.js shows only the commits since the rename. Which command…
- Branches deleted on the remote still appear in git branch -r on a developer's machine. Which command removes these stale remote-tracking…
- On a cumulative flow diagram for a Kanban board, the band for 'In Review' keeps getting wider over several weeks while the 'Done' line…
- A customer requests a feature on 1 March; the team starts work on it on 10 March and delivers it on 15 March. Using common Kanban…
- According to the 2020 Scrum Guide, how many of these are true? 1. An Increment may be delivered to stakeholders before the end of the…