[LRUG] git question

Taryn East teast at globalpersonals.co.uk
Thu Aug 20 04:38:10 PDT 2009


2009/8/20 Tom Stuart <tom at experthuman.com>

> On 20 Aug 2009, at 12:20, Taryn East wrote:
>
>> Ok, so now I'm guessing that part of the issue is that I did:
>> commit, commit,commit,commit... rebase...
>> then created *several* patches - the first of which only used the first
>> commit... ie didn't include the rebase
>>
>
> That doesn't make sense in as much as rebasing effectively abandons the
> original commits and makes new ones. So it's fine to do a bunch of commits,
> then rebase them, then make a patch from "the first one", because actually
> the rebasing operation has recreated that commit on top of the upstream
> changes.
>
> It seems more likely that your mistake has been a failure to actually
> incorporate upstream changes from the Rails repository, because your fork is
> sort of a frozen snapshot of the state of Rails when you forked it, and
> GitHub doesn't provide any magical mechanism to keep your fork in sync, so
> you have to manage this manually one way or another.


ok - now I'm confused - because I'm pretty sure I did that :(
So maybe it's just that I used git-log -p to make the patches?


> If you don't already, I strongly recommend you use some sort of local
> visualisation tool (GitX is good if you're on OS X, otherwise git-gui will
> do) to have a look at where your commits live and what they're sitting on
> top of. If you compare this view with the latest commits in the Rails repo
> it should be obvious whether or not you're up-to-date with it.
>

I do/did... but you can't use gitk to make patches... which would have made
sense to me. In my mind I could "cherry pick" the commits I wanted in the
patch and that would be nice... but it doesn't work that way :P

In the end I basically hand-copied the SHA1 ids of the commits I'd made
(because there was all the cruft in there from rails/rails... pages and
pages of it that had been done in the meantime) and then used those to feed
into git-log -p for the patch.

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


More information about the Chat mailing list