Another gnucash git question

John Ralls jralls at ceridwen.us
Sat Apr 30 12:47:53 EDT 2011


On Apr 30, 2011, at 9:06 AM, Geert Janssens wrote:

> On zaterdag 30 april 2011, John Ralls wrote:
>> Geert,
>> 
>> The first line of git-update is the perl form of `git pull --rebase
>> origin`, and it tacks whatever additional arguments on to it. If you're
>> not checked out in a branch that also exists on github, then git doesn't
>> know where to pull from. It's not good practice to pull directly from a
>> repo into a working branch, so either `git checkout trunk` before running
>> git-update or use `git-update trunk`.
>> 
> Ok, I think I'm still not really into the git mindset.
> 
> My repo didn't have a local branch named trunk, only refs/remotes/trunk. From 
> your description I gather that's not good.
> 
> So I used
> git branch -t trunk refs/remotes/origin/trunk
> to add a local trunk branch, tracking the github trunk branch. Seems to have 
> worked fine.
> 
> Next I ran
> git checkout trunk
> This issued following warning:
> warning: refname 'trunk' is ambiguous.
> But otherwise seems to have worked fine. Is that warning normal and should I 
> just ignore it (I don't like that very much, but can get used to it).
> 
>> Don't add branches to refs/remotes anything. Hang your working branches off
>> of your local mirror-branches (trunk and 2.4 if you have one; only trunk
>> is made automatically) -- and in this case you need to check and make sure
>> that your local trunk is pointed to refs/remotes/origin/trunk and not
>> refs/remotes/trunk. Check the SHA1s for the HEAD of each, and the config
>> to be sure.
>> 
> So I should rebase my branches off of the local trunk/2.4 branches. There is 
> indeed a local trunk branch now (since I've manually created it), but not a 
> 2.4 branch yet. I wanted to use the branch -t command to create one, but I 
> noticed there are several 2.4 branches in refs/remotes/origin: one plainly 2.4 
> and then a couple with an svn ref added to it. Which one should I use ?
> 
> And just to help me understand about how refs/remote works:
> * my original svn-tracking repo only contains
>  refs/remote/trunk
>  refs/remote/tags (empty directory)
> * when I clone github following the wiki, that repo will have
>  refs/remote/<lots of branch names>
>  refs/remote/origin (containing a file HEAD)
> * my svn-tracking-converted-to-github repo contains
>  refs/remote/<lots of branch names>
>  refs/remote/origin/<lots of branch names>
>  and no HEAD file
> 
> My config files for the clean github based repo and the converted repo seem to 
> contain the same information in both cases though, which is encouraging.
> 
>> There are some notes under the <refspec> description in
>> http://www.kernel.org/pub/software/scm/git/docs/git-pull.html that you may
>> find helpful.
>> 
> Yes, that was useful, thanks.

Geert,

You want to track refs/remotes/origin/2.4. The other ones are git-svn artifacts.

Regards,
John Ralls



More information about the gnucash-devel mailing list