Re: Pushing to a non-bare repository

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]