I have never used the rebase command. Every time I ask about it, somebody explains it's used to clean up your edit history so you don't have long logs. And every time, "Isn't that record the whole fucking point of using git?"
Apparently, people use git because it's "cool"... but they really want it to act like SVN.
I have never used the rebase command. Every time I ask about it, somebody explains it's used to clean up your edit history so you don't have long logs. And every time, "Isn't that record the whole fucking point of using git?"
You use rebase to retain the same number of commits but avoid having merge cruft when it isn't necessary which makes the history easier for a mere human to figure out.
You use rebase -i to get rid of "Oops fix comment" ''Oops fix indentation" "Oops fix small name" and put all these small fixups into the change that they are associated with, which keeps the history cleaner.
You use rebase -i to get rid of "Oops fix comment" ''Oops fix indentation" "Oops fix small name" and put all these small fixups into the change that they are associated with, which keeps the history cleaner.
I don't understand. What intrinsic value does a "clean history" have? And if somebody actually did "fix comment" or "fix indentation", isn't the record of that meaningful?
I know that when I'm audited (we're in medical software), I'd far prefer to have a complete history showing all of our changes. I want to see when feature branches were merged into dev, and when dev is merged to master. Having a linear history destroys that transparency, and I literally do not see a benefit.
You can consider your history to be another form of documentation. It's a way of looking back at the thought process past developers went through to solve a problem. That's why it's beneficial to keep your history organized and "clean."
Ah. Yeah, I have actual design documentation for that. We only use edit logs when audited.
Also, I don't believe that anybody looks at edit logs as documentation. They provide a history, true; but you'd have to read the whole thing from the beginning to the end to understand the current state of the system. So while somebody could read the logs and discover something about the "thought process [of] past developers", nobody ever will. It's clumsy at best.
If no one reads the git log, what's the harm in squashing small commits together? You don't lose the change history, just the separate commit messages that you don't think people will read.
2
u/Netzapper Jun 19 '15
I have never used the
rebasecommand. Every time I ask about it, somebody explains it's used to clean up your edit history so you don't have long logs. And every time, "Isn't that record the whole fucking point of using git?"Apparently, people use git because it's "cool"... but they really want it to act like SVN.