From: Daniel Barkalow Date: Mon, 16 Feb 2009 08:33:29 GMT Subject: Re: disallowing push to currently checked-out branch Message-ID: In-Reply-To: On Sun, 15 Feb 2009, david@lang.hm wrote: > If there is some reason for the normal push to try and update the HEAD, index, > and workdir. instead of refusing the push, how about having it put the commits > in the repository and then fail to change the HEAD, index, and workdir if any > of them contain changes? (along with a warning that it's doing so). A push cannot help but update HEAD, because HEAD is generally literally "ref: refs/heads/"; it doesn't store its own value, and the storage that it references is the storage that push is updating. 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". -Daniel *This .sig left intentionally blank*