[LRUG] git question

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


2009/8/20 Chris Mear <chrismear at gmail.com>

> On 20 Aug 2009, at 11:59, Taryn East wrote:
>
> If the patches weren't applying cleanly, then it sounds like you weren't
> rebasing properly. A successful rebase will rewrite your feature commits and
> add them directly on top of the latest master, so by definition a diff from
> that master to your feature head will apply cleanly to that master.
>
> Without seeing your repository, it's pretty hard to tell what happened. One
> possibility is that your git pull wasn't set up correctly. In the situation
> where you've made a GitHub fork of the Rails repository, you've actually got
> three repositories that you're playing with:
>
> * the original rails/rails remote repository;
> * your fork, the taryneast/rails remote repository; and
> * your local repository.
>
> If you created your local repository by cloning taryneast/rails, then doing
> a git pull won't pull in the latest changes from the rails/rails repository
> -- it would only pull in changes from your fork. GitHub forks don't
> automatically keep in sync with the original repo.
>
> The way I have my local Rails repository set up, my 'origin' remote is the
> original rails/rails repo, and I have a 'chrismear' remote which tracks my
> GitHub fork.
>
> I then keep my local master branch in sync with the rails/rails master by
> doing:
>
> git fetch origin
> git merge origin/master master
>
> (Never been a big fan of git-pull; I prefer doing the fetch and merge
> explicitly so I know exactly what's going on.)
>
> If you do a 'git pull', and then look at the latest commit on your local
> master branch (git show master), does it match the latest commit at
> http://github.com/rails/rails/ ?


I definitely pulled from the real rails.. I know that mainly because nobody
else is making changes on my fork.. and the git pull that I did pulled in
heaps of changes every few days ;)
I have the fetch/merge from upstream aliased as "git up" (told you I was an
svn girl ;))

That said - thanks for the description - I guess I'm still wrapping my head
around the new multitude of repositories...

So I'm pretty sure that my local working copy had all the changes from the
real rails fork...
I'm just not sure if I rebased often enough... or made the patches the right
way.

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


More information about the Chat mailing list