git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git checkout in a subdirectory

From
AAlenoosh <hope2end@gmail.com>
Date
Apr 3, 2011, 18:53 UTC
Message-ID
<1301856793041-6236473.post@n2.nabble.com>
Hi all

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 remotes/remote-git-branch
I want to do the git checkout in for example dir31 directory :
    cd dir3/dir31
    git checkout git-branch
-----------------------------------------------------------------------

How can I solve this problem ? I've checked all 'git checkout' options but couldn't find anything ...

Thanks in advance
Alenoosh

-- View this message in context: http://git.661346.n2.nabble.com/git-checkout-in-a-subdirectory-tp6236473p6236473.html Sent from the git mailing list archive at Nabble.com.

Message 1 of 1 in “git checkout in a subdirectory”
  1. AlenooshApr 3, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.