Re: git svn pointing at svn branch instead of trunk?
- From
- Daniele Segato <daniele.bilug@gmail.com>
- Date
- Aug 30, 2009, 20:30 UTC
- Message-ID
- <1251664239.31273.11.camel@localhost>
- In-Reply-To
- <2729632a0908221140p532a3c29k90af7b4cbd25d65e@mail.gmail.com>
Il giorno sab, 22/08/2009 alle 11.40 -0700, skillzero@gmail.com ha scritto:
Show 8 quoted lines
> When I used git svn to clone a repository, it ended up pointing master > at a tag in svn instead of trunk. For example, git svn info shows the > URL for the tag instead of trunk. git log master also shows the most > recent commit is the creation of that tag in svn, but then the next > commit is the most recent commit to trunk. It's like it's mixing > things from the tag with things from trunk. The most recent commit in > svn was to create the tag that master is now pointing to in case that > matters.
I had the same problem a while ago.
When git-svn is done cloning you find yourself in the "master" branch (check by executing git branch) and it's content is the last svn-commit. If the last svn commit is a tag or in a branch you'll end up in that tag/branch
Show 5 quoted lines
> Is there something in the svn repository that might cause this? What's > the correct way to reset what git svn thinks master should point to? > And how should I get rid of the commit on master that created the tag > without messing up git svn (e.g. can I just git reset or will that > confuse git svn later?).
execute: git branch -r
it will list all the remote branches:
usually one will be "trunk"
if you now execute:
git reset --hard remotes/trunk
it will reset your current local branch (master) to the remote trunk and will start to truck that remote branch (trunk)
I'm a git newbie, so if i said something wrong I hope someone will correct me.
Cheers, Daniele