Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1038151 Posts in 41950 Topics- by 33562 Members - Latest Member: nought

September 01, 2014, 05:47:45 PM
TIGSource ForumsDeveloperTechnical (Moderators: Glaiel-Gamer, ThemsAllTook)Starting with GitHub
Pages: [1] 2
Print
Author Topic: Starting with GitHub  (Read 752 times)
Sean A.
Level 8
***



View Profile Email
« on: April 01, 2013, 09:25:29 PM »

So it's probably been a long time coming but as I'm starting to branch out a bit I want to start hosting some of my projects on GitHub. Not just for revision control but for cross-platform development too. I have never used GitHub before but I'm doing a Java project with LWJGL that I want to host on GitHub. Since LWJGL is also hosted on GitHub I am under the impression from what I've seen is merge that project with mine so I constantly get updates when they release them and they are automatically pushed to my projects. The other thing I want to accomplish is being able to edit on multiple computers. I'm using Eclipse on both a Mac and a PC and I have struggled to find a way to have projects I can edit on both that also reference libraries (LWJGL requires you to set a native libraries path that is platform specific and needs to be changed each time). So I've looking been into EGit (an Eclipse plugin for Git) but then GitHub as its own native OSX application and the whole thing is pretty overwhelming. Can anyone here point me in the right direction?
Logged
soryy708
Level 3
***


Where is my tea?


View Profile Email
« Reply #1 on: April 02, 2013, 05:38:35 PM »

http://learn.github.com/p/index.html
http://learn.github.com/p/setup.html
http://learn.github.com/p/normal.html
http://learn.github.com/p/branching.html
http://learn.github.com/p/remotes.html
http://learn.github.com/p/log.html
http://learn.github.com/p/undoing.html
http://learn.github.com/p/rebasing.html
http://learn.github.com/p/tagging.html
http://git-scm.com/docs/gittutorial
http://gitref.org/
Logged

Portfolio:
  • Cacto Loco! - 'Additional Tunes' (Composer)
  • To be continued...
Noogai03
Level 6
*


WHOOPWHOOPWHOOPWHOOP


View Profile WWW Email
« Reply #2 on: April 02, 2013, 11:18:26 PM »

Github is epic, and it has an AWESOME Git for Windows client.  Tears of Joy  But I don't really use it 'cause if you want private repositories you need to pay... Mock Anger
Instead I use Bitbucket: http://bitbucket.org
It's awesome, free and simple (ish)

Just thought you might want to know
Logged

So long and thanks for all the pi
Eigen
Level 10
*****


Jebus backups.


View Profile WWW
« Reply #3 on: April 02, 2013, 11:25:39 PM »

Yes, BitBucket is the way to go.

For a client I would recommend SourceTree. It was recently released on Windows, though I think it's still in beta. On Windows you're pretty much screwed when it comes to clients. You either use GitHub for Windows if you use GitHub (and only GitHub) or TortoiseGit which is very basic and lacks in many regards. The rest of the options are even worse. Don't bother with those.
Logged

Twinklebear
Level 0
**


View Profile
« Reply #4 on: April 02, 2013, 11:28:54 PM »

Github is epic, and it has an AWESOME Git for Windows client.  Tears of Joy  But I don't really use it 'cause if you want private repositories you need to pay... Mock Anger
Instead I use Bitbucket: http://bitbucket.org
It's awesome, free and simple (ish)

Just thought you might want to know

Actually you can use the Git for Windows client with any git repository, you just need to clone it via the command line first, then have the program search for repos on your computer (from the options menu).
Logged
Eigen
Level 10
*****


Jebus backups.


View Profile WWW
« Reply #5 on: April 02, 2013, 11:31:23 PM »

Actually you can use the Git for Windows client with any git repository, you just need to clone it via the command line first, then have the program search for repos on your computer (from the options menu).

I didn't know that. Pretty intuitive Roll Eyes
Logged

Xienen
Level 3
***


Greater Good Games


View Profile WWW
« Reply #6 on: April 03, 2013, 02:49:00 AM »

Honestly, in a multi-user Git environment, I think it's much less of a headache to just use the command line, because Git's command line is much more powerful than SVN's and its functions don't always translate well to a GUI.  Once you use it a few times, it'll become second nature other than diffing/merging, but you can hook the command line directly into a GUI diff tool. I'm sure plenty of people haven't had many issues with their Git Clients, but I am yet to find one that hasn't struggled to do slightly advanced Git commands without issues, such as "git pull --rebase".
Logged

alts
Level 0
***



View Profile WWW Email
« Reply #7 on: April 03, 2013, 07:43:17 PM »

