GIT: warning message about "updating currently checked out branch" and why you should care

Duncan Gibson duncan.gibson at
Sun Apr 19 21:32:21 CEST 2009

>> explains why I set up the two tier repo system that I have.
>> ...
>> Sofar's review script doesn't work with the --bare repo either:

> correct, it needs to make diffs and that's hard to compare a local file
> copy against a remote non-file non-checkout out copy - it'll basically
> never work.

>> I really don't want to open up my firewalls and systems if I can
>> avoid it, because I don't have the security expertise of you and sofar.
>> What would your advice be on how to set up the local and remote repos?
>> Maybe it could be on a wiki page for those that might come after...

> aside from the review script, nothing wrong with pushing from your home
> checkout straight to the main git repo on doppio.
> those working with the review script should just do a checkout of
> moonbase in their home folder on doppio.

So, from what's been said, and some experimenting with multiple local
repositories, if I want to continue working in the same way described in
I need:

1. On doppio to clone a bare copy of the central moonbase.git
   git clone --bare git:// remote.bare

2. On doppio, clone a working copy from that for the review script
   git clone remote.bare

3. On my box, clone a local working copy from my bare repo on doppio
   git clone ssh://

As far as I can tell so far, no longer needs the
    git config --get-regexp '^(remote|branch)\.'
    git config remote.origin.push master:refs/remotes/satellite/master
lines that came from the Everyday GIT With 20 Commands Or So article.

In remote.bare I can now 'git push' to moonbase,git without warning,
but I now need to 'git fetch' from moonbase.git instead of 'git pull'

In, I can 'git push' to, and 'git pull' from remote.bare.

In, I can 'git push' to, and 'git pull' from remote.bare.

I have to push/pull things via remote.bare if I want to share them
between and because (a) my firewall is closed
so can't pull from, and (b) can't
push to because it's not a bare repo.

Phew! I think I'm getting my head around it.

Is there anything that I missed before I update the wiki page?


More information about the Lunar-dev mailing list