Dumb question

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Dumb question

Ralf Eggert
Hi,

I forked the zf2-documentation repository. Now the original was updated.
How can I get these changes to my forked repository?

Regards,

Ralf
Reply | Threaded
Open this post in threaded view
|

Re: Dumb question

Ralf Eggert
Sorry to annoy any one. Found the solution myself:

> git remote add upstream https://github.com/zendframework/zf2-documentation
> git fetch upstream
> git checkout master
> git rebase upstream/master

Maybe this helps some one else some day.

Regards,

Ralf
Reply | Threaded
Open this post in threaded view
|

Re: Dumb question

robertbasic
On 4 October 2012 23:01, Ralf Eggert <[hidden email]> wrote:
> Sorry to annoy any one. Found the solution myself:
>
>> git remote add upstream https://github.com/zendframework/zf2-documentation
>> git fetch upstream
>> git checkout master
>> git rebase upstream/master
>
> Maybe this helps some one else some day.
>

One other command I find useful, and use it on a regular basis is

> git remote show <remote_name>

where <remote_name> is one of the remotes I have for this repo, like upstream.

For example, for zf2-docs,

> git remote show upstream

A part of it's output is:

 Local ref configured for 'git push':
    master pushes to master (local out of date)

Which basically tells me that my local master branch is outdated when
looking at upstream/master.

When a local and a remote branch are up to date, it'll say that it's
"up to date".

When a local branch is ahead of a remote branch, it'll say that it's
"fast forwardable" (or something like that).

HTH!
Reply | Threaded
Open this post in threaded view
|

Re: Dumb question

Xerkus
In reply to this post by Ralf Eggert
On 05.10.2012 8:01, Ralf Eggert wrote:

> Sorry to annoy any one. Found the solution myself:
>
>> git remote add upstream https://github.com/zendframework/zf2-documentation
>> git fetch upstream
>> git checkout master
>> git rebase upstream/master
> Maybe this helps some one else some day.
>
> Regards,
>
> Ralf
This is how i'm doing it:
> git clone https://github.com/xxx/zf2-documentation  zf2-docs
> cd zf2-docs & git remote add zendframework
> https://github.com/zendframework/zf2-documentation
> git pull --ff-only zendframework master & git checkout develop & git
> pull --ff-only zendframework develop
> git push origin
Reply | Threaded
Open this post in threaded view
|

Re: Dumb question

Andreas Möller
Reply | Threaded
Open this post in threaded view
|

Re: Dumb question

Ralf Eggert
Hi Andreas,

Andreas Möller schrieb am 05.10.2012 07:36:
> * https://github.com/zendframework/zf2/blob/master/README-GIT.md

This is exactly the document I was looking for in the zf2-documentation
repo.

Should we add that there and amend it for the zf2-documentation repo?
What do others think? I would go for it then...

Regards,

Ralf
Reply | Threaded
Open this post in threaded view
|

Re: Dumb question

robertbasic


On 5 Oct 2012 08:42, "Ralf Eggert" <[hidden email]> wrote:
>
> Hi Andreas,
>
> Andreas Möller schrieb am 05.10.2012 07:36:
> > * https://github.com/zendframework/zf2/blob/master/README-GIT.md
>
> This is exactly the document I was looking for in the zf2-documentation
> repo.
>
> Should we add that there and amend it for the zf2-documentation repo?
> What do others think? I would go for it then...

See if it's linked to from the CONTRIBUTE.md file in the docs repo,if not,add it there.

>
> Regards,
>
> Ralf

Reply | Threaded
Open this post in threaded view
|

Re: Dumb question

stormwild
It's already linked from the CONTRIBUTE.md but to the wiki guide not the README-GIT.md

On Fri, Oct 5, 2012 at 2:55 PM, Robert Basic <[hidden email]> wrote:


On 5 Oct 2012 08:42, "Ralf Eggert" <[hidden email]> wrote:
>
> Hi Andreas,
>
> Andreas Möller schrieb am 05.10.2012 07:36:
> > * https://github.com/zendframework/zf2/blob/master/README-GIT.md
>
> This is exactly the document I was looking for in the zf2-documentation
> repo.
>
> Should we add that there and amend it for the zf2-documentation repo?
> What do others think? I would go for it then...

See if it's linked to from the CONTRIBUTE.md file in the docs repo,if not,add it there.

>
> Regards,
>
> Ralf




--
------------------------------

