{"action":"created","issue":{"url":"https://api.github.com/repos/ingydotnet/git-subrepo/issues/184","repository_url":"https://api.github.com/repos/ingydotnet/git-subrepo","labels_url":"https://api.github.com/repos/ingydotnet/git-subrepo/issues/184/labels{/name}","comments_url":"https://api.github.com/repos/ingydotnet/git-subrepo/issues/184/comments","events_url":"https://api.github.com/repos/ingydotnet/git-subrepo/issues/184/events","html_url":"https://github.com/ingydotnet/git-subrepo/issues/184","id":152867682,"number":184,"title":"How to checkout remote branch","user":{"login":"dmoss18","id":1124441,"avatar_url":"https://avatars.githubusercontent.com/u/1124441?v=3","gravatar_id":"","url":"https://api.github.com/users/dmoss18","html_url":"https://github.com/dmoss18","followers_url":"https://api.github.com/users/dmoss18/followers","following_url":"https://api.github.com/users/dmoss18/following{/other_user}","gists_url":"https://api.github.com/users/dmoss18/gists{/gist_id}","starred_url":"https://api.github.com/users/dmoss18/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmoss18/subscriptions","organizations_url":"https://api.github.com/users/dmoss18/orgs","repos_url":"https://api.github.com/users/dmoss18/repos","events_url":"https://api.github.com/users/dmoss18/events{/privacy}","received_events_url":"https://api.github.com/users/dmoss18/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ingydotnet/git-subrepo/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-05-03T20:33:06Z","updated_at":"2016-05-06T14:30:45Z","closed_at":null,"body":"If I have a subtree for a remote with branches `master` and `otherbranch`, is there any way to alternate between those in my local project (the one that cloned the subrepo)? \r\n\r\nLooks like `git subrepo pull <subrepo-dir> -b otherbranch` will pull any new files in and create a commit, but then running `git subrepo pull <subrepo-dir> -b master` doesn't remove those new files, and it creates another commit. Is this not something that can be done?"},"comment":{"url":"https://api.github.com/repos/ingydotnet/git-subrepo/issues/comments/217455772","html_url":"https://github.com/ingydotnet/git-subrepo/issues/184#issuecomment-217455772","issue_url":"https://api.github.com/repos/ingydotnet/git-subrepo/issues/184","id":217455772,"user":{"login":"perlpunk","id":688850,"avatar_url":"https://avatars.githubusercontent.com/u/688850?v=3","gravatar_id":"","url":"https://api.github.com/users/perlpunk","html_url":"https://github.com/perlpunk","followers_url":"https://api.github.com/users/perlpunk/followers","following_url":"https://api.github.com/users/perlpunk/following{/other_user}","gists_url":"https://api.github.com/users/perlpunk/gists{/gist_id}","starred_url":"https://api.github.com/users/perlpunk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/perlpunk/subscriptions","organizations_url":"https://api.github.com/users/perlpunk/orgs","repos_url":"https://api.github.com/users/perlpunk/repos","events_url":"https://api.github.com/users/perlpunk/events{/privacy}","received_events_url":"https://api.github.com/users/perlpunk/received_events","type":"User","site_admin":false},"created_at":"2016-05-06T14:30:45Z","updated_at":"2016-05-06T14:30:45Z","body":"@dmoss18 For recloning, this worked for me:\r\n```\r\ngit subrepo clean subdir\r\ngit rm -r subdir\r\ngit subrepo clone ...\r\n```"}}