Does staging a Git file include edits I make to it afterwards?
TechnologyI staged a page change, spotted a typo, saved the correction and then ran an ordinary git commit. The commit still contains the typo, while the corrected text remains in my working file. I thought staging had selected the file so its latest contents would go into the commit.
Git documents that add takes the content present when it runs; subsequent changes need to be added again if they belong in the next commit. Git's staging reference
How should I check this without sweeping unrelated work into another commit? Nothing has been pushed yet, and I want to understand the two versions before choosing what to record next.