GIT: warning message about "updating currently checked out branch" and why you should care
duncan.gibson at xs4all.nl
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
1. On doppio to clone a bare copy of the central moonbase.git
git clone --bare git://lunar-linux.org/lunar/moonbase.git remote.bare
2. On doppio, clone a working copy from that for the review script
git clone remote.bare remote.work
3. On my box, clone a local working copy from my bare repo on doppio
git clone ssh://firstname.lastname@example.org/~me/remote.bare local.work
As far as I can tell so far, local.work 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 remote.work, I can 'git push' to, and 'git pull' from remote.bare.
In local.work, 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 remote.work and local.work because (a) my firewall is closed
so remote.work can't pull from local.work, and (b) local.work can't
push to remote.work 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