Subject: Re: On git 1.6 (novice's opinion)

From: Matthieu Moy <[email-masked]>
Date: Wed, 01 Apr 2009 09:41:09 +0200

"Ulrich Windl" <[email-masked]> writes:

> On 27 Mar 2009 at 14:47, Etienne Vallette d'Osia wrote:
>
>> Ulrich Windl a écrit :
>> > AFAIK, "committing" in git is "kind of publishing your work" (others may pull it). 
>> > I don't like publishing my mistakes ;-) Even if no-one pulls the commit, your 
>> > "undo" refers to "committing a fix for the last committed mistake", right? Again, 
>> > I don't really want to document/archive (i.e. commit) my mistake. Or did I miss 
>> > something here?
>> > I know: Other's opinions are quite different on these issues.
>> 
>> commit is local.
>
> I had made the experience that you can "pull" from a local directory (unless 
> permissions forbid it). As I can't control what others are doing, a "commit" is 
> still more or less making the results public (unless you can convince me that 
> 	I'm wrong). OK, I grew up with servers that host hundreds of users, not with 
> having my own laptop...

Multi-users server, or NFS-shared $HOME, yes, expose every working
tree and therefore directories to other users. But still, the good
practice would be to distinguish your working area, and a "clean"
area if you want to get all the power of distributed version control.

One of the main points in having version control distributed is
precisely to allow you to distinguish private things and published
ones (i.e. commit != push). Linus explains this better than I do in
his talk:

  http://www.youtube.com/watch?v=4XpnKHJAok8

You _can_ expose your working tree directly to others, but if you do
so, you'll have to forget about "git commit --amend", 
"git reset <anything-else-than-HEAD>", "git rebase", 
"git filter-branch", ... (any history-editing feature of Git indeed).

OTOH, the common setup for people is to have a workstation (laptop or
desktop) without a public access (for example, my home computer is
switched of when I'm not using it, and my office station is only
reachable from outside with ssh), and to publish things on another
server. So, in the common case, the distinction private/public is
natural.

-- 
Matthieu