title: Pull & rebase from local branch
body: <p>I would like to fetch all branches from the remote and then rebase my current branch on any changes to the master branch. </p>
  
  <p>To do this, for some reason, I need to first checkout master, pull, and then go back to my current branch to rebase. Is there anyway to do this without having to switch branches?</p>
  
  <p>Here is the workflow:</p>
  
  <pre><code>&gt; git check_out main
  &gt; git checkout my_branch
  &gt; ...
  &gt; # do some work on my_branch
  &gt; ...
  </code></pre>
  
  <p>To then rebase on the latest changes to master, I can do the following:</p>
  
  <h2>Option 1:</h2>
  
  <pre><code>&gt; # Update my master with remote master
  &gt; git checkout master
  &gt; git pull
  &gt; git checkout my_branch
  &gt; git rebase master 
  </code></pre>
  
  <h2>Option 2 (without switching branches). It doesn't seem to work:</h2>
  
  <pre><code>&gt; git pull # Or git fetch
  &gt; # It complains with "There is no tracking information for the current branch"
  &gt; git rebase master 
  </code></pre>
  
  <p>How can I rebase on master without switching branches?</p>