<p>When people say git encourages rewriting history.  Don't listen.  Once you have pushed your changes to the world they are immutable.  This is because git uses cryptography internally and changing the history messes everything up.  If you haven't pushed you can change all of your history and it will all be fine.  But if someone else (github) has the old hisory bad things happen.  If you are sure nobody has pulled from github you can use --force when pushing (I think).  It will work no matter what but you will piss off people if they have pulled from you.  Please note that this kind of history modifying is considered bad practice.</p>

<div class="gmail_quote">On Mar 1, 2012 10:10 AM, "H. S. Teoh" <<a href="mailto:hsteoh@quickfur.ath.cx">hsteoh@quickfur.ath.cx</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
OK, so I'm new to git, and I ran into this problem:<br>
<br>
- I forked druntime on github and made some changes in a branch<br>
- Pushed the changes to the fork<br>
- Pulled upstream commits to master<br>
- Merged master with branch<br>
- Ran git rebase master, so that my changes appear on top of the latest<br>
  upstream master.<br>
- Tried to push branch to my fork, but now it complains that I have<br>
  non-fast-forward changes and rejects the push.<br>
<br>
What's the right thing to do here? Looks like I screwed up my branch<br>
history. How do I fix it?<br>
<br>
Thanks!<br>
<br>
<br>
T<br>
<br>
--<br>
Real Programmers use "cat > a.out".<br>
</blockquote></div>