Author: Andy Parkins 2013-10-04 10:42:29
Published on: 2013-10-04T10:42:29+00:00
In a message posted on 4th October 2013, Mike Hearn expressed his opinion on Git. He opined that although Git makes it easy to fork people's work off and create long series of commits that achieve some useful goal, it is not great for code review. He made a request to submit large, complex pieces of work for review as one giant squashed change or in a way that does not throw away all of the good stuff that Git lets you record. According to him, every single log message and diff is individually valuable, and it is easy to make a squashed diff from many little commits; it's impossible to go the other way.Andy Parkins shared the command line for creating a squashed diff from many little commits so that users don't have to think about it. The command line is:git diff $(git merge-base master feature-branch) feature-branch This command line uses git-merge-base to find the common ancestor between master and feature-branch and then compares feature-branch against that.
Updated on: 2023-06-07T17:28:14.571182+00:00