I'm using git-svn to interact with an SVN repo that has branches.
After my clone via:
git svn clone $REPO/main -T trunk -b branches -t tags
my 'master' branch pointed to one of the branches in svn and not to
the main trunk. (my .git/config looked correct for svn interaction,
i.e. trunk pointed to the right place).
So, I overwrote refs/heads/master with the contents of refs/remotes/
trunk (i.e. the SHA-1 of the svn trunk).
Things seem to be working; git svn dcommit commits to the trunk and
git svn rebase updates from svn's trunk.
So, I want to make sure that refs/heads/master actuall does, in fact,
point to the head revision of whatever branch is considered "master".
Can someone comfirm this (or provide the actual explanation if I'm
wrong?)
Thanks!
Dave
From: Peter Harris <hidden> Date: 2016-06-15 22:45:44
On Mon, Dec 8, 2008 at 2:23 PM, davetron5000 wrote:
So, I overwrote refs/heads/master with the contents of refs/remotes/
trunk (i.e. the SHA-1 of the svn trunk).
Things seem to be working; git svn dcommit commits to the trunk and
git svn rebase updates from svn's trunk.
So, I want to make sure that refs/heads/master actuall does, in fact,
point to the head revision of whatever branch is considered "master".
I do believe so, yes. That, or an entry in packed-refs.
Can someone comfirm this (or provide the actual explanation if I'm
wrong?)
Overwriting internal files by hand feels a little too much like work
for my taste. I would have done something more like "git reset --hard
trunk" (or, if not on master, "git branch -D master; git branch master
trunk" ), but of course you can feel free to do things the hard way if
you prefer. :-)
Peter Harris
From: David Copeland <hidden> Date: 2016-06-15 22:45:44
Thanks for the info :)
The reason I edited by hand is when I was on trunk (e.g. git checkout
trunk), I did a git svn dcommit and it worked, but said "you aren't on
a branch", so I was concerned I might be in some weird state (i.e. if
trunk isn't a branch, can I make a branch off of it?)
Dave
On Mon, Dec 8, 2008 at 2:35 PM, Peter Harris [off-list ref] wrote:
On Mon, Dec 8, 2008 at 2:23 PM, davetron5000 wrote:
quoted
So, I overwrote refs/heads/master with the contents of refs/remotes/
trunk (i.e. the SHA-1 of the svn trunk).
Things seem to be working; git svn dcommit commits to the trunk and
git svn rebase updates from svn's trunk.
So, I want to make sure that refs/heads/master actuall does, in fact,
point to the head revision of whatever branch is considered "master".
I do believe so, yes. That, or an entry in packed-refs.
quoted
Can someone comfirm this (or provide the actual explanation if I'm
wrong?)
Overwriting internal files by hand feels a little too much like work
for my taste. I would have done something more like "git reset --hard
trunk" (or, if not on master, "git branch -D master; git branch master
trunk" ), but of course you can feel free to do things the hard way if
you prefer. :-)
Peter Harris
From: Peter Harris <hidden> Date: 2016-06-15 22:45:44
On Mon, Dec 8, 2008 at 2:42 PM, David Copeland wrote:
Thanks for the info :)
The reason I edited by hand is when I was on trunk (e.g. git checkout
trunk), I did a git svn dcommit and it worked, but said "you aren't on
a branch", so I was concerned I might be in some weird state (i.e. if
trunk isn't a branch, can I make a branch off of it?)
From: Björn Steinbrink <hidden> Date: 2016-06-15 22:45:44
On 2008.12.08 11:23:46 -0800, davetron5000 wrote:
I'm using git-svn to interact with an SVN repo that has branches.
After my clone via:
git svn clone $REPO/main -T trunk -b branches -t tags
my 'master' branch pointed to one of the branches in svn and not to
the main trunk. (my .git/config looked correct for svn interaction,
i.e. trunk pointed to the right place).
Just to clear up that bit as well. when the "fetch" finishes (which is
part of the clone process), git-svn checks if there is a master branch,
and if not, it creates one from the last commit it created. So if your
last svn commit was to branch XYZ and not to trunk, master will
reference that commit on branch XYZ.
Björn
From: David Copeland <hidden> Date: 2016-06-15 22:45:44
Ah, that makes sense (I did another clone of another repo and did not
experience this behavior, so now that all makes sense).
Thanks!
Dave
On Mon, Dec 8, 2008 at 4:26 PM, Björn Steinbrink [off-list ref] wrote:
On 2008.12.08 11:23:46 -0800, davetron5000 wrote:
quoted
I'm using git-svn to interact with an SVN repo that has branches.
After my clone via:
git svn clone $REPO/main -T trunk -b branches -t tags
my 'master' branch pointed to one of the branches in svn and not to
the main trunk. (my .git/config looked correct for svn interaction,
i.e. trunk pointed to the right place).
Just to clear up that bit as well. when the "fetch" finishes (which is
part of the clone process), git-svn checks if there is a master branch,
and if not, it creates one from the last commit it created. So if your
last svn commit was to branch XYZ and not to trunk, master will
reference that commit on branch XYZ.
Björn