GnuCash+git development process with multiple branches?

Derek Atkins derek at ihtfp.com
Mon Jul 1 08:03:42 EDT 2013


Hi,

On Mon, July 1, 2013 3:59 am, Geert Janssens wrote:
[snip]
>>>>
>>>> Fetching origin
>>>> fatal: Couldn't find remote ref HEAD
>>>> error: Could not fetch origin
>>>>
>>>> This is probably because refs/heads/ is empty in the bare repo?
>>>>
>>>> So what do you all do?  I'm thinking that once I figure it out I'll
>>>> update the GnuCash Git Wiki Page, although honestly I'm probably the
>>>> last dev to migrate to git :-P
>>>>
>>> Whew! I was afraid you were going to say that upgrading to perl 5.16
>>> blew
>>> up
>>> git-update!
>>>
>>> I just keep one git repo and flip around the branches as needed.
>>>
>>> Left to itself, git pull will update all of the checked out branches in
>>> the local repo,
>>> but we can't let it do that because each branch needs to have its refs
>>> updated
>>> (particularly for new tags), so git-update only rebases the currently
>>> checked out
>>> branch, so you have to git-update each branch in turn. More important,
>>> you
>>> need
>>> to fetch and update between dcommits when you're working in more than
>>> one
>>> branch (like backporting a change) or git-svn gets all confused and you
>>> spend a
>>> bunch of time resetting it back and rebasing before it will let you
>>> dcommit again.
>>>
>>> None of which explains why having a local bare clone wouldn't work. In
>>> fact, I just
>>> tried it and it seems to work -- though there aren't yet any changes to
>>> update, it didn't
>>> whine about anything:
>>>    $ athena:/Users/john> git clone --bare
>>> git://github.com/Gnucash/gnucash.gitCloning into bare repository
>>> 'gnucash.git'...
>>>    remote: Counting objects: 165617, done.
>>>    remote: Compressing objects: 100% (27553/27553), done.
>>>    remote: Total 165617 (delta 137995), reused 165002 (delta 137411)
>>>    Receiving objects: 100% (165617/165617), 109.62 MiB | 4.63 MiB/s,
>>> done.
>>>    Resolving deltas: 100% (137995/137995), done.
>>>    $ athena:/Users/john> cd gnucash.git
>>>    $ athena:/Users/john/gnucash.git> git fetch
>>>    From git://github.com/Gnucash/gnucash
>>>     * branch            HEAD       -> FETCH_HEAD
>>>    $ athena:/Users/john/gnucash.git>
>>>
>>> I'll leave it and try again tomorrow after somebody commits something.
>> I should note that I cloned from code.gnucash.org, not github..  Maybe
>> that makes a diference due to Master vs. Trunk?  I thought Geert was
>> going
>> to fix that, but maybe he didn't, yet?  Or maybe I need to?
>
> This was fixed. Trunk and master are the same branch (trunk is set up as
> an alias of master). So I don't think this should matter.

When was this fixed?  I just looked at the repos in gitolite and HEAD
points to refs/heads/master which doesn't exist in either gnucash.git or
gnucash-docs.git.  (It exists in gnucash-htdocs.git).

> It's not clear to me in which repo your git fetch command failed. Did
> you run this command in the bare repo to synchronize with
> code.gnucash.org, or was it in a clone of your bare repo to get this
> clone up to date with the bare repo ?

The bare repo.  I did:

git clone --bare ssh://git@code.gnucash.org/gnucash.git
cd gnucash.git
git fetch --all

And this last command failed as above.

> Geert

-derek

-- 
       Derek Atkins                 617-623-3745
       derek at ihtfp.com             www.ihtfp.com
       Computer and Internet Security Consultant



More information about the gnucash-devel mailing list