Sean A.
|
|
« 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
|
|
« Reply #1 on: April 02, 2013, 05:38:35 PM » |
|
|
|
|
Logged
|
|
|
|
Noogai03
Level 6
WHOOPWHOOPWHOOPWHOOP
|
|
« Reply #2 on: April 02, 2013, 11:18:26 PM » |
|
Github is epic, and it has an AWESOME Git for Windows client. But I don't really use it 'cause if you want private repositories you need to pay... Instead I use Bitbucket: http://bitbucket.orgIt's awesome, free and simple (ish) Just thought you might want to know
|
|
|
Logged
|
So long and thanks for all the pi
|
|
|
Eigen
|
|
« 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
|
|
« Reply #4 on: April 02, 2013, 11:28:54 PM » |
|
Github is epic, and it has an AWESOME Git for Windows client. But I don't really use it 'cause if you want private repositories you need to pay... Instead I use Bitbucket: http://bitbucket.orgIt'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
|
|
« 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
|
|
|
Logged
|
|
|
|
Xienen
|
|
« 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
|
|
« 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.
|
|
« 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
|
|
« Reply #9 on: April 03, 2013, 09:08:17 PM » |
|
If I remember correctly, one of the links I listed explains that.
|
|
|
Logged
|
|
|
|
alts
|
|
« 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-SubmodulesAnother 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
|
|
|
|
ALourenco
|
|
« 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
|
GameDev Master Student. Game Engines and Computer Graphics in free time. @CodinGree
|
|
|
Sean A.
|
|
« 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
|
|
« 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: <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.
|
|
« 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
|
|
|
|
|
|