git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: "Simon 'corecode' Schubert" <corecode@fs.ei.tum.de>
Cc: Junio C Hamano <junkio@cox.net>,
	Steven Grimm <koreth@midwinter.com>,
	git@vger.kernel.org
Subject: Re: Pushing to a non-bare repository
Date: Sat, 3 Feb 2007 11:48:46 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0702031146050.8424@woody.linux-foundation.org> (raw)
In-Reply-To: <45C459DD.8080201@fs.ei.tum.de>



On Sat, 3 Feb 2007, Simon 'corecode' Schubert wrote:
> 
> However, your suggestion does not help people who don't know better.  Pushing
> into the HEAD branch of another repo breaks stuff there.  Badly.  This should
> be prevented, really.

No, please don't break it. I do it all the time.

I just do "git push remote".

And then eventually on the remote end I do end up having to "update", but 
that's a simple "git checkout -f".

It's actually really convenient. It works even if the remote end had 
dirty stuff in their tree, and "git diff" still works (because the push 
didn't update the index), and a simple "git diff HEAD" shows that "oops, 
we're not up-to-date".

Yeah, I guess it's a bit error-prone ("Why does 'git log' say I have a new 
version, but the working tree doesn't seem new?"), but it actually does 
work. 

		Linus

  parent reply	other threads:[~2007-02-03 19:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-03  3:01 Pushing to a non-bare repository Steven Grimm
2007-02-03  3:26 ` Junio C Hamano
2007-02-03  9:46   ` Simon 'corecode' Schubert
2007-02-03 19:42     ` Junio C Hamano
2007-02-03 19:48     ` Linus Torvalds [this message]
2007-02-03 21:18       ` Junio C Hamano

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=Pine.LNX.4.64.0702031146050.8424@woody.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=corecode@fs.ei.tum.de \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=koreth@midwinter.com \
    /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).