Re: disallowing push to currently checked-out branch
From: Jay Soffian <hidden>
Date: 2016-06-15 22:46:13
On Mon, Feb 16, 2009 at 3:02 PM, Johannes Schindelin [off-list ref] wrote:
Hi, On Mon, 16 Feb 2009, Jay Soffian wrote:quoted
I think the right thing is *not to detach*, but rather when pushing into a non-bare repo for it to go into refs/remotes.I do not think that is consistent.
Not consistent with what? So let's say I have a workstation and a laptop. The "sane" thing to do is probably something like this: workstation$ mkdir project && cd project && git init workstation$ (add, commit, ...) workstation$ git clone --bare . ../project.git workstation$ git remote add origin ../project.git laptop$ git clone ssh://workstation/~/project.git project And now I have two non-bare working repos with the intermediate bare repo. So at both ends I can push/pull in the way that the designers of git had in mind. :-) But I don't think this recipe is well documented for beginners. So they end up w/o the intermediate bare repository, and all the ensues. IOW, I think pushing into refs/remotes makes sense in the situation where the user has two non-bare repos that they want to exchange commits between. j.