On Tuesday, May 12, 2015 at 1:39:32 PM UTC+2, J66st wrote:
>
> I have two repositories A and B. A is my working repository. B is a bare 
> repository containing a more detailed history than A. This is illustrated 
> in the following simplified graphs.
>
> *Repository A:*
>
>   <tagA]     <tagD]
>
>  /          / 
>
> A1--------D1---------E--F--G [master]
>
>                       \  \
>
>                        H--I--J [topic]
>
> *Repository B:*
>
>   <tagA]       <tagD]
>
>  /            /
>
> A2---B2--C2--D2
>
>
> What I want is in repository A to replace history A1 thru D1 by history A2 
> thru D2:
>
> *New repository A:*
>
>   <tagA]       <tagD]
>
>  /            /
>
> A2---B2--C2--D2------E--F--G [master]
>
>                       \  \
>
>                        H--I--J [topic]
>
>
>
>
>
> Notice that both histories use identical tag names for tagging versions!
> My first idea is to set repository B as a remote to repository A, then 
> fetch from B, rebase E onto D2, then prune A1 thru D1. But wouldn't 
> fetching from repository B cause the tag names to clash?
>
>
>
As far as I can remember, incoming tags being fetch will overwrite current 
tags. Just try it in a copy of the repository and see what happens.

What I usually do when binding together history from two distinct graphs, 
is grafting. See for example:


   - https://git.wiki.kernel.org/index.php/GraftPoint
   - http://ben.straubnet.net/post/939181602/git-grafting-repositories
   - blog.tfnico.com/2010/10/gitsvn-6-grafting-together-svn-history.html

You could also consider rebase --onto: 
http://stackoverflow.com/questions/3810348/setting-git-parent-pointer-to-a-different-parent

 

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to