title: How to checkout to a new branch with Pygithub?
body: <p>This is what I have learned,</p>
  
  <pre><code>g = Github("user", "pass")
  repoName = "apiTest"
  print "Get all repos:"
  for repo in g.get_user().get_repos():
  print "\t%s" % repo.name
  
  print "&lt;---------------------------------------------------&gt;"
  
  print "Get all branches in repo %s:" % repoName
  for branch in g.get_user().get_repo(repoName).get_branches():
  print "\t%s" % branch.name
  
  print "&lt;---------------------------------------------------&gt;"
  
  print "Get last commit message in repo %s:" % repoName
  branch = g.get_user().get_repo(repoName).get_branch("dev")
  lastCommit = branch._commit.value.commit
  print "\t%s" % lastCommit._message.value
  print "\t%s"
  
  print "&lt;---------------------------------------------------&gt;"
  fc = repo.update_file("/README.md", "testing PyGithub", "test commit", fc.sha)
  print fc
  </code></pre>
  
  <p>but I 'd like to know how to checkout to a new branch. I didn't find any example online. Thank you very much.</p>