Joomla and Git, github

144 views
Skip to first unread message

Antanas Vipartas

unread,
Aug 17, 2012, 2:54:30 AM8/17/12
to joomla-de...@googlegroups.com
Hello. I forked joomla-cms, and later wanted to contribute to Joomla3-admin-template, which is also a fork from realityking/joomla-cms. Unfortunatelly, I cannot make one more fork of Joomla3-admin-template in order to do pull requests.

What is the best practice to contribute there? Since I cannot use pull requests and cannot push directly to the repository. Thanks

Nikolai Plath

unread,
Aug 17, 2012, 3:16:15 AM8/17/12
to joomla-de...@googlegroups.com
Hi,
you can only have one fork. What you want is called a "branch". You may have as much as you like of those thingies, so you may also have more than one pull request open ;)

see: http://learn.github.com/p/branching.html

Regards,
Nikolai

 
Am 17.08.2012 01:54, schrieb Antanas Vipartas:
Hello. I forked joomla-cms, and later wanted to contribute to Joomla3-admin-template, which is also a fork from realityking/joomla-cms. Unfortunatelly, I cannot make one more fork of Joomla3-admin-template in order to do pull requests.

What is the best practice to contribute there? Since I cannot use pull requests and cannot push directly to the repository. Thanks
--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/nkp68AHH6rEJ.
To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.

JM Simonet

unread,
Aug 17, 2012, 3:33:30 AM8/17/12
to joomla-de...@googlegroups.com
Joomla 3.0 alpha2 is now merged in trunk/master and released

Please make pulls towards master and post in the normal joomla tracker on joomlacode:
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemBrowse&tracker_id=8103

Thanks

JM
-- 
Please keep the Subject wording in your answers
This e-mail and any attachments may be confidential. You must not disclose or use the information contained in this e-mail if you are not the
intended recipient. If you have received this e-mail in error, please notify us immediately and delete the e-mail and all copies.
-----------------------------------------------------------
Jean-Marie Simonet  /  infograf768
Joomla Production Working group
Joomla! Translation Coordination Team 

Antanas Vipartas

unread,
Aug 17, 2012, 6:48:12 AM8/17/12
to joomla-de...@googlegroups.com
Thanks for the response. You mean I should create a branch, commit to it, and then inform the "Joomla3-admin-template" user to add me as a remote and checkout my branch?

I guess I cannot create pull requests to non-parent (in this case joomla/joomla-cms), forked repository?

Michael Babker

unread,
Aug 17, 2012, 6:52:16 AM8/17/12
to joomla-de...@googlegroups.com
You can create pull requests for any fork of the base joomla/joomla-cms repo (the GitHub GUI lets you set all this when you issue the pull request).  You can only fork one repo though in that tree.  So, if you already forked joomla/joomla-cms and were collaborating with me on a feature I'm working on, instead of also forking mbabker/joomla-cms, you would just add my repository as a remote in your local environment, checkout the branch that is being worked on, make your commits, push to GitHub, and open the pull request.  I hope that makes some bit of sense.

Antanas Vipartas

unread,
Aug 17, 2012, 8:11:31 AM8/17/12
to joomla-de...@googlegroups.com
Thanks, it makes sense.

So let's say I have "test" branch, forked from "joomla/joomla-cms", which is in sync with upstream, I just merged it.
And You "mbabker/joomla-cms" have a branch named "contribute-here", but it is several commits BEHIND the main joomla-cms upstream.
I want exact copy of your branch in order to fix some files. But if I make:

git branch test
git checkout test
git remote add mbabker https://github.com/mbabker/joomla-cms.git
git fetch mbabker
git merge mbabker/contribute-here

I get many conflicts and have to resolve them manually. What am I missing in order to have exact copy of your branch and help fix ONE single file instead of doing huge merge?

Mark Dexter

unread,
Aug 17, 2012, 11:16:27 AM8/17/12
to joomla-de...@googlegroups.com
We really need a step-by-step tutorial for this in the wiki. Something
similar to http://docs.joomla.org/Git_for_Testers_and_Trackers except
that explains how to create a pull request for either the cms, the
platform, or any arbitrary branch. If someone could volunteer to start
with a rough draft, others will help polish and improve it. Thanks!
Mark

