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
$ 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?

  • What is “the function name regex” for git log -L :<funcname>:<file>
  • How to tell if a Github repository is an R package
  • Is it possible to clone git config from remote location?
  • How to prevent git stash dropping changes to files with the “assume unchanged” bit?
  • Totally stuck in git - “git push” does not work, and “git pull” doesnt' fix
  • Error with importing android project *Android Studio*
  • How can I commit to an old git tag?
  • CVS or SVN or GIT?
  • Create a git patch from the changes in the current working directory
  • why do git reset commit + git push cause tip of current branch to go behind remote?
  • Xcode and git-lfs
  • Merging two git repositories from some specific commit
  • 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.