Ask HN: How to Do This in Git

https://news.ycombinator.com/item?id=32029710
by pm2222 • 4 years ago
2 5 4 years ago

Suppose I'm writing a tutorial and as a simple example there's only one source file. Incremental changes will be made to this file step by step along the way. So far I this have commit history: commit1-commit2-commit3-...-commit100-(Head)

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?

Related Stories

Loading related stories...

Source preview

news.ycombinator.com