[LRUG] git question

Taryn East teast at globalpersonals.co.uk
Thu Aug 20 03:45:22 PDT 2009


I'm having a newbie moment (I'm an svn girl and have only really just
started using git) - 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.

Given I'll be doing a lot of related changes I figured I'd fork rails for
myself and make my changes on my fork - then bundle them into patches and
resubmit to core.
The benefit of having my own fork is that it's "up there" and viewable while
in progress - and I can get to in anywhere... as opposed to a local branch
of rails/rails - which is only available on my own machine.

So I tried that, did some changes, made some commits... then made some
patches based on those commits and submitted them... only to find that they
simply don't work.

I kept getting "patch does not apply" errors when I tired to run the patch
onto the real rails code.
Now,  during the time I was making my changes, rails had moved on (as it
does). I had merged back into my own fork... but it seems that my patches
didn't accept that and kept trying to find files (and LOC inside those
files) to patch that simply weren't there anymore...

Eventually I gave up and just made a local branch of rails/rails and
hand-applied my diffs, creating a patch for each one... but I still think
that surely there's a way to do it the "right" way.



>From reading around, I think the way you're "supposed" to do the fork-thing
is to make a fork, then branch your fork and make all your individual
commits - then bundle these up and commit to the master branch of your
fork... then do a pull-request on your fork... which seems like an awful lot
of work just to be able to bundle up a patch.

and this "Way Things Should Be Done" isn't very clear unless you read half a
dozen tutorials on exactly how you're supposed to use git... or happen to
have a git-mentor on hand....and from my svn perspective kind of seems a bit
bizarre that you can't work on (and then make working patches from) the
git-equivalent of trunk. :P


Have I missed something obvious?

Cheers,
Taryn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20090820/0ce57fb3/attachment-0003.html>


More information about the Chat mailing list