git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* bare vs non-bare <1.7 then >=1.7 ?
@ 2012-11-08 10:11 Mihamina Rakotomandimby
  2012-11-08 13:26 ` Carlos Martin Nieto
  2012-11-10  8:23 ` Enrico Weigelt
  0 siblings, 2 replies; 5+ messages in thread
From: Mihamina Rakotomandimby @ 2012-11-08 10:11 UTC (permalink / raw)
  To: Git Issues

Hi all,

We're on the way to have our first project using Git.
We're currently mostly using Hg (90%) & SVN (10%).

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

It's told to be reliable information for Git < v1.7.

What would be different for Git > 1.7 so that I could be up to date with 
the facts?

Thank you.

-- 
RMA.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: bare vs non-bare <1.7 then >=1.7 ?
  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
  1 sibling, 1 reply; 5+ messages in thread
From: Carlos Martin Nieto @ 2012-11-08 13:26 UTC (permalink / raw)
  To: Mihamina Rakotomandimby; +Cc: Git Issues

Mihamina Rakotomandimby <mihamina@rktmb.org> writes:

> Hi all,
>
> We're on the way to have our first project using Git.
> We're currently mostly using Hg (90%) & SVN (10%).
>
> 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
>
> It's told to be reliable information for Git < v1.7.
>
> What would be different for Git > 1.7 so that I could be up to date
> with the facts?

Bare vs. non-bare hasn't changed. The reasoning behind the two types
hasn't changed and is pretty fundamental. There is no reason for it to
change.

   cmn

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: bare vs non-bare <1.7 then >=1.7 ?
  2012-11-08 13:26 ` Carlos Martin Nieto
@ 2012-11-08 14:59   ` Jeff King
  0 siblings, 0 replies; 5+ messages in thread
From: Jeff King @ 2012-11-08 14:59 UTC (permalink / raw)
  To: Carlos Martin Nieto; +Cc: Mihamina Rakotomandimby, Git Issues

On Thu, Nov 08, 2012 at 02:26:40PM +0100, Carlos Martín Nieto wrote:

> > 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
> >
> > It's told to be reliable information for Git < v1.7.
> >
> > What would be different for Git > 1.7 so that I could be up to date
> > with the facts?
> 
> Bare vs. non-bare hasn't changed. The reasoning behind the two types
> hasn't changed and is pretty fundamental. There is no reason for it to
> change.

Right. The key thing that changed in git v1.7 is that we started warning
about and denying an operation that had always been dangerous, and that
is why the referenced document mentions that version.

-Peff

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: bare vs non-bare <1.7 then >=1.7 ?
  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-10  8:23 ` Enrico Weigelt
  2012-11-10 10:37   ` Philip Oakley
  1 sibling, 1 reply; 5+ messages in thread
From: Enrico Weigelt @ 2012-11-10  8:23 UTC (permalink / raw)
  To: Mihamina Rakotomandimby; +Cc: Git Issues


> 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 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: bare vs non-bare <1.7 then >=1.7 ?
  2012-11-10  8:23 ` Enrico Weigelt
@ 2012-11-10 10:37   ` Philip Oakley
  0 siblings, 0 replies; 5+ messages in thread
From: Philip Oakley @ 2012-11-10 10:37 UTC (permalink / raw)
  To: Enrico Weigelt, Mihamina Rakotomandimby; +Cc: Git Issues

From: "Enrico Weigelt" <enrico.weigelt@vnc.biz> Sent: Saturday, November 
10, 2012 8:23 AM

> 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>
>
I have an alternative use-case for un-trained collegues :

The network shared drive has master checked out, and the .git directory 
is hidden. Untrained colleagues don't know I have it as a git remote. 
Even if they show hidden directories they will tend to ignore it as 
being just another spurious directory.

I develop on my own box (local directory) on my own branch 'Philip' and 
features therefrom. I push my development history back to the network 
remote to act as a backup. Because I don't touch master I can normally 
push to it quite happily.

When I have some finished work I can change to 'working' on the network 
drive, and merge or rebase my 'Philip' branch into master, and update 
the network's working tree. The untrained folk now see the new updated 
files as if I'd simply worked on / copied into the network share and 
they are non the wiser (yet) that I do have proper (micro managed) 
history.

I can also capture any changes they made to the network share so can go 
back to a point in history when required. It's in matlab and is not a 
big code base.

Philip 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-11-10 10:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2012-11-10 10:37   ` Philip Oakley

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