From: Raimund Bauer Date: Thu, 01 Feb 2007 09:46:22 GMT Subject: RE: [PATCH] detached HEAD -- finishing touches Message-ID: <001a01c745e5$d59fde80$0b0aa8c0@abf.local> In-Reply-To: <7vlkjip7mu.fsf_-_@assigned-by-dhcp.cox.net> > [git.git (master)]$ git checkout master^ > M git-checkout.sh > Note: you are not on any branch and are at commit "master^" > If you want to create a new branch from this checkout, > you may do so > (now or later) by using -b with the checkout command > again. Example: > git checkout -b > > * Coming back to an attached state can lose the detached HEAD, so > I get warned and stopped. > > [git.git]$ git checkout master > You are not on any branch and switching to branch 'master' > may lose your changes. At this point, you can do one of > two things: > (1) Decide it is Ok and say 'git checkout -f master'; > (2) Start a new branch from the current commit, by saying > 'git checkout -b '. > Leaving your HEAD detached; not switching to branch 'master'. Here you have a detached HEAD, but you haven't build any commits on top of it. Why shouldn't you be allowed to move away? -- best regards Ray