WEEKLY ENGINEERING PRACTICE
Which version gets committed?
A small reasoning exercise. Follow the behavior, choose an explanation and use the feedback to decide what to practice next.
Trace the behavior
Before these commands, report.txt contains version A. Assume the repository has an existing commit, a configured author and no hooks. Which report content enters the new commit?
git add report.txt
printf 'version B\n' > report.txt
git commit -m 'Save report'