Re: disallowing push to currently checked-out branch
- From
Sergio Callegari <sergio.callegari@gmail.com>
- Date
- Feb 16, 2009, 10:17 UTC
- Message-ID
- <loom.20090216T101457-231@post.gmane.org>
- In-Reply-To
- <7veixybw7u.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster <at> pobox.com> writes:
Show 13 quoted lines
> > Daniel Barkalow <barkalow <at> iabervon.org> writes: > > > In fact, if you expect to be pushing to a non-bare repository, you > > probably want to have HEAD contain the actual commit currently checked > > out (instead of a reference to externally mutable storage), which you > > can do with "git checkout refs/heads/master". > > "git checkout master^0" is shorter > > For people who do not follow the git list regularly, a "HEAD contain the > actual commit" is often called "detached". >
Could you have that done automatically? Namely rather to denying push to a branch b where HEAD->b, when you get such push you detach head?