CS FundamentalsHardProduct-company placement · Git interview
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 shows the full history across the rename?
- A. git log --all helpers.js
- B. git blame helpers.js
- C. git log --follow helpers.js
- D. git reflog helpers.js
Correct answer: C. git log --follow helpers.js
Git does not store renames; it detects them by content similarity. --follow makes git log track a single file across such renames. --all adds branches but still stops at the rename.
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
- 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…
- A fragment contains total = 0 immediately followed by total = compute(), with no use of total in between, and later print(rate) where rate…
- In domain testing for integer inputs, a program accepts points satisfying x + y ≤ 10 (a closed boundary). Which pair of test points is the…