From: Michael Witten Date: Fri, 12 Mar 2010 08:09:53 GMT Subject: Re: [Improvement?] How do you switch branches in a bare repo? Message-ID: In-Reply-To: <4B99DEA2.6050104@uq.edu.au> On Fri, Mar 12, 2010 at 00:26, Adam Nielsen wrote: > Hi all, > > I want to remove some commits (with git reset) from a bare repo, but they're > not in the master branch and I can't figure out how to change branches: > > $ git checkout newbranch > fatal: This operation must be run in a work tree Commands like "git checkout" and "git reset" essentially operate on 2 aspects of a repository: (1) The repository's state. (2) The repository's working tree. Is there any reason why these commands can't just operate on (1) in a bare repository, thereby allowing users to use familiar commands to get their work done? The "git checkout" command in a bare repository should serve to select on which branch other commands (like "git reset") operate, etc. Michael Witten