CS FundamentalsHardProduct-company placement · Git
main receives feature work only through merge commits (git merge --no-ff), plus a few direct hotfix commits. What does git log --first-parent main show?
- A. Every commit reachable from main, listed in plain date order
- B. Only the merge commits on main, leaving out the direct hotfixes
- C. Hotfixes and merge commits on main, not the merged branches' commits
- D. Only the commits whose author is recorded as the branch maintainer
Correct answer: C. Hotfixes and merge commits on main, not the merged branches' commits
--first-parent follows only each commit's first parent, which on main is the previous main tip, so the walk skips the feature commits brought in through second parents. It gives a clean 'what landed on main' history.
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
- What does this code print (lines joined by ' / ')? python handlers = {'+': lambda a, b: a + b} def fallback(): print('fallback') return…
- A Python app keeps a shared Settings object at module level in settings.py as a singleton. Most code imports it as app.settings, but one…
- What does this code print? python class Count: def init(s, n): s.i = 0; s.n = n def iter(s): return s def next(s): if s.i >= s.n: raise…
- In a strictly layered system, 80% of requests pass through the business and service layers unchanged, which merely forward each call to…
- How many of these are Twelve-Factor App recommendations? 1. Write logs as an event stream to stdout and let the environment route them. 2…
- Before refactoring a legacy pricing module with no tests, a developer records its current outputs for many inputs, including results she…