title: git rebase local branch to remote master
body: <p>I am totally new to git and in an emergency to use git commands to rebase my local branch to remote master.
  Things happened like this.</p>
  
  <p>1.I forked a repo <a href="https://github.com/Logan676/seadroid" rel="nofollow">Logan676/seadroid</a> from <a href="https://github.com/haiwen/seadroid" rel="nofollow">haiwen/seadroid</a> on Github </p>
  
  <p>2.I created a new branch called <code>lguo</code> on <code>Logan676/seadroid</code></p>
  
  <p>3.Then do some changes, commits. At the same time the origin master <code>haiwen/seadroid</code> also updated by others.</p>
  
  <p>4.Now I want to rebase <code>lguo</code> to the latest origin master of <code>haiwen/seadroid</code>.</p>
  
  <p>I used commands below:</p>
  
  <pre><code>git fetch origin            # Updates origin/master
  git rebase origin/master    # Rebases current branch onto origin/master
  </code></pre>
  
  <p>And the output in gitbash is: <code>Current branch lguo is up to date</code>.</p>
  
  <p>But team members told me that my branch was rebased to the forked repo master not the origin master.
  I am so confused about that, did I miss any command? </p>
  
  <p>BTW, I notice someone wrote like this</p>
  
  <pre><code>git clone
  git checkout -b dev_branch
  [do some changes, commit]
  git fetch origin
  git rebase origin/master
  git push origin HEAD:master
  </code></pre>
  
  <p>so should I add the last command line</p>
  
  <pre><code>git push origin HEAD:master
  </code></pre>
  
  <p>I am afraid to use that command, I worried that will damage the origin master? what should I do?
  Any help from you will be appreciated.</p>