{"action":"opened","issue":{"url":"https://api.github.com/repos/git-tfs/git-tfs/issues/836","labels_url":"https://api.github.com/repos/git-tfs/git-tfs/issues/836/labels{/name}","comments_url":"https://api.github.com/repos/git-tfs/git-tfs/issues/836/comments","events_url":"https://api.github.com/repos/git-tfs/git-tfs/issues/836/events","html_url":"https://github.com/git-tfs/git-tfs/issues/836","id":99492045,"number":836,"title":"The branch you try to init is a root branch (e.g. has no parents)","user":{"login":"justintconroy","id":214411,"avatar_url":"https://avatars.githubusercontent.com/u/214411?v=3","gravatar_id":"","url":"https://api.github.com/users/justintconroy","html_url":"https://github.com/justintconroy","followers_url":"https://api.github.com/users/justintconroy/followers","following_url":"https://api.github.com/users/justintconroy/following{/other_user}","gists_url":"https://api.github.com/users/justintconroy/gists{/gist_id}","starred_url":"https://api.github.com/users/justintconroy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justintconroy/subscriptions","organizations_url":"https://api.github.com/users/justintconroy/orgs","repos_url":"https://api.github.com/users/justintconroy/repos","events_url":"https://api.github.com/users/justintconroy/events{/privacy}","received_events_url":"https://api.github.com/users/justintconroy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-06T17:59:18Z","updated_at":"2015-08-06T17:59:18Z","closed_at":null,"body":"I have the folowing branch structure in TFS, as output by the\r\n`git tfs list-remote-branches` command (this was for a real project,\r\nbut I've changed some names):\r\n\r\n    $/Project/Main [*]\r\n    |\r\n    +- $/Project/Test\r\n    |  |\r\n    |  +- $/Project/Dev\r\n    |  |  |\r\n    |  |  +- $/Project/Feature/Feature1\r\n    |  |  |\r\n    |  |  +- $/Project/Feature/Feature2\r\n\r\nWhen I attempt to clone everything into git by calling git tfs clone on\r\nthe main branch with the --with-branches flag, it doesn't get any of those\r\nbranches and says that they are root branches with no parents, even though\r\nin TFS I can see the hierarchy of the branches just fine. Here's the\r\noutput of `git tfs`:\r\n\r\n    $ git tfs clone http://tfs:8080/tfs/DefaultCollection \"$/Project/Main\" --with-branches\r\n    Initialized empty Git repository in c:/_Projects/Main/.git/\r\n    Fetching from TFS remote 'default'...\r\n    C25558 = 5035441892168a968c5b611a9bd802e59f028d93\r\n    C25568 = aa8bef4af8658273e8ab338ccadf30ae626d2270\r\n    Tfs branches found:\r\n    - $/Project/Test\r\n    - $/Project/Dev\r\n    - $/Project/Feature/Feature1\r\n    - $/Project/Feature/Feature2\r\n    => Working on TFS branch : $/Project/Feature/Feature1\r\n    Branches to Initialize successively :\r\n    -$/Project/Feature/Feature1 (25570)\r\n    The name of the local branch will be : Feature/Feature1\r\n    error: an error occurs when initializing the branch. Branch is ignored and continuing...\r\n    => Working on TFS branch : $/Project/Feature/Feature2\r\n    Branches to Initialize successively :\r\n    -$/Project/Feature/Feature2 (25570)\r\n    The name of the local branch will be : Feature/Feature2\r\n    error: an error occurs when initializing the branch. Branch is ignored and continuing...\r\n    => Working on TFS branch : $/Project/Main\r\n    Warning: `git gc` failed!\r\n    warning: Some Tfs branches could not have been initialized:\r\n    - $/Project/Test\r\n    - $/Project/Dev\r\n    - $/Project/Feature/Feature1\r\n    - $/Project/Feature/Feature2\r\n\r\n    Please report this case to the git-tfs developers! (report here : https://github.com/git-tfs/git-tfs/issues/461 )\r\n    warning: Some Tfs branches could not have been initialized or entirely fetched due to errors:\r\n    - $/Project/Test\r\n       =>error:error : the branch you try to init '$/Project/Solution' is a root branch (e.g. has no parents).\r\n    - $/Project/Dev\r\n       =>error:error : the branch you try to init '$/Project/Solution' is a root branch (e.g. has no parents).\r\n    - $/Project/Feature/Feature1\r\n       =>error:error : the branch you try to init '$/Project/Solution' is a root branch (e.g. has no parents).\r\n    - $/Project/Feature/Feature2\r\n       =>error:error : the branch you try to init '$/Project/Solution' is a root branch (e.g. has no parents).\r\n\r\n    Please report this case to the git-tfs developers! (report here : https://github.com/git-tfs/git-tfs/issues )\r\n\r\nThe output of `git tfs version` is:\r\n\r\n    git-tfs version 0.22.0.0 (TFS client library 12.0.0.0 (MS)) (64-bit)"}}