Git is an online, cloud-based service that's designed for software development. It basically lets you store your source code online and has version control and forking built in.
*twitches a little* That's what
github is.
Git is a version control system. There are lots of them out there. Subversion, Mercurial, Perforce, Team Foundation Server and Fossil are all version control systems. Git is one of the most popular, although I would argue that Mercurial is friendlier to newcomers. Whatever. You install them on your computer, they're a program, just like firefox.
The purpose of a version control system is to maintain a full history of your code. It's kind of like an enhanced save function. You can write some code, hit ctrl-s, write some more, save again. At some point, you'll go "Ok, this is working. This is good.". At that point, you may choose to
commit your changes to your VCS. This takes a snapshot of your code, and stores it in the version control system. At any point in the future, you can ask the version control system to show you the difference between the current code on your computer, and what it was like the last time it was working properly, when you committed it. You could roll back to that version if you had problems, or just wanted to test how it worked at that time.
VCS's often support branching as well. You might have a problem, and can think of two possible solutions to it. You can
branch your code, and the VCS will keep track of two different copies of it. You can swap between and work on both branches, until you decide on your preferred solution. You can then
merge that branch back into your main (often called release) branch, and continue developing. Maybe later, you might want to go back and look at the alternative solution you discard. The version control system still has it stored, and can show it to you.
They often have a bunch of other features as well, including decentralized sharing of code, storage of large binary files, redundant backup, access control blah blah blah. At some point as you continue coding, you'll one day find yourself copying a folder and naming it "sourcecode_backup_2016_11_18" or whatever, because you want to make a change but you're worried you're gonna break your currently working code, and you want to have a copy of the working version on hand. When you find yourself about to do that, that's the point where you should go look into git :)
Github is all that, but managed via a nice web interface. It's kinda sorta turned into a programmers social network as well. I'm not a fan of giving other people control over my sourcecode, so I run a self-hosted instance of gitlab instead, but I'm rapidly turning into an angry old man that yells at Clouds so don't listen to me.
edit: also jeez this thread was from last year, how embarrassment
Edited by Sir_Substance, 19 November 2016 - 06:40 AM.
Kablez-
You can only beat a brick wall with so many sticks until... you wasted all your time collecting and breaking sticks against a wall...
Tantryl-
Knowledge is the new power, but will never provide a stable baseload as cost effective as burning puppies.
mm80x:
I allege that Sir substance must be from the internet