Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I remove fake remote branches I have after migrating from git-svn to git?
    primarykey
    data
    text
    <p>I've been using git-svn for a while (everyone else on my team has been using svn directly). We decided that we will all start using git. In order to do this, I used the git repo that is my "side" of git-svn like such:</p> <pre><code>$ git remote add origin git@github.com:mycompany/myproject.git $ git push -u origin master </code></pre> <p>This went fine, but when the process was complete I had retained all these ridiculous branches that git-svn had created when I first started using it, with one little kink; git would no longer even acknowledge that they were branches. Here's what my list looked like:</p> <pre><code>$ git branch -r domain_integration dot-org dot-org@1977 email-edit-page origin/account-integration origin/master origin/stable prototype_to_jquery-1.1.0 stable@1976 tags/development-1.1.0.0 tags/pre-2011-02-08 tags/production-1.0 tags/stable-1.0.0 tags/stable-1.0.1 tags/stable-1.1.0 tags/stable-1.1.0.1 trunk-stash </code></pre> <p>These were annoying, though I knew where they came from (mostly), but now I can't even delete them. This happens:</p> <pre><code>$ git branch -d trunk-stash error: branch 'trunk-stash' not found. </code></pre> <p>I was able to fix some of these by going into .git/refs/remotes and just deleting them, but there were only a few there. The only other place i can find them is in .git/info/refs. Which looks something like the following:</p> <pre><code>... 7788d300f0d4370d65a3ccf3e47d90f7fb16b0b4 refs/remotes/tags/stable-1.0.0 aace34d6745080ce2b6b29e927f5d1b050b99511 refs/remotes/tags/stable-1.0.1 58bd2ac23d5979ff61bd6305df18f8a5da50f888 refs/remotes/tags/stable-1.1.0 644fd55fcdf2569305cdbe0b6fefb9f247625658 refs/remotes/tags/stable-1.1.0.1 bc8e9f9177c9612aceb55624adea1b02e9e8620f refs/remotes/trunk 69493e14345e6a7a4db324935bccd6393f201da4 refs/remotes/trunk-stash 25b7024f6c1d38c10400b2c2e7b446aae1e84e06 refs/stash ... </code></pre> <p>I assume this is just associated the branches with their last commits. Does it make sense to delete the "fake" ones? Will this break something? (Will it work?)</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