From tpchan at comcast.net Sat Apr 18 15:39:31 2009 From: tpchan at comcast.net (Terry Chan) Date: Sat, 18 Apr 2009 08:39:31 -0500 Subject: GIT: warning message about "updating currently checked out branch" and why you should care Message-ID: <20090418133931.GA29218@sega.hsd1.il.comcast.net> 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. 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 Basically sometime in the near future git will NOT allow you to push to repo's that are not bare. 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. Terry Chan From duncan.gibson at xs4all.nl Sat Apr 18 21:08:32 2009 From: duncan.gibson at xs4all.nl (Duncan Gibson) Date: Sat, 18 Apr 2009 21:08:32 +0200 (CEST) Subject: GIT: warning message about "updating currently checked out branch" and why you should care Message-ID: <21790.82.93.24.95.1240081712.squirrel@webmail.xs4all.nl> > 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 From auke at foo-projects.org Sat Apr 18 22:36:10 2009 From: auke at foo-projects.org (Auke Kok) Date: Sat, 18 Apr 2009 13:36:10 -0700 Subject: GIT: warning message about "updating currently checked out branch" and why you should care In-Reply-To: <21790.82.93.24.95.1240081712.squirrel@webmail.xs4all.nl> References: <21790.82.93.24.95.1240081712.squirrel@webmail.xs4all.nl> Message-ID: <49EA39BA.2090906@foo-projects.org> Duncan Gibson wrote: >> 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] 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 know that zmcgrew was testing a review script that mounted doppio > directories over ssh - I forget the details - but I never tested it. don't do that please. Just asks for big big mistakes to be made... > 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. Auke From duncan.gibson at xs4all.nl Sun Apr 19 21:32:21 2009 From: duncan.gibson at xs4all.nl (Duncan Gibson) Date: Sun, 19 Apr 2009 21:32:21 +0200 (CEST) Subject: GIT: warning message about "updating currently checked out branch" and why you should care Message-ID: <17233.82.93.24.95.1240169541.squirrel@webmail.xs4all.nl> Me: >> http://wiki.lunar-linux.org/index.php/Module_Submission_for_developers >> 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: Sofar: > 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. Me: >> 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... Sofar: > 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 http://wiki.lunar-linux.org/index.php/Module_Submission_for_developers I need: 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://me at lunar-linux.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? Cheers Duncan From samuel.verstraete at gmail.com Mon Apr 20 10:13:14 2009 From: samuel.verstraete at gmail.com (samuel) Date: Mon, 20 Apr 2009 10:13:14 +0200 Subject: GIT: warning message about "updating currently checked out branch" and why you should care In-Reply-To: <20090418133931.GA29218@sega.hsd1.il.comcast.net> References: <20090418133931.GA29218@sega.hsd1.il.comcast.net> Message-ID: On Sat, Apr 18, 2009 at 3:39 PM, Terry Chan wrote: > 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. 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 > > Basically sometime in the near future git will NOT allow you to push to repo's > that are not bare. > > 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. > > Terry Chan > _______________________________________________ > Lunar-dev mailing list > Lunar-dev at lunar-linux.org > http://foo-projects.org/mailman/listinfo/lunar-dev > No idea what this is about... but it's working now... so i'll see when i get hit by this i guess