[LRUG] git question

Tom Stuart tom at experthuman.com
Thu Aug 20 03:55:28 PDT 2009


On 20 Aug 2009, at 11:45, Taryn East wrote:
> I'm having a newbie moment so I was hoping for a bit of help from  
> the git-gurus out there.
> So, what I'm trying to do is to create patches for rails core.

I'm by no means a git-guru, but I can tell you my own workflow for  
this kind of thing:

I make a local branch, do my work there, and regularly rebase it on  
top of upstream commits. As I'm sure you know, this means that git  
rewinds all of your changes, fast-forwards to accommodate the upstream  
changes, and then replays your work.

If nothing else this forces you to constantly be rethinking what your  
changes mean in terms of what's happening upstream, and avoids the  
situation where you end up with one giant horrendous merge right at  
the end.

On the other hand, it does mean that you're constantly "abandoning"  
your old commits and replacing them with freshly rebased ones, which  
is fine when you're working locally but can be a world of pain if  
you're actually publishing those commits anywhere (e.g. on your fork)  
and others are expecting them to remain relevant.

Cheers,
-Tom




More information about the Chat mailing list