Why does this series of git-svn commands result in a detached HEAD?

I do this:

$ git svn clone http://monsterdebugger.googlecode.com/svn/ -s --prefix=svn/ monsterdebugger
$ cd monsterdebugger
$ git branch -a
* master
  remotes/svn/trunk
$ git co remotes/svn/trunk
Note: checking out 'remotes/svn/trunk'.

You are in 'detached HEAD' state. <And so on...>

I guess I’m not fully understanding what’s going on under the hood here. Shouldn’t remotes/svn/trunk be a tracking branch against the svn repo? Why did I end up with a detached head?

  • Multiple Git repositories in one directory
  • Recommended git mode for Emacs
  • Checkout subfolder in git
  • What does git rev-parse do?
  • Is it possible to git grep for tabs?
  • Specify extras_require with pip install -e
  • Just starting with TortoiseGit, why does it need my email for a local repository?
  • git : Small project work
  • gitolite or gitosis: permission on directory inside of the repository
  • git - move branch “tag” to other commit?
  • How do I execute several git commands in a batch file without terminating after the first command?
  • git rebase master then push origin branch results in non-fast-forward error
  • One Solution collect form web for “Why does this series of git-svn commands result in a detached HEAD?”

    It’s because it’s a remote branch. You need to create a local branch for it, with something like:

    git checkout -b my-trunk remotes/svn/trunk
    
    Git Baby is a git and github fan, let's start git clone.