On Mon, 4 Apr 2011 02:20:42 -0700 (PDT)
alenoosh <hope2...@gmail.com> wrote:

> I have recently converted my svn repository to git repository (A) but
> I did
> not convert the svn branches , here is my problem :
> 
> One of my svn branches is a branch of a subdirectory , I have
> converted that
> to a separate git repo (B) and
> created a git branch from that in the (A) git repo but the problem is
> that I
> can't checkout that branch in the corresponding subdirectory of my git
> repo
> (A) ...
> 
> my git repo (A) looks something like this :
> 
> ----------------------------------------------------------------------
> git-repo
>    |-- dir1
>    |-- dir2
>    |-- dir3 -- dir31
> 
> here's what I have done :
>    cd /tmp
>    git svn clone   B
>    git clone --bare /tmp/B   B
>    cd git-repo
>    git remote add remote-git-branch B
>    git fetch remote-git-branch
>    git branch git-branch remote-git-branch/master
> 
> I want to do the git checkout in for example dir31 directory :
> 
>    cd dir3/dir31
>    git checkout git-branch
> -----------------------------------------------------------------------
> 
> git checkout causes my whole git-repo to be replaced by contents of
> git-branch ...
> 
> How can I solve this problem ?
> I've checked all 'git checkout' options but couldn't find anything ...

Most probably, "git submodules" is a way to go:
https://git.wiki.kernel.org/index.php/GitSubmoduleTutorial
http://www.kernel.org/pub/software/scm/git/docs/git-submodule.html
http://progit.org/book/ch6-6.html

Alternatively, just check out B somewhere outside of A and then make
dir3/dir31 a symlink to the work tree of B.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.

Reply via email to