title: How to add/commit and push a repository via git-python?
body: <p>I am trying to use git-python to add, commit and push to a repository. Following the incomplete documentation and an example <a href="https://stackoverflow.com/questions/41836988/git-push-via-gitpython">here</a> I tried it the following way:</p>
  <pre class="lang-py prettyprint-override"><code>myrepo = Repo('Repos/hello-world/.git')
  # make changes to README.md
  myrepo.index.add('README.md')
  myrepo.index.commit(&quot;Updating copyright year&quot;)
  myrepo.git.push(&quot;origin&quot;, &quot;copyright_updater&quot;)   ###
  </code></pre>
  <p>I checked out the repository <code>hello_world</code> and put it under a folder <code>Repos</code>. I did change a single file, the <code>README.md</code>. But with that code I get an error</p>
  <pre><code>git.exc.GitCommandError: Cmd('git') failed due to: exit code(1)
     cmdline: git push origin copyright_updater
     stderr: 'error: src refspec copyright_updater does not match any.
   error: failed to push some refs to 'git@github.com:alex4200/hello-world.git''
  </code></pre>
  <p>in the marked line.</p>
  <p>How can I fix it, in order to push the changes to a new branch and to create a pull request on GitHub?</p>