Merging commits together into a super-commit
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
But that's not really necessary.
Starting from the branch, using the high-level commands is a bit awkward, but it's easy enough to:
git-update-ref HEAD trunk
git-commit
Quoted 6 lines · On 10 May 2007 17:55:15 -0400, [email protected] <[email protected]> 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
Quoted 6 lines
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.
2007/5/11, Alex Riesen <[email protected]>:
Quoted 1 line
And it is not enough. Authorship information is lost.
If one dare to make such super-commit, he would be the author of the whole couple of changes.
Quoted 3 lines
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.
I used to make git-rebase to add extra commits after this.
Quoted 5 lines · Eugine Kosenko
2007/5/11, Alex Riesen <[email protected]>:
Quoted 1 line
And it is not enough. Authorship information is lost.
If one dare to make such super-commit, he would be the author of the whole couple of changes.
No, he would not. He would be committer, but the change would still be based on the work of the original authors and therefore would have to be attributed to them (and especially they would still remain copyright holders).
Signature · 1 line
Jan 'Bulb' Hudec <[email protected]>