Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

Post History

37%
+1 −3
Q&A How can I make --reset-author the default?

Rather that doing git commit --amend --date= every time you commit, you can coalesce commits at merge time using git merge --squash. That said, for non-trivial topic branches, it is usually valuab...

posted 3y ago by meriton‭  ·  edited 3y ago by meriton‭

Answer
#4: Post edited by user avatar meriton‭ · 2020-11-17T20:06:12Z (over 3 years ago)
  • Rather that doing `git commit --amend --date=` every time you commit, you can coalesce commits at merge time using `git merge --squash`.
  • That said, for non-trivial topic branches, it is usually valuable to retain the commits in the topic branch to figure out why a particular change was made. For instance, if you are developing a feature in a feature branch, you might also have some refactorings, or non-obvious bugfixes, that would be better described in a commit of their own.
  • In general, I find a detailed and truthful history more valuable than a pretty one: The purpose of history is not to look beautiful, but to be able to figure out why a certain change was made. Yes, unnecessary information may slow the inspection of history, but deleted necessary information will halt it.
  • PS: You may have noticed that this answer does not mention commit dates. That's because they rarely matter in my experience: When inspecting history, I care about the "what" and "why", not usually the "when". And even when I care about the "when", it'll only be about the year, or the release, not the day. Therefore, the choice of commit frequency or squashing should not be affected by dating considerations.
  • Rather that doing `git commit --amend --date=` every time you commit, you can coalesce commits at merge time using `git merge --squash`.
  • That said, for non-trivial topic branches, it is usually valuable to retain the commits in the topic branch to figure out why a particular change was made. For instance, if you are developing a feature in a feature branch, this might require some refactorings, or non-obvious bugfixes, that would be better described in a commit of their own.
  • In general, I find a detailed and truthful history more valuable than a pretty one: The purpose of history is not to look beautiful, but to be able to figure out why a certain change was made. Yes, unnecessary information may slow the inspection of history, but deleted necessary information will halt it.
  • PS: You may have noticed that this answer does not mention commit dates. That's because they rarely matter in my experience: When inspecting history, I care about the "what" and "why", not usually the "when". And even when I care about the "when", it'll only be about the year, or the release, not the day. Therefore, the choice of commit frequency or squashing should not be affected by dating considerations.
#3: Post edited by user avatar meriton‭ · 2020-11-12T06:43:31Z (over 3 years ago)
#2: Post edited by user avatar meriton‭ · 2020-11-12T06:35:48Z (over 3 years ago)
#1: Initial revision by user avatar meriton‭ · 2020-11-12T06:34:41Z (over 3 years ago)
Rather that doing `git commit --amend --date=` every time you commit, you can coalesce commits at merge time using `git merge --squash`.

That said, for non-trivial topic branches, it is usually valuable to retain the commits in the topic branch to figure out why a particular change was made. For instance, if you are developing a feature in a feature branch, you might also have some refactorings, or non-obvious bugfixes, that would be better described in a commit of their own. 

In general, I find a detailed and truthful history more valuable than a pretty one: The purpose of history is not to look beautiful, but to be able to figure out why a certain change was made. Yes, unnecessary information may slow the inspection of history, but deleted necessary information is worse.

PS: You may have noticed that this answer does not mention commit dates. That's because they rarely matter in my experience: When inspecting history, I care about the "what" and "why", not usually the "when". And even when I care about the "when", it'll only be about the year, or the release, not the day.