# git checkout won't detach head when a reference equals the detach point

1 messages from 2007-02-18 to 2007-02-18. Participants: Andy Parkins.
Thread: https://gitlist.dev/t/6870

## Andy Parkins, 2007-02-18 18:41

Subject: git checkout won't detach head when a reference equals the detach point
Message-ID: <200702181841.36203.andyparkins@gmail.com>
URL: https://gitlist.dev/e/200702181841.36203.andyparkins%40gmail.com

```
Hello,

Kind of convoluted, and perhaps not even an error.

On a repository with a remote tracking branch, say 
remotes/origin/master, then do this:

git checkout -b temp origin/master
git checkout origin/master
git branch
 * temp

This might seem like an odd thing to want to do, but I found this 
because the next thing I wanted to do was

git branch -D temp

Which won't work because the branch hasn't changed.




Andy
-- 
Dr Andrew Parkins, M Eng (Hons), AMIEE
andyparkins@gmail.com

```
