On Tue, 10 Jul 2012 08:55:57 -0700 (PDT)
"Michael." <temp4for...@gmail.com> wrote:
> I'm trying to contribute some documentation to a larger project for
> which I created a git account and forked from the project's master
> via the github web page.
> Via the local github mac-application I created a local copy where I
> can work on.
> In order to avoid to work on outdated documents, is there a way where
> I can update my fork from the master with showing me possible
> conflicts? I.e. in case I already altered a file locally and/or my
> online fork while somebody else also worked on the same document.
First of all, Git does have remote tracking branches and your local
branches. Supposedly you cloned the project so that the github repo is
now the single remote named "origin" in your local repo and the remote
branches are stored as "origin/master" and so on (you can look at them
by running `git branch -a`). Most probably, after you cloning and
created your local branch, it was forked off one of those
remote-tracking branches which were created automatically by
Now you can just run `git fetch origin` to get those remote-tracking
branches (named "origin/whatever") be updated without disturbing your
After that, you can simply review what's changed by running something
$ git diff master origin/master
$ git log origin/master..master
and so on.
The next step is to try to integrate your own developments with
upstream's developments. There are two ways to do this--merging and
rebasing--and which one to pick depends on the project's policy and
your personal taste.
Supposedly you will want to rebase your work; this is achieved by
running something like
$ git checkout master
$ git rebase origin/master
Now you have to read up on the concepts:
and better the whole chapter 3 in that book.
Even better--the whole book except the bits which might be of no
interest for you, like "Git on the server" or "Git and other systems".
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To post to this group, send email to firstname.lastname@example.org.
To unsubscribe from this group, send email to
For more options, visit this group at