From: Enrico Weigelt <enrico.weigelt@vnc.biz>
To: Mihamina Rakotomandimby <mihamina@rktmb.org>
Cc: Git Issues <git@vger.kernel.org>
Subject: Re: bare vs non-bare <1.7 then >=1.7 ?
Date: Sat, 10 Nov 2012 09:23:07 +0100 (CET) [thread overview]
Message-ID: <e4dc73e8-69f9-4695-b8f7-cbc0f04e8197@zcs> (raw)
In-Reply-To: <509B8552.4080303@rktmb.org>
> When experimenting in order to train some colleagues, I saw that If I
> clone a repository, I couldn't push to it because it was a non-bare
> one.
> Searchin for some explanations, I found this ressource:
> http://www.bitflop.com/document/111
That's just a precaution (technically it's not necessary, just stops
you from doing some dumb things). Suppose the following scenario:
* non-bare repository A, with branch 'master' currently checked out.
* clone B -> somebody's working on branch 'master' (which was forked
from A's master)
* on A, somebody did some local changes
* meanwhile somebody pushes the branch 'master' from B to A
* after that, on A, new commit to 'master'.
Weird things can happen, eg. the changes coming from B completely
reverted by the new commit in A.
Unless nobody pushes to the branch currently checked and later somebody
doing local changes after that, there shouldn't be any real technical
problem. But then, you most likely wont need an worktree anyways.
Wait, there *is* an usecase for such things, deploying trees (eg. webapps)
some server:
* application is developed in git
* the final production-system tree is maintained in certian branch
* a post-update hook acts on a specific production branch and does
something like git checkout --detach <treeish>
cu
--
Mit freundlichen Grüßen / Kind regards
Enrico Weigelt
VNC - Virtual Network Consult GmbH
Head Of Development
Pariser Platz 4a, D-10117 Berlin
Tel.: +49 (30) 3464615-20
Fax: +49 (30) 3464615-59
enrico.weigelt@vnc.biz; www.vnc.de
next prev parent reply other threads:[~2012-11-10 8:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-08 10:11 bare vs non-bare <1.7 then >=1.7 ? Mihamina Rakotomandimby
2012-11-08 13:26 ` Carlos Martin Nieto
2012-11-08 14:59 ` Jeff King
2012-11-10 8:23 ` Enrico Weigelt [this message]
2012-11-10 10:37 ` Philip Oakley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e4dc73e8-69f9-4695-b8f7-cbc0f04e8197@zcs \
--to=enrico.weigelt@vnc.biz \
--cc=git@vger.kernel.org \
--cc=mihamina@rktmb.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).