Alexander R. Torrijos
Web Developer
Mobile: +63 919 991 5653
Res: +63 2 822 7219
Skype/YM: artorrijos

------------------------------

Reply | Threaded
Open this post in threaded view
|

Re: Dumb question

weierophinney
Administrator
In reply to this post by Xerkus
-- Aleksey Khudyakov <[hidden email]> wrote
(on Friday, 05 October 2012, 03:59 PM +1100):

> On 05.10.2012 8:01, Ralf Eggert wrote:
> > Sorry to annoy any one. Found the solution myself:
> >
> > > git remote add upstream https://github.com/zendframework/zf2-documentation
> > > git fetch upstream
> > > git checkout master
> > > git rebase upstream/master
> > Maybe this helps some one else some day.
> >
> > Regards,
> >
> > Ralf
> This is how i'm doing it:
> > git clone https://github.com/xxx/zf2-documentation  zf2-docs
> > cd zf2-docs & git remote add zendframework
> > https://github.com/zendframework/zf2-documentation
> > git pull --ff-only zendframework master & git checkout develop &
> > git pull --ff-only zendframework develop
> > git push origin

Please don't pull into a branch you plan to do a pull request off of;
this has led to a number of unmergeable PRs. Rebase is a much better way
of keeping your branch up-to-date and clean for purposes of submitting
patches.


--
Matthew Weier O'Phinney
Project Lead            | [hidden email]
Zend Framework          | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc
Reply | Threaded
Open this post in threaded view
|

Re: Dumb question

Xerkus
On 06.10.2012 0:48, Matthew Weier O'Phinney wrote:

> -- Aleksey Khudyakov <[hidden email]> wrote
> (on Friday, 05 October 2012, 03:59 PM +1100):
>> This is how i'm doing it:
>>> git clone https://github.com/xxx/zf2-documentation  zf2-docs
>>> cd zf2-docs & git remote add zendframework
>>> https://github.com/zendframework/zf2-documentation
>>> git pull --ff-only zendframework master & git checkout develop &
>>> git pull --ff-only zendframework develop
>>> git push origin
> Please don't pull into a branch you plan to do a pull request off of;
> this has led to a number of unmergeable PRs. Rebase is a much better way
> of keeping your branch up-to-date and clean for purposes of submitting
> patches.
Extra note:
"fast forward only" option will prevent merging so it is safe to pull.
Master and develop branches should never have local changes or
deviations from canonical as well.
In other cases rebase preferred, yeah.
Reply | Threaded
Open this post in threaded view
|

RE: Dumb question

BullfrogBlues

> Date: Sat, 6 Oct 2012 02:07:27 +1100

> From: [hidden email]
> To: [hidden email]
> Subject: Re: [zf-contributors] Dumb question
>
> On 06.10.2012 0:48, Matthew Weier O'Phinney wrote:
> > -- Aleksey Khudyakov <[hidden email]> wrote
> > (on Friday, 05 October 2012, 03:59 PM +1100):
> >> This is how i'm doing it:
> >>> git clone https://github.com/xxx/zf2-documentation zf2-docs
> >>> cd zf2-docs & git remote add zendframework
> >>> https://github.com/zendframework/zf2-documentation
> >>> git pull --ff-only zendframework master & git checkout develop &
> >>> git pull --ff-only zendframework develop
> >>> git push origin
> > Please don't pull into a branch you plan to do a pull request off of;
> > this has led to a number of unmergeable PRs. Rebase is a much better way
> > of keeping your branch up-to-date and clean for purposes of submitting
> > patches.
> Extra note:
> "fast forward only" option will prevent merging so it is safe to pull.
> Master and develop branches should never have local changes or
> deviations from canonical as well.
> In other cases rebase preferred, yeah.

Remember, you can set `--ff-only` as default on any branch:

    $ git config branch.develop.mergeoptions "--ff-only"
    $ git config branch.master.mergeoptions "--ff-only"
    $ git config -l
    ...
    branch.master.remote=origin
    branch.master.merge=refs/heads/master
    branch.master.mergeoptions=--ff-only
    remote.upstream.url=git://github.com/zendframework/zf2.git
    remote.upstream.fetch=+refs/heads/*:refs/remotes/upstream/*
    branch.develop.remote=upstream
    branch.develop.merge=refs/heads/develop
    branch.develop.mergeoptions=--ff-only
    ...

    Now you can merge develop & master and --ff-only will be used by default.

--
Gerard