[LRUG] git question

Tom Lea lrug at tomlea.co.uk
Thu Aug 20 04:14:08 PDT 2009


On 20 Aug 2009, at 12:04, Tom Stuart wrote:

> On 20 Aug 2009, at 11:59, Taryn East wrote:
>> Every couple of days I did a git pull and rebase.
>> I had several chunks of functionality to send in - and wanted four  
>> separate patches but the very first of these wouldn't apply as the  
>> code of the underlying file (ActiveResource::Validations)  had  
>> changed, so the patch was saying that it referred to line 8 - and  
>> line 8 no longer matched where the changes had been made.
>
> This is sort of a contradiction in terms if the rebase succeeded.  
> Your commits are by definition a set of changes on top of the remote  
> master (assuming you're up-to-date with it) so your patches should  
> always apply. How are you actually creating the patches?

But which remote master?

Try creating the following:
	git remote add upstream git://github.com/rails/rails.git
	git fetch upstream
         git checkout -b upstream upstream/master

we now have a branch tracking the official rails repo.

	git checkout master # or your branch
	git rebase upstream

you should now have a master branch which is your changes ontop of the  
upstream rails repo.


(if you want to work against the 2-3-stable branch you will need to  
use upstream/2-3-stable instead of upstream/master).

Hope this helps.

>
> Cheers,
> -Tom
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org




More information about the Chat mailing list