Even thought LWJGL is on github, you can keep your git repo on BitBucket (or even local), and set LWJGL as a submodule of your repo. Then you can just pull updates from LWJGL/master from within your project. Submodules don't play too nicely with branches, but I think in this case it won't be an issue.
Logged

Sean A.
Level 8
***



View Profile Email
« Reply #8 on: April 03, 2013, 09:03:52 PM »

Wow thanks for all the help. So basically use BitBucket over GitHub, and maybe just do command line stuff instead of a GUI program.

So I am starting to get some of the basic features, but what is the difference between forking the LWJGL repo and making it a submodule?
Logged
soryy708
Level 3
***


Where is my tea?


View Profile Email
« Reply #9 on: April 03, 2013, 09:08:17 PM »

If I remember correctly, one of the links I listed explains that.
Logged

Portfolio:
  • Cacto Loco! - 'Additional Tunes' (Composer)
  • To be continued...
alts
Level 0
***



View Profile WWW Email
« Reply #10 on: April 04, 2013, 12:26:23 AM »

Wow thanks for all the help. So basically use BitBucket over GitHub, and maybe just do command line stuff instead of a GUI program.

So I am starting to get some of the basic features, but what is the difference between forking the LWJGL repo and making it a submodule?

Forking the repo is semantically wrong for what you're doing. It would work, but I don't think you plan on making changes to LWJGL yourself. It's just a dependency. That makes submodules more appropriately suited for it.

http://git-scm.com/book/en/Git-Tools-Submodules

Another benefit of not forking is that the history of your project doesn't become muddied by the history of LWJGL. Your repo is focused specifically on your code, and the submodule specifically on a dependency. Histories are minimally linked through a single file.

Logged

Greemax
Level 0
**


Key word: Creation!


View Profile WWW Email
« Reply #11 on: April 04, 2013, 03:43:11 PM »

I also recomend BitBucket and I use TortoiseGit and it's ok to me.
Logged

Sean A.
Level 8
***



View Profile Email
« Reply #12 on: April 05, 2013, 04:51:51 PM »

So I have all of the submodule and git stuff working perfectly, now maybe this isn't the thread for it but on the LWJGL GitHub, they have the source organized in separate java files rather than a combined .jar, I don't really know how to set up a project with LWJGL this way and everytime I try I get a thousands of errors with their files saying blahblahblah cannot be resolved to a type. So do I have to build my own .jar or is there another way to do this without building it first?
Logged
Chromanoid
Level 10
*****



View Profile
« Reply #13 on: April 06, 2013, 02:23:50 AM »

Since LWJGL is also hosted on GitHub I am under the impression from what I've seen is merge that project with mine so I constantly get updates when they release them and they are automatically pushed to my projects.
So I have all of the submodule and git stuff working perfectly, now maybe this isn't the thread for it but on the LWJGL GitHub, they have the source organized in separate java files rather than a combined .jar, I don't really know how to set up a project with LWJGL this way and everytime I try I get a thousands of errors with their files saying blahblahblah cannot be resolved to a type. So do I have to build my own .jar or is there another way to do this without building it first?
Version control is not dependency management and shouldn't used for that (imho). When using Java you should look at Maven for dependency management.

Simple Maven POM with LWJGL as dependency:
Code:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>com.j4w</groupId>
  <artifactId>lwjgltest</artifactId>
  <version>1.0-SNAPSHOT</version>
  <packaging>jar</packaging>

  <name>lwjgltest</name>
  <url>http://forums.tigsource.com</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.lwjgl.lwjgl</groupId>
      <artifactId>lwjgl</artifactId>
      <version>2.8.5</version>
    </dependency>
    <dependency>
      <groupId>org.lwjgl.lwjgl</groupId>
      <artifactId>lwjgl_util</artifactId>
      <version>2.8.5</version>
    </dependency>
  </dependencies>
</project>
« Last Edit: April 06, 2013, 02:39:14 AM by Chromanoid » Logged
Sean A.
Level 8
***



View Profile Email
« Reply #14 on: April 06, 2013, 09:35:07 AM »

It's ok I figured it all out, I didn't have GCC installed correctly when I was trying to build. There is only one more slight issue. So I compiled LWJGL in it's submodule and I now wanna push those changes to my repo while still maintaining the ability to pull in LWJGL updates. I got around this by just copying the compiled files into a folder on my main repo. I understand how to go into the submodule and add and commit changes there but when I try and push the changes it asks for my GitHub account credentials as if I am trying to update the main LWJGL repo. I don't think I have it all set up properly, basically I want anything I push in that submodule to be on my own version of LWJGL while still retaining the ability to pull in updates from them and recompile whenever I want. I know this is possible I just don't know how.
Logged
Pages: [1] 2
Print
Jump to:  

Theme orange-lt created by panic