5
$\begingroup$

My students struggle terribly with Eclipse, and with any form of version control. I want them to use Eclipse with Git, but I am struggling myself to find a way to set it up that would make sense to a student.

What I want to do is have them put entire Eclipse projects (without the binaries) on GitHub. I want them to use the eGit plugin because if I ask them to use the command line, they will never do it. Researching this, the stock advice seems to be to set up the repository outside of the Eclipse project. That, however, has the effect of putting all the source code outside of the Eclipse workspace, which is confusing. Worse yet, I can't then import the project correctly into another Eclipse environment. The other method would be to put the repository (and .git) under the Eclipse project. This, I think, would be less confusing to students, but when I try that, I get all kinds of nasty warning messages.

So does anyone have a setup for Eclipse and eGit that successfully puts the entire project into version control, and is not confusing for students? And that allows the project to correctly import into Eclipse?

$\endgroup$
  • $\begingroup$ Is there a reason you don't just teach them git? Why are they so terrified of the command line? $\endgroup$ – thesecretmaster Jun 12 '17 at 12:38
  • $\begingroup$ I am still not convinced that git is teachable. Yes some will get it, but most will not. see cseducators.stackexchange.com/q/2897/204 $\endgroup$ – ctrl-alt-delor Nov 24 '17 at 17:39
  • $\begingroup$ Git is visual. Show them the pictures and avoid the command line. Everyone I talk to that "knows git" and uses the command line, doesn't actually know git $\endgroup$ – Joe Phillips Jan 4 '18 at 1:04
4
$\begingroup$

To me it sounds like your students lack an understanding of the fundamentals of IDEs and Git.

if I ask them to use the command line, they will never do it.

If they don't know git init and git clone (origin) then I'm sorry, they do not know Git, they should learn this first (along with push, pull, commit, status, fetch).

Researching this, the stock advice seems to be to set up the repository outside of the Eclipse project. That, however, has the effect of putting all the source code outside of the Eclipse workspace, which is confusing. Worse yet, I can't then import the project correctly into another Eclipse environment.

This is another problem in itself. The high level explanation is you only need package level codebase with only the src, the bin is generated by Eclipse. You still need to create a project in Eclipse and then import the package. Any further problems should be asked on StackOverflow.

The other method would be to put the repository (and .git) under the Eclipse project.

NO! The .git is generated by git init. Do not copy any configuration, especially hidden files from project to project.

I think you are jumping the gun here. Eclipse and Git should be separate lessons. If they are confused by both then that just means they need to learn what each of them are, before combining them.

I suggest:

  • Teach Eclipse, how to create projects, what packages mean, how to import, etc.
  • Teach Git, init, clone, pull, commit, push, status, fetch using Terminal or CommandLine for Git. Depending on the age group you might want to teach them how to resolve conflicts, what decentralized means, branching, pull requests, etc.
  • Now teach them Eclipse Marketplace, download plugin and integrate Git with Eclipse.

    So does anyone have a setup for Eclipse and eGit that successfully puts the entire project into version control, and is not confusing for students? And that allows the project to correctly import into Eclipse?

    As all my professors do it, you need to create the repository with the project for each student and have each student clone and import into Eclipse. I'm not an educator so I don't know if there is an existing setup available online. However, I do think this is actually a very trivial task if they understand Eclipse and Git.

  • $\endgroup$
    2
    $\begingroup$

    I ran into a similar challenge of simplifying the use of source control with my students. I ended up switching over to the JetBrains suite -- IntelliJ in the case of Java. The software is free for students/teachers and integrates very, very easily with Github. No command line required.

    Also, you will need to install git.exe on your machine. Rather than using the GitHub desktop install, I have found the git-scm.com to be less troublesome. Github desktop installs in a user/version based directory and makes configuration inside JetBrains a challenge. Git-scm installs in a standard Program Files directory.

    $\endgroup$
    • $\begingroup$ We are standardized on Eclipse so I have to use it (and it works well in any case). Command line is too much to ask of students who are struggling to learn programming language syntax. I was really hoping that someone else has done the same thing. $\endgroup$ – user3178432 Jun 12 '17 at 13:07
    2
    $\begingroup$

    I teach Java to high school students as well using Eclipse. You don't have to teach command line (much to the dismay of professionals here). Egit works fine. GitHub offers an education teacher account where you can control all of the git accounts for the students.

    I'm going to make up a step by step instructions for using Egit/Eclipse. It's not too bad; I was able to easily clone the repo at home to work on assignments that were started in the classroom.

    You have to understand that unlike old source control (SVN), github is designed to setup a local repo that is different than your workspace; and that repo is pushed to the cloud one; and pulled when you want it back. So when students save to the cloud, it's this:

    workspace ====commit====> localrepo ====push====> github cloud repo

    and when they want to continue working at home they have to clone the repo and import into their workspace.

    To the people here complaining that ignoring the command line is blasphemy... COME ON... we teach tons of 14 year olds and want to encourage them. GUI is the way to go for most of them.

    $\endgroup$

    Your Answer

    By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

    Not the answer you're looking for? Browse other questions tagged or ask your own question.