Why does this series of git-svn commands lead to a disconnected head?

I'm doing it:

$ 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 think I do not quite understand what is happening here under the hood. Should not remove / svn / trunk - tracking branch against svn repo? Why did I run out of a separate head?

+6
source share
1 answer

This is because it is a remote branch. To do this, you need to create a local branch with something like:

 git checkout -b my-trunk remotes/svn/trunk 
+8
source

Source: https://habr.com/ru/post/905151/


All Articles