Re:Git: Using Advanced Rebase Features for a Clean Repository
by hdhzy on Wednesday August 09, 2017 @07:18AM
(#14967463)
The usual rule of thumb is not to modify (e.g rebase) published commits. So it's perfectly fine to adjust local commits before they go into centralized repo - from the point of view of an external observer the history is never destructively modified. This rule can be extended to topic branches or user owned branches with the caveat that others should not base their work upon the topic branch.
Also remember git push --force-with-lease!
Re:Git: Using Advanced Rebase Features for a Clean Repository
by james-skemp on Wednesday August 09, 2017 @02:51PM
(#14972398)
And `git commit --amend`
I missed a semi-colon or a file? I probably noticed right after I made the commit (and before I pushed it to the remote branch).
One says that the history should be preserved exactly, because its important we keep a record of exactly what happened.
The second says that its ok to rewrite history a little if that makes it more understandable.
I think you would put yourself in the first, and that's ok. I would put myself in the second because at the end of the day I value understanding over precision in git histories. I'm of the opinion that one cares about the commit I made to correct a missing semicolon.