title: How to efficiently rebase and push a local git branch?
body: <p>We're using a central git repository which I've cloned and I'm working on a local branch.</p>
  
  <p>When I want to make my changes available in the central repository, I have to issue the following commands (starting on <code>mybranch</code>):</p>
  
  <pre><code>#Stash local changes not yet ready for checkin
  git stash
  
  #Make sure we have all changes from the central repository
  git checkout master
  git pull
  
  #Rebase local changes
  git checkout mybranch
  git rebase
  
  #Push changes
  git checkout master
  git merge mybranch
  git push
  
  #Back to my branch and continue work
  git checkout mybranch
  git stash apply
  </code></pre>
  
  <p>I'd like to know if it is possible to use fewer git commands to accomplish the same goal. The several switches between <code>master</code> and <code>mybranch</code> are especially annoying, as our repository is rather huge so they take some time.</p>