Re: combine git repo historically

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sonntag, 11. Oktober 2009, Jakub Narebski wrote:
> Christian Couder <chriscool@xxxxxxxxxxxxx> writes:
> > $ git checkout -b repo1-branch1 remote/repo1/branch1
> > $ git checkout N -- .
> > $ export GIT_AUTHOR_NAME=<author name of commit N>
> > $ export GIT_AUTHOR_EMAIL=<author email of commit N>
> > $ export GIT_AUTHOR_DATE=<date of commit N>
> > $ git commit -a

This would not preserver the committer, but in particular the committer date 
is rather important for history traversal. You really don't want to change 
it. I used a much more elaborate pipleine involving git-commit-tree because I 
did not think about this simple procedure:

>  $ git cat-file commit N > COMMIT_N
>[ $ edit COMMIT_N  ]
>  $ git hash-object -t commit -w COMMIT_N

Thanks for this tip, Jakub.

Christian, one thing that worries me is that 'git cat-file commit foo' returns 
the replacement (bar) instead of the original (foo). Is it intended? There is 
no way to retrieve the original commit using plumbing unless the replacement 
is removed. Am I right?

-- Hannes
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]