On Wednesday, September 5, 2012 12:33:12 AM UTC+2, EvanED wrote:
> I have a repository containing some files which have undergone some 
> arbitrary copies/movies in the past, such that you need 'git log --follow' 
> to view all the relevant history for those files. I'd like to use something 
> like 'git filter-branch --subdirectory-filter ...' to extract a parent 
> directory of these files. However, just doing that drops the "extra" 
> history that you need --follow to find.
> How can I save it?
> I've put full steps to reproduce my problem at 
> http://pastebin.com/8L2fWjAp. After carrying out those steps, it's also 
> possible to use gitk to see that there are only two commits on the master 
> branch at all, and it's not just that git log isn't finding the history.

I think you won't get away with using --subdirectory-filter. You'll have to 
do the inverse: filter-branch and remove everything outside the 
subdirectory that you don't want to keep, and then move the contents of the 
subdirectory to the root of the repository.

You could also try out the more recent git subtree 
 see if that does what you need automatically (although I doubt it).  

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To view this discussion on the web visit 
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to