Forum: Typo Working on a stable release from github by using local branches

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
F0fb7fb81c0604bf4c6747df54930b3f?d=identicon&s=25 Tobias Weisserth (polarapfel)
on 2009-02-24 17:31
(Received via mailing list)
Hi everybody,

I just want to share this with you. I find this useful, maybe this will
help
you too.

Since typo in fdv/typo on github is a (fast)moving target, you might
want to
work with a stable code base to branch from.

Suppose you might want to work with Typo 5.2.0, you'd clone the
repository
or fork it on github and clone from your fork. I did the latter and
added
dfv/typo as a remote on my local clone. The remote is named
"vanilla_typo"
in my example.

First pull from dfv/typo, including tags:

git pull --tags vanilla_typo master

Then branch off of the tag "release_5_2_0" to "jump back in time":

git checkout -b stable_5_2_0 release_5_2_0

This will create a new branch called "stable_5_2_0" next to your master
branch and whatever else you created.

Please note that you still might need to initialize Typo's submodules at
this point. Migrations will be an issue if you already worked on the
same
databases with later migrations. You'll have take care of the state of
your
database scheme. Better yet, work on a new set of database schemes for
development, tests and production.

You can now edit files and commit.

When you're done and you want to merge this with a current revision you
can
forward-merge like this:

git checkout master
git pull vanilla_typo master
git format-patch -k -m --stdout release_5_2_0..stable_5_2_0 | git am -3
-k

As I haven't used this extensively, I advice care. Maybe the git
magicians
reading this list can verify this or add comments.

Tobias W.
2fd0206c71a1b22a9cc6293f38537461?d=identicon&s=25 Cyril Mougel (shingara)
on 2009-02-24 17:44
(Received via mailing list)
Tobias Weisserth wrote:
> latter and added dfv/typo as a remote on my local clone. The remote is
> This will create a new branch called "stable_5_2_0" next to your
> When you're done and you want to merge this with a current revision
> you can forward-merge like this:
>
> git checkout master
> git pull vanilla_typo master
> git format-patch -k -m --stdout release_5_2_0..stable_5_2_0 | git am -3 -k
>
> As I haven't used this extensively, I advice care. Maybe the git
> magicians reading this list can verify this or add comments.

If you want you can put this explain in our wiki.

http://github.com/fdv/typo/wikis

Thanks

--
Cyril Mougel
http://blog.shingara.fr
F0fb7fb81c0604bf4c6747df54930b3f?d=identicon&s=25 Tobias Weisserth (polarapfel)
on 2009-02-25 14:17
(Received via mailing list)
Done.
8f6b8e99f52f0928287b01a006950f52?d=identicon&s=25 Matijs van Zuijlen (mvz)
on 2009-02-25 15:46
(Received via mailing list)
Tobias Weisserth wrote:
> When you're done and you want to merge this with a current revision you
> can forward-merge like this:
>
> git checkout master
> git pull vanilla_typo master
> git format-patch -k -m --stdout release_5_2_0..stable_5_2_0 | git am -3 -k
>
> As I haven't used this extensively, I advice care. Maybe the git
> magicians reading this list can verify this or add comments.

I have a comment on this part: Why not just use git merge, like so:

git checkout master
git pull vanilla_typo master
git merge stable_5_2_0

Regards,
Matijs.
F0fb7fb81c0604bf4c6747df54930b3f?d=identicon&s=25 Tobias Weisserth (polarapfel)
on 2009-02-25 18:45
(Received via mailing list)
You'd work on your master branch. But maybe you want to work on two
parallel
branches. One for production code and the other for future releases of
your
blog.
8f6b8e99f52f0928287b01a006950f52?d=identicon&s=25 Matijs van Zuijlen (mvz)
on 2009-02-28 12:04
(Received via mailing list)
Tobias Weisserth wrote:
> You'd work on your master branch. But maybe you want to work on two
> parallel branches. One for production code and the other for future
> releases of your blog.

Well, you can still do that. After the merge, just do

  git checkout stable_5_2_0

and continue working on that.
This topic is locked and can not be replied to.