Github and eclipse

Discussion in 'Resources' started by matejdro, Oct 7, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    matejdro

    Since many people want to use github, but have no idea how to link it with eclipse, here is an quick guide. I'm also new to this stuff, so I don't know much. I'm just telling you method that I have learned and it works great for me:

    Preparing repository

    1. First we will install eGit, which is used to connect Eclipse to Github. In Eclipse, go to help --> install software.

    2. In "Work With" window, type in "http://download.eclipse.org/egit/updates" (without quotes). Click Add... button next to it.

    a1.png

    3. Tick "Eclipse Git Provider" and keep clicking next until you get "Installing Software..." dialog. Now it will take some time to install eGit. When asked, restart eclipse.

    4. Go to Window --> Show View --> Other... --> Git --> Git repositories and click OK. You should get new window somewhere.

    5. If you have not already, go to Github, create an account and create new repository.

    6. On top of your new repository, click "HTTP" and copy contents of window on the right.

    b1.png

    7. In Eclipse, right click on your project and select Team --> Share project

    a4.png

    8. Select Git --> Next --> Tick "Use or create repository in parent folder of your project --> click on your project --> click "Create Repository" --> click Finish.

    9. You will get new entry in Git Repositories window. Click arrow next to it to expand it and right click on remotes --> Create Remote.

    a3.png

    10. Select "Configure push" and type any name. Click OK.

    11. Under "Push URIs" click "Add..." .

    12 Under URI enter text you copied in step 6. Everything should automatically fill in with exception of your password. Enter password you use to log in into github. Tick "store in secure store" to save your password, so you won't have to enter it each time.

    13. Click OK and Save. You are now ready.

    Using repository

    First you need to commit changes. With committing, you will store your current changes into your local repository. Right click on your repository in "Git Repositories" window and select Commit.

    Under "message" you type description of your change, and then tick files you want bellow.

    After committing again right click on repository, select "Push" and click Finish. This will copy all your changes to Github.
     
    Huffmanbran, Axe2760, Pitazzo and 5 others like this.
  2. Offline

    robin0van0der0v

    Do I need for every plugin a new repository? :p
     
  3. Offline

    Butkicker12

    Got a error *sadface*

    github error.png
     
  4. Quite funny how you posted this one hour after i started fiddling with EGit :p
    I've got everything working, however i cant pull from github. I added the settings branch.master.merge and branch.master.remote, but it just says theres nothing to fetch.
     
  5. Offline

    robin0van0der0v

    And where can I download the .JAR-file on GitHub or do I need to compile it by myself? :p
     
  6. Offline

    matejdro

    @robin0van0der0v Yes and yes :)

    @Butkicker12 what eclipse do you have? Can you try with classic one?

    @r3Fuze is there something to fetch? That means that someone else must commit data so you can fetch it.
     
  7. @matejdro I edited one of my files via github. When i use the git bash commands it works fine.
     
  8. Offline

    Butkicker12

    Eclipse Java EE IDE for Web Developers.

    Version: Indigo Release
    Build id: 20110615-0604
     
  9. Offline

    Butkicker12

    Any solutions to the post above?
     
  10. Offline

    matejdro

    Have you tried with normal eclipse? I mean one with purple ball for icon :)
     
  11. Offline

    Butkicker12

  12. Offline

    DomovoiButler

    use Intellij
     
  13. Offline

    Butkicker12

    I prefer eclipse.
     
  14. Shutup :p
    @Butkicker12 so you can't install because of it? Are you using the right eclipse version?
     
  15. Offline

    Butkicker12

    No this just pops up and didnt before I redownloaded. Dont know what to put there. version:

    Version: Indigo Service Release 1
    Build id: 20110916-0149
     
  16. Hmm... Wierdo!
     
  17. Offline

    DomovoiButler

    no INTELLIJ?
     
  18. Offline

    Butkicker12

    This is tutorial is for eclipse not intellij

    Yes I have. I redownloaded and now this came up. This is what I did:

    I put in the download address "http://download.eclipse.org/egit/updates" and clicked add. This came up but wasnt there before I redownloaded. What should I do/ put in there?
    View attachment 7011

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 20, 2016
  19. Offline

    DomovoiButler

    setup github>create repository>download git>setup git>open eclipse>download eGit or whatevers>create repository in your project folder path(using git init>remote add)>refresh eclipse
    rightclick project>team or whatevs>commit directory or files or whatevs>rightclick project>push changes
     
  20. Offline

    tha d0ctor

    I'm very confused where I export / build the actualy jar file. When I try to file>export it like before nothing shows up to allow me to select my git repositories

    can someone please point me in the right direction in how to compile all this
     
  21. Offline

    DomovoiButler

    export>jar>choose files to include on jar(include plugin.yml), choose output dir>create metadata>finish
     
  22. Offline

    thehutch

    Netbeans :p has built-in Git usages requires some setup but much easier than this. Switched from Eclipse to use it :)
     
  23. Offline

    DomovoiButler

    no...not netbeans... INTELLIJ
     
  24. Offline

    Butkicker12

    How do I setup to pull and fetch from my repo on github?
     
  25. Offline

    DomovoiButler

    anyone whose having problem with this just pm me
     
  26. Offline

    thehutch

    Dislike :p
     
  27. Offline

    nicholasntp

    Whats wrong with Netbeans, Eclipse, or IntelliJ? lol
     
  28. Offline

    DomovoiButler

    Intellij>Eclipse>Netbeans
     
  29. Offline

    thehutch

    Just leave bukkit go now and never come back.
    Notepad++ > Netbeans = Eclipse > Intellij > bluej
     
  30. Offline

    matejdro

    Stop spamming my thread and go fight somewhere else.

    Similar to push, except that you select "fetch" in step 10.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 20, 2016
    tips48 likes this.
Thread Status:
Not open for further replies.

Share This Page