Note that there are some explanatory texts on larger screens.

plurals
  1. POGit svn: how do I work with "partial" branches?
    primarykey
    data
    text
    <p>By "partial", I mean the branches in my SVN repository were not copied from trunk/, but from a subdirectory of trunk/. Here's the svn repo layout:</p> <pre><code>trunk/ core projectA projectB ... branches/ core_new_feature (branched from "core" on trunk) another_branch ... </code></pre> <p>I have inited my local repository and fetched:</p> <pre><code>mkdir git-svn-repo cd git-svn-repo git svn init -s svn+ssh://me@svn-server/path/to/repository git fetch &lt;wait four days&gt; </code></pre> <p>Now I'm trying to work on the "core_new_feature" branch. git branch -a shows:</p> <pre><code>* master remotes/core_new_feature ... (a bunch of other branches) </code></pre> <p>So I try:</p> <pre><code>git checkout --track -b git_new_feature remotes/core_new_feature </code></pre> <p>Git checks out files, and appears to be working. Yet when I try to browse my freshly checked out branch (ls local-git-root/core/), I get weirdness. Specifically, I don't see my source code or any of the existing changes on the core_new_feature SVN branch. All I see under core/ are a few empty directories, a seemingly random smattering of my exiting source tree under core.</p> <p>However, the "core_new_feature" source <strong>is</strong> available under local-git-root/src/ - it's just right there in the root of my git repository. projectA and projectB from above have disappeared.</p> <p>What I need is for the changes on the "core_new_feature" svn branch to go to the correct location (namely local-git-root/core/), and for the other projects to not disappear</p> <p>Clearly I'm missing some crucial step here, but I've looked through all the examples I could find, and none seems to deal with this issue. Maybe I need to set up my local repository differently?</p> <p>For reference, here's my .git/config file:</p> <pre><code>[core] repositoryformatversion = 0 filemode = false bare = false logallrefupdates = true symlinks = false ignorecase = true hideDotFiles = dotGitOnly [svn-remote "svn"] url = svn+ssh://me@svn-server/path/to/repository fetch = repository/trunk:refs/remotes/trunk branches = repository/branches/*:refs/remotes/* tags = repository/tags/*:refs/remotes/tags/* [branch "core_new_feature"] remote = . merge = refs/remotes/core_new_feature </code></pre> <p>My repository uses the standard branches/ tags/ trunk/ layout. I ran the commands using the git-bash shell that msysgit provides. Version is 1.7.4.</p> <p>Thanks in advance for any assistance.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload