Re: Merging commits together into a super-commit
- From
Alex Riesen <raa.lkml@gmail.com>
- Date
- May 11, 2007, 11:54 UTC
- 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 <linux@horizon.com> wrote:
Show 12 quoted lines
> 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.