Confused about github rebasing

H. S. Teoh hsteoh at quickfur.ath.cx
Thu Mar 15 20:35:16 PDT 2012


On Fri, Mar 16, 2012 at 01:43:52PM +1100, Daniel Murphy wrote:
> "H. S. Teoh" <hsteoh at quickfur.ath.cx> wrote in message 
> news:mailman.719.1331847338.4860.digitalmars-d-learn at puremagic.com...
> 
> > Actually, I discovered that my origin/master branch was also broken
> > (probably due to running the wrong git command in it in the past),
> > because it had a bunch of commits from upstream that for some reason
> > had different hashes (maybe the result of attempting to merge from a
> > messed up branch?). This is probably why my topic branch was messed
> > up in the first place, I think.
[...]
> I used to have this problem all the time - now I have a script which
> checks out master and pulls with -ff-only (in all three repositories)
> giving me a nice big error if I accidentally committed to master.
> Although I think I just lost it when my hard drive died yesterday...

Ahh, thanks for the tip. I'll probably always use -ff-only from now on.
It's always such a mess to clean up if non-ff commits get merged in by a
pull. Prevention is better than cure, as they say.


> Get to know rebase -i as well, it can be very useful for untangling
> history. 
[...]

Yeah I tried that too, but in my case it was easier to just reset HEAD
back to wherever it diverged from and rerun the pull.


T

-- 
Don't modify spaghetti code unless you can eat the consequences.


More information about the Digitalmars-d-learn mailing list