Unfrotuantly it is not working the way described, but maybe I'm doing 
something wrong:(, here goes

-created two git repos, mainproject and project1
- created a project1/subproject1/readme, did some dummy commits to readme
- to simulate svn move, I copied project1 under mainproject,and removed 
mainproject/project1/.git directory obviously, then committed as the "first 
commit" in the new repo
- removed the contents of project1/ and committed that as "last commit" in 
old repo
- comitted a "second commit" in the new repo with dummy changes to readme

- Now in order not to mess with this installation, I created a new project 
that fetched both projects
- Created a graft point with 
"<second commit> <first commit> <last commit from old repo>"
- and called "git filter-branch --tag-name-filter cat -- --all"
- it rewrote the new repo branch, but it didn't create "second commit" as 
the merge commit, it still can not recognize the moved files, also with 
follow

any ideas?


On Wednesday, May 14, 2014 10:22:44 PM UTC+2, Thomas Ferris Nicolaisen 
wrote:
>
> On Wednesday, May 14, 2014 9:19:37 PM UTC+2, Moataz Elmasry wrote:
>>
>> Aha that would be exactly what I'm looking for, how can one define the 
>> first commit in mainrepo as a merge commit of several repositories. Only 
>> using graft point with one child and several parents does not allow me to 
>> follow a file history from main project through the older projects
>>
>
> Hm, let's say that the first commit in the mainRepo is abc123. It's 
> basically just a commit where a thousand files are added.
>
> You then do the grafting. The commit abc123 is then rewritten to not only 
> be thousand addeded files, but also a thousand removed files, as the files 
> are being moved from their old-structure location. 
>
> Git doesn't track any renames, it does rename detection upon inspection. 
> Simply explained, if in a commit a file is removed, and another file is 
> added which looks very similar, Git will consider this a rename in the 
> moment you run git log. Of course it doesn't work perfectly in all cases, 
> and I assume that graft points is one of these. Before you make any 
> conclusions, make sure to finalize the grafts as explained 
> here<http://thomasrast.ch/git/git-svn-conversion.html> (good 
> read for anyone doing grafting):
>
> git filter-branch --tag-name-filter cat -- --all
>
> Also keep in mind that you have to use git log *--follow* to view the 
> history of a file across renames.
>

-- 
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