Hacker News new | ask | show | jobs
by wubbfindel 4873 days ago
I tend to 'git commit' and then 'git commit --amend' until I'm happy, then push to others.

I find it easier anyway. But the stash approach is interesting, thanks for sharing!

1 comments

That's good advice for a lot of situations but it depends if your "sledgehammer" is assuming a certain starting condition.

In the authors example if he got it wrong and it replaced a load of non-links with links then running it again on the output of the first run isn't going to do any good. So he's suggesting replacing "git reset" with "git stash", both reset the repo to the way it was pre-sledgehammer but "git stash" also keeps around the previous results for comparison.

Oh I see, because he's using git itself to find the files that need work on them? I had honestly missed that part of the logic.

That'll teach me to 'scan read' and then comment!