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

Duncan Gibson duncan.gibson at xs4all.nl
Sat Apr 18 21:08:32 CEST 2009


> This all gets back to when we first switched over to using git and I
> warned many of you about creating your repo's that you want to push to
> as "bare". Some of you heeded my advice and some not.

I was a git newbie when I set up my repo on doppio, and I didn't
really understand what you meant, or what difference it would make.

> For those that didn't then you need to read this URL:
>
> http://stackoverflow.com/questions/738154/what-does-git-updating-currently-checkout-out-branch-warning-mean

Ah. Now I understand why I've been getting those messages...

> Basically sometime in the near future git will NOT allow you to push
> to repo's that are not bare.

Hmm. That's a bummer! Now I might need an extra repo in between :-)

> I've tried to make sure the main lunar repo fits these requirements.
> Hopefully this hasn't broken some esoteric script running on doppio,
> that needed a non-bare repo.

http://wiki.lunar-linux.org/index.php/Module_Submission_for_developers
explains why I set up the two tier repo system that I have. I've just
tried to convert my doppio repo to being a --bare repo:

engelsman at doppio ~ $ mv moonbase.git moonbase.git.safe
engelsman at doppio ~ $ git clone --bare git://lunar-linux.org/lunar
/moonbase.git moonbase.git
Initialized empty Git repository in /home/engelsman/moonbase.git/
remote: Counting objects: 189883, done.
remote: Compressing objects: 100% (60399/60399), done.
remote: Total 189883 (delta 124406), reused 189883 (delta 124406)
Receiving objects: 100% (189883/189883), 28.10 MiB | 11631 KiB/s, done.
Resolving deltas: 100% (124406/124406), done.
engelsman at doppio ~ $ cd moonbase.git
engelsman at doppio ~/moonbase.git $ git checkout -b testing master
fatal: This operation must be run in a work tree
engelsman at doppio ~/moonbase.git $

Sofar's review script doesn't work with the --bare repo either:

engelsman at doppio ~/moonbase.git $ review equate-cvs
Please check you are in a valid moonbase git repository!
[This directory does not contain .git or zlocal or both]

I know that zmcgrew was testing a review script that mounted doppio
directories over ssh - I forget the details - but I never tested it.

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...

Cheers
Duncan



More information about the Lunar-dev mailing list