{"action":"opened","issue":{"url":"https://api.github.com/repos/libgit2/libgit2sharp/issues/1235","labels_url":"https://api.github.com/repos/libgit2/libgit2sharp/issues/1235/labels{/name}","comments_url":"https://api.github.com/repos/libgit2/libgit2sharp/issues/1235/comments","events_url":"https://api.github.com/repos/libgit2/libgit2sharp/issues/1235/events","html_url":"https://github.com/libgit2/libgit2sharp/issues/1235","id":119500197,"number":1235,"title":"pull on cloned repo throws exception","user":{"login":"mtrachli0616144","id":11331213,"avatar_url":"https://avatars.githubusercontent.com/u/11331213?v=3","gravatar_id":"","url":"https://api.github.com/users/mtrachli0616144","html_url":"https://github.com/mtrachli0616144","followers_url":"https://api.github.com/users/mtrachli0616144/followers","following_url":"https://api.github.com/users/mtrachli0616144/following{/other_user}","gists_url":"https://api.github.com/users/mtrachli0616144/gists{/gist_id}","starred_url":"https://api.github.com/users/mtrachli0616144/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtrachli0616144/subscriptions","organizations_url":"https://api.github.com/users/mtrachli0616144/orgs","repos_url":"https://api.github.com/users/mtrachli0616144/repos","events_url":"https://api.github.com/users/mtrachli0616144/events{/privacy}","received_events_url":"https://api.github.com/users/mtrachli0616144/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-30T14:13:29Z","updated_at":"2015-11-30T14:13:29Z","closed_at":null,"body":"Hello,\r\n\r\nI started using this library a couple of weeks ago and I am running into some issues. \r\n\r\nI manage to clone the remote directory using the example from the doc. After wards, I perform various checkouts on remote branches in order to retrieve information useful for my app.\r\nAfter a while, I would like to make a pull on the remote in order to make the local version up to date, again i use the example from the doc:\r\n\r\n using (var repo = new Repository(@tmpRepoFolder))\r\n {\r\n PullOptions options = new PullOptions();\r\n                options.FetchOptions = new FetchOptions();\r\n                options.FetchOptions.CredentialsProvider = new CredentialsHandler(\r\n                    (url, usernameFromUrl, types) =>\r\n                        new UsernamePasswordCredentials()\r\n                        {\r\n                            Username = myUser,\r\n                            Password = myPwd\r\n                        });\r\n               \r\n                repo.Network.Pull(\r\n                    new Signature(myUsr, mail, new DateTimeOffset(DateTime.Now)),\r\n                    options);\r\n}\r\nThe previous code throws an exception when executing the Pull with the following message:\r\n{\"There is no tracking information for the current branch.\"}\r\n\r\nI looked for a bit inside the code and did some debugging. The issue seems to be that the Head property on the repo does not point to any branch(repo.Head.name = \"no branch\")\r\n\r\nI noticed that this happens after the first call to checkout repo.checkout(branchName).\r\n\r\nI am not sure this is actually a bug, but I am sure stuck for now. Can you please tell me what i am doing wrong here ?\r\n\r\nThanks\r\n"}}