GitHub and Eclipse

42 views
Skip to first unread message

Mathew Lenning

unread,
Jun 12, 2013, 6:51:11 AM6/12/13
to joomla-...@googlegroups.com
So I've finally got GitHub hooked up in my eclipse, but I'm not sure I'm using it right. I've got my master clone and a branch that I'm using for cleaning up the legacy classes. I made some edits and was able to commit so that's all good.

What I don't understand is why the IDE isn't code hinting or error checking in the github perspective. Is there something I missed? Am I supposed to be editing files in the git perspective? Or is there a way to import the branch to my PHP perspective?

I'm stoked about contributing (I have wanted to be part of this for a long time) but feel like I missing something.

Any help would be greatly appreciated.

Chad Windnagle

unread,
Jun 12, 2013, 10:28:24 AM6/12/13
to joomla-...@googlegroups.com
I'm not really sure what Eclipse's "git" perspective is, but I'm pretty certain you don't need it. Here's how git "works" (it took me forever to realize this, so maybe you figured it out or maybe you're confused like I was!)

When you checkout a branch on git, the files in the github repository "change" to that branch, any changes you make to files while you're on that branch 'stay' with that branch. When you save the file and then do a commit, and checkout another branch, your changes will "disappear" as they aren't in the branch you just changed too. 

Here's what I wish someone made me do when I picked up git:
Go to your github repo
Checkout your 'feature' branch
Make a change in a file and save it (do something like "test this!")
Add the file to staging in the commit and then checkout your master branch
Go view the file with some text editor and you'll see your changes are gone. 
Check out the branch again and the changes are back!

You don't need Eclipse linked to git to do this (although it helps to see what's going on). Git takes care of it no matter what editor you're using to view or change the files. I'm not sure what the 'git' perspective is all about, but just checkout your branch and edit files normally in eclipse, commit, merge, checkout etc... as needed. 

Regards,
Chad Windnagle
Fight SOPA



--
You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-cm...@googlegroups.com.
To post to this group, send an email to joomla-...@googlegroups.com.
Visit this group at http://groups.google.com/group/joomla-dev-cms?hl=en-GB.
For more options, visit https://groups.google.com/groups/opt_out.



Achal Aggarwal

unread,
Jun 12, 2013, 10:42:55 AM6/12/13
to joomla-...@googlegroups.com
Hi Mathew,

I know using GUI for Git (in eclipse) seams more lucrative than CLI. There are many things going under that GUI layer, if visible makes the whole process crystal clear. So I will recommend you to go for command line option for git, it is available for platforms like Mac, Windows, Linux.

Try this option at least once. I will also recommend you to read book "Pro Git by Scott Chacon" and also check out this link http://www.lornajane.net/posts/2012/do-open-source-with-git-and-github to contribute. You can always use any IDE or editor with command line Git.


Regards
Achal

Mark Dexter

unread,
Jun 12, 2013, 11:15:42 AM6/12/13
to joomla-...@googlegroups.com
Matthew, I suggest you look at the Wiki articles
http://docs.joomla.org/Git_for_Testers_and_Trackers and
http://docs.joomla.org/Git_for_Coders. There you can see the CLI and
Eclipse equivalents and see a typical workflow for using Git with
Joomla.

I have never used the Git perspective in Eclipse. Almost every command
you need is available by right-clicking the project and selecting Team
from the context menu. There are a couple of commands you need from
the Repositories view (to create a new clone or to push to a repo).

One of the most confusing things about Git is that there are multiple
ways to accomplish any given task or workflow. Ask 3 experienced devs
about the details of their workflow (in terms of branches, how they
keep their remotes updated, etc.) and you will get 3 or more different
answers.

Mark

Mathew Lenning

unread,
Jun 12, 2013, 7:19:14 PM6/12/13
to joomla-...@googlegroups.com
Hey everyone,

Thanks for the help. It is appreciated. I think I have my jargon mixed up so let me clarify Git perspective = Repository perspective (I think) . Here is a screenshot


Anyway, so I figured it out. Eclipse is a little shady here. I was trying the import with no success. Since it is a PHP project I was checking the PHP project option, this was causing a message that said no projects existed. Then for the hell of it I selected general projects and it created the new project without any problems. 

Thanks for all the help. I'm defiantly going to read the pro git book and I look forward to working with everyone to make Joomla a modern kick ass PHP CMS

Reply all
Reply to author
Forward
0 new messages