CS FundamentalsVery hardProduct-company placement · Git interview
You run git stash pop and it reports a merge conflict in f.txt. What happens to the stash entry?
- A. It is dropped as usual, so the conflicting changes can be lost
- B. It is kept in the stash list, so you can resolve the conflict (or reset and retry) and then drop it manually
- C. It is converted into a commit
- D. It is moved to a new branch automatically
Correct answer: B. It is kept in the stash list, so you can resolve the conflict (or reset and retry) and then drop it manually
When applying fails with conflicts, git stash pop does not remove the entry ('The stash entry is kept in case you need it again'). After resolving, run git stash drop yourself.
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
- During git rebase -i, what is the difference between marking a commit 'squash' and marking it 'fixup'?
- 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…