From: Alex Riesen Date: Fri, 11 May 2007 11:54:14 GMT Subject: Re: Merging commits together into a super-commit Message-ID: <81b0412b0705110454w5b18c267x17e82453e736f0b8@mail.gmail.com> In-Reply-To: <20070510215515.3084.qmail@science.horizon.com> On 10 May 2007 17:55:15 -0400, linux@horizon.com wrote: > Er... why is everyone making this so complex? > > git checkout trunk # Switch to "trunk" > git checkout branch . # Overwrite with "branch", but stay on "trunk" > git commit > > Now branch is the same tree object as "branch", but without the history. > > Of course, you could be even nastier and di a direct > > git-commit-tree branch^{tree} -p HEAD < commit_message > And it is not enough. Authorship information is lost. And you have to be damn sure the "branch" starts directly at HEAD, otherwise everything HEAD..branch is lost. It is complex if you want it right.