Joe Palmer

unread,
Aug 17, 2012, 12:44:17 PM8/17/12
to joomla-de...@googlegroups.com

+1 that would be really helpful!

allon moritz

unread,
Aug 17, 2012, 2:24:10 PM8/17/12
to joomla-de...@googlegroups.com
+1 from me as well...I'm sure more pull requests will find the way into joomla.

El KuKu

unread,
Aug 17, 2012, 10:58:13 PM8/17/12
to joomla-de...@googlegroups.com

Matt Thomas

unread,
Aug 17, 2012, 11:00:28 PM8/17/12
to joomla-de...@googlegroups.com
Has anyone looked at https://help.github.com/articles/fork-a-repo for Git related hints?

Best,

Matt Thomas
Founder betweenbrain
Phone: 203.632.9322
Twitter: @betweenbrain




--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/d-5VgCJNN9QJ.

Antanas Vipartas

unread,
Aug 20, 2012, 6:04:31 AM8/20/12
to joomla-de...@googlegroups.com
Thanks. I read those before, but non of them speaks about how to do a pull request for the already forked joomla-cms repository... In this case: joomla-cms/Joomla3-Admin-template...
--
sincerely,
Antanas Vipartas
members.png

elin

unread,
Aug 20, 2012, 11:32:13 AM8/20/12
to joomla-de...@googlegroups.com
When you make a pull request the default place to send it is to joomla master, but that is actually a drop down and you can pick any fork and it will then let you pick any branch in the fork you selected.

Elin


On Monday, August 20, 2012 6:04:31 AM UTC-4, Antanas Vipartas wrote:
Thanks. I read those before, but non of them speaks about how to do a pull request for the already forked joomla-cms repository... In this case: joomla-cms/Joomla3-Admin-template...

On Sat, Aug 18, 2012 at 6:00 AM, Matt Thomas <ma...@betweenbrain.com> wrote:
Has anyone looked at https://help.github.com/articles/fork-a-repo for Git related hints?

Best,

Matt Thomas
Founder betweenbrain
Phone: 203.632.9322
Twitter: @betweenbrain

On Fri, Aug 17, 2012 at 10:58 PM, El KuKu <der.e...@gmail.com> wrote:

The number of pages on the wiki is growing

There is also one that deals with pull requests

--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/d-5VgCJNN9QJ.

To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-general+unsub...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.

--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-general+unsub...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.



--
sincerely,
Antanas Vipartas

Andrea Tarr at Tarr Consulting

unread,
Aug 21, 2012, 8:09:11 PM8/21/12
to joomla-de...@googlegroups.com
This was posted by Sam Moffatt in the JBS google list and these are the notes I keep going back to:

You can't fork in the sense of through the GitHub UI when you've
already got a repository with the same name however you can create a
branch through the process listed below. I prefer this method because
it ensures that I'll always create a new branch based on the remote
version cleanly without having to update my own copy of the branch
that I might want to clone from first.

Presuming you've cloned from your own repository:

git clone <your git url> <destination>

You can add a remote for the person you want to fork from (I usually
use github username for <remotename>):

git remote add <remotename> <git url from their repo page>

You then do a fetch to get all refs to grab the new branches:

git fetch --all

And then you can fork from their branch:

git checkout -b <branchname> <remotename/remotebranch>

And that will create a new branch in your local repository based off
their branch (pull requests back to that branch from your branch will
be have in github).

You then need to push that to your repository:

git push origin <branchname>

And finally reconfigure your local branch to point to the branch you
just created on GitHub:

git branch --set-upstream <branchname> origin/<branchname>

At this point git push will default to your repository not
<remotename>'s repository.


It's a few commands to get around, but once you've done it a few times
it ends up in muscle memory. I've found this ends up working out
neater in the GitHub UI as well.

Sam Moffatt
http://pasamio.id.au


Andrea Tarr

Tarr Consulting






<members.png>

Reply all
Reply to author
Forward
0 new messages