I’ve been fascinated by github for the past few months and I’ve been wondering why a lot of people use it.
I wanted to try to get my code on there for my sole, personal use, but I was asking myself why I would in the first place and couldn’t verify for sure whether my expectations of how GitHub could work are consistent with how it actually works. How does it work, really? And what is it for? The way I understand it, its primary (or only?) use is for collaborating with other devs that also work on the code.
For my personal use, I was thinking more along the lines of — can I use it simply as a code repository? or maybe even a version manager? Just so I have a place where I can easily access my code from any machine (like, my home machine vs my office machine)?
But then, after reading about it more, it seems like you can only use it for free if you’re hosting open-source projects. I wanted more of something one could use privately. Is java.net the answer to this? If yes, an additional question: Can it integrate well with Eclipse (if it can integrate at all)?
For how git works it is best to watch a short video on youtube about it.
Mainly it allows you to keep track of your versions, changes, functions et cetera.
Git is a bit hard to learn, and way harder to keep yourself disciplined to use it. But has many benefits.
If you want to use something with the look and feel of github but want to have private repositories i would recommend https://bitbucket.org/
It offers wiki, issue tracking and much more
I used it before i setup my private gitserver (Gitlab) and was very satisfied.
One of the main reasons i use git is that i can experiment with the code and then rollback if it was a mess (without having to edit files, change a folder etc) or merge it with my ‘stable’ code
Free projects on GitHub don’t have to be intentionally “open-source” - they’re just public. People copying code off public projects isn’t really a problem. GitHub is great for just versioning, but best for open-source. Github integrates ok with eclipse, but I wouldn’t really know because I don’t use it (built-in) in Eclipse - I just load my project from my github folder, make changes in Eclipse, then load up the GitHub client and commit/sync. Also, that lmgtfy link is completely unnecessary - he’s asking specifically about GitHub and whatever java.net is.
Code on Github aren’t public domain unless specified by it or WTFPL. You can’t just come to someone’s repo (like evernote, node, libgdx, etc) and copy their code around. Each repo has its own license.
[quote]One of the main reasons i use git is that i can experiment with the code and then rollback if it was a mess (without having to edit files, change a folder etc) or merge it with my ‘stable’ code
[/quote]
Yes, this is exactly the use for it that I had in my head. Because currently, my crude way of backing-up is simply to copy and paste my entire project folder from the Eclipse workspace to a separate backup folder and append the date and time of the backup -_- Then if I screw something up terribly, I either manually copy the parts I need from the last working backup or copy the entire backup back to the workspace altogether if my changes completely wrecked the project.
Thanks, I’ll check this out It’s not blocked at work so it may also satisfy my need to have my project code available on any machine I’m working on. For… y’know… when I’m at work and don’t feel like working
Sorry, I might need clarification on these two statements:
“People copying code off public projects isn’t really a problem.”
and
“You can’t just come to someone’s repo (like evernote, node, libgdx, etc) and copy their code around.”
With how I understood how GitHub works (the free account where you can only create open-source repos), it seemed like people can totally access someone else’s code and copy it around. Like, I can go for example to Texture.java on GitHub, highlight the entire thing, and paste it wherever to be used.
Or is Texture.java specifically just made to be accessed that way? Meaning, there might be other parts of the project which one can’t copy and paste around?
No, on GitHub with the default free usage, everything is public and view-able/copy-able. If you are uncomfortable with that, then I recommend BitBucket; it’s quite nice. Even has it’s own (well the parent company’s) client if you don’t want to use Egit or something. That’s also free.
[quote]With how I understood how GitHub works (the free account where you can only create open-source repos), it seemed like people can totally access someone else’s code and copy it around. Like, I can go for example to Texture.java on GitHub, highlight the entire thing, and paste it wherever to be used.
[/quote]
Open source usually comes with a license. You can take the code and learn from it, even manipulate it until it becomes something else entirely (much like remixing a song). And usually, you can re-distribute the original code and its remixes. But if you do not re-distribute the code or your application in accordance with the specified license, you could face legal repercussions.
GitHub is really worth getting the hang of. You can fork other libraries, improve them, send the changes back as a “pull request” so that the developers can merge it with the main repository. It allows for “community coding” so to speak. Github also has support for wikis, releases (binary downloads), and even static sites.
Unless you’re developing security systems or something, I wouldn’t worry too much about others seeing your code. Chances are, your programming skills are not good enough to warrant your code being stolen…
Thanks davedes. While I’m inclined to agree that I couldn’t think of any reason why anyone would want to copy or steal my code, maybe it’s just that the code being open-source might feel like how being naked in public would feel like, if that makes any sense
I’ll probably explore GitHub in the future; but from the looks of it, I might prefer exploring BitBucket first
We all know there is nothing you can’t do in internet TECHNICALLY. What I said was that’s not good practice. Huge link of torrents doesn’t mean pirating is allowed. What do you think OSS license for? They’re not strict, yes. They allow copy, yes. They allow modification, yes. But not all as simple as you said.
I use bitbucket too and it’s great.
I use to use dropbox and skydrive to try to get backup and sync with my programming projects but it was so messy, would sync on every single compile and hog the internet badwidth and my computer’s CPU. Bit bucket and git is definitely the way to go.
Git works well with the latest version of netbeans. No need to install anything special. Just make an account on bit bucket then read a netbeans tutorial about git and you’re done.