commit1:
This is step1
commit2: This is step1
This is step3
commit3: This is step1
This is step3
This is step3
..Commit100:
I wish to be able to tell readers to go to commitX for source file of stepX.
Now obviously in commit2 there's a typo and it's inherited by commit3 and so on. What's the best way to achieve my goal, is it a natural thing for git to do?
git rebase -i commit1
it will open an editor. find commit2 in the text file and change "pick" to "edit". save&exit editorit will dump you out on commit2 (with the typo). use an editor to fix the typo in typofile. then:
git add typofile
git commit --amend
git rebase --continue
then it will rebase the other 99 commits on top, if there are any conflicts it will stop and you'll have to fix them.you can optionally skip the git commit --amend right after git add and rebase --continue does it automatically anyway.