# Programmers - teach me about version control

**URL:** <https://boards.straightdope.com/t/programmers-teach-me-about-version-control/748431>\
**Category:** In My Humble Opinion\
**Created:** [March 9, 2016, 6:05pm UTC](https://boards.straightdope.com/t/programmers-teach-me-about-version-control/748431 "2016-03-09T18:05:27Z")\
**Posts on this page:** 14\
**Page:** 3

<div class="post-metadata">

**Author:** ![amanset](https://avatars.discourse-cdn.com/v4/letter/a/8dc957/32.png) [@amanset](https://boards.straightdope.com/u/amanset)\
**Post date:** [March 14, 2016, 10:11pm UTC](https://boards.straightdope.com/t/programmers-teach-me-about-version-control/748431/41 "2016-03-14T22:11:30Z")

</div>

> [@Dr.Strangelove](#):
>
> If nothing else, it’s a good way of backing up your project. Personally, I have several development machines that I switch between, and I need some centralized repository that’s always up. I use my own server but GitHub would be equivalent.
> 
> Code that only exists locally is just waiting to die. Even Linus Torvalds [found this out the hard way](http://www.techweekeurope.co.uk/workspace/torvalds-dead-ssd-delays-3-12-linux-kernel-126895).

Also, if you don’t get to work on your hobby projects as often as you’d wish, a diff is a great way to see what you were doing last time.

There’s the ability to roll back to a previous version if what you’ve done turned out to be stupid.

But as you said, at its most basic it is a method of backing up that is designed for backing up code.

Oh and I’ve often gone to Bitbucket’s website to refer to code. Maybe I’ve done something at home that might be useful for work, it is a few taps away on my phone. Out mingling with other developers, again I can access my code.

I honestly can’t think why you wouldn’t do it. Well, unless you are paranoid about other people having access to your code.

Finally, I write games using Unity. They now have a free (for projects up to 1GB) cloud build service. You check in code and it builds for specific targets for you. In theory you could developer for iOS without ever launching Xcode or for Android without ever installing the SDK.

---

<div class="post-metadata">

**Author:** ![Blue\_Blistering\_Barnacle](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/blue_blistering_barnacle/32/3386_2.png) [@Blue\_Blistering\_Barnacle](https://boards.straightdope.com/u/Blue_Blistering_Barnacle)\
**Post date:** [March 14, 2016, 10:14pm UTC](https://boards.straightdope.com/t/programmers-teach-me-about-version-control/748431/42 "2016-03-14T22:14:01Z")

</div>

nm

---

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [March 14, 2016, 10:43pm UTC](https://boards.straightdope.com/t/programmers-teach-me-about-version-control/748431/43 "2016-03-14T22:43:19Z")

</div>

> [@amanset](#):
>
> Also, if you don’t get to work on your hobby projects as often as you’d wish, a diff is a great way to see what you were doing last time.

To be clear, **BigT** was referring to GitHub specifically rather than just git alone. Diffs and stuff work fine on a local repository.

The shorter justification for using GitHub is just _all the same reasons why you might use a cloud file service instead of keeping your files local_. Collaboration, backups, availability anywhere, etc. That stuff is on top of the usual benefits of source control (whether distributed or centralized).

---

<div class="post-metadata">

**Author:** ![amanset](https://avatars.discourse-cdn.com/v4/letter/a/8dc957/32.png) [@amanset](https://boards.straightdope.com/u/amanset)\
**Post date:** [March 14, 2016, 11:06pm UTC](https://boards.straightdope.com/t/programmers-teach-me-about-version-control/748431/44 "2016-03-14T23:06:37Z")

</div>

> [@Dr.Strangelove](#):
>
> To be clear, **BigT** was referring to GitHub specifically rather than just git alone. Diffs and stuff work fine on a local repository.
> 
> The shorter justification for using GitHub is just _all the same reasons why you might use a cloud file service instead of keeping your files local_. Collaboration, backups, availability anywhere, etc. That stuff is on top of the usual benefits of source control (whether distributed or centralized).

I simply can’t split the two. Git without a server is just asking for trouble.

---

<div class="post-metadata">

**Author:** ![Blue\_Blistering\_Barnacle](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/blue_blistering_barnacle/32/3386_2.png) [@Blue\_Blistering\_Barnacle](https://boards.straightdope.com/u/Blue_Blistering_Barnacle)\
**Post date:** [March 15, 2016, 2:59pm UTC](https://boards.straightdope.com/t/programmers-teach-me-about-version-control/748431/45 "2016-03-15T14:59:06Z")

</div>

So, I would describe myself as “pre-hobbyist” programmer. I suppose it’s reasonable for me to work through my book and its exercises BEFORE looking at GitHub? Any comments?

---

<div class="post-metadata">

**Author:** ![friedo](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@friedo](https://boards.straightdope.com/u/friedo)\
**Post date:** [March 15, 2016, 3:11pm UTC](https://boards.straightdope.com/t/programmers-teach-me-about-version-control/748431/46 "2016-03-15T15:11:23Z")

</div>

> [@Blue\_Blistering\_Barnacle](#):
>
> So, I would describe myself as “pre-hobbyist” programmer. I suppose it’s reasonable for me to work through my book and its exercises BEFORE looking at GitHub? Any comments?

No reason you can’t do both at the same time, depending on how much you’re comfortable doing at once. (But as mentioned above, git and GitHub are separate things.)

FWIW, I’ve found books with exercises helpful for getting started with new programming languages, but the only way to really learn it is to try and build a project, or contribute to an existing project. But everyone learns differently, so do what feels natural for you.

---

<div class="post-metadata">

**Author:** ![Blue\_Blistering\_Barnacle](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/blue_blistering_barnacle/32/3386_2.png) [@Blue\_Blistering\_Barnacle](https://boards.straightdope.com/u/Blue_Blistering_Barnacle)\
**Post date:** [March 15, 2016, 3:19pm UTC](https://boards.straightdope.com/t/programmers-teach-me-about-version-control/748431/47 "2016-03-15T15:19:46Z")

</div>

Maybe I need to read the posts more closely- I was gathering that GitHub was a way to subscribe to a Git platform. (I also understand that it is a community of users).

---

<div class="post-metadata">

**Author:** ![friedo](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@friedo](https://boards.straightdope.com/u/friedo)\
**Post date:** [March 15, 2016, 3:34pm UTC](https://boards.straightdope.com/t/programmers-teach-me-about-version-control/748431/48 "2016-03-15T15:34:26Z")

</div>

Git is free software which lives on your computer. You don’t need a git server to get started, but GitHub will provide a server for you. A git server allows you to “push” your repository to a remote place so you can access it from elsewhere (“pull” it) and more easily share it with others. GitHub is popular and provides a number of nice tools on top of git, but is not required.

---

<div class="post-metadata">

**Author:** ![UncleRojelio](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/unclerojelio/32/3160_2.png) [@UncleRojelio](https://boards.straightdope.com/u/UncleRojelio)\
**Post date:** [March 15, 2016, 3:38pm UTC](https://boards.straightdope.com/t/programmers-teach-me-about-version-control/748431/49 "2016-03-15T15:38:25Z")

</div>

> [@TwoCarrotSnowman](#):
>
> I found [this](http://www.foobt.net/spring2014/csci21_2545/files/guide-github-cloud9.html) guide online, but it only talks about syncing files you are working on, not how to point them to a particular branch. I can follow the logic, even if I don’t totally grok the syntax yet. Does the contents of that website seem sensible? I found it via Google, and I trust the Dope more than some random page I found online. 🙂

I found this [online book](https://git-scm.com/book/en/v2) very helpful in learning the philosophy and usage of both Git and Github.

---

<div class="post-metadata">

**Author:** ![Blue\_Blistering\_Barnacle](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/blue_blistering_barnacle/32/3386_2.png) [@Blue\_Blistering\_Barnacle](https://boards.straightdope.com/u/Blue_Blistering_Barnacle)\
**Post date:** [March 15, 2016, 6:42pm UTC](https://boards.straightdope.com/t/programmers-teach-me-about-version-control/748431/50 "2016-03-15T18:42:06Z")

</div>

> [@UncleRojelio](#):
>
> I found this [online book](https://git-scm.com/book/en/v2) very helpful in learning the philosophy and usage of both Git and Github.

Thanks. I’ll look at that.

---

<div class="post-metadata">

**Author:** ![HMS\_Irruncible](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/hms_irruncible/32/7394_2.png) [@HMS\_Irruncible](https://boards.straightdope.com/u/HMS_Irruncible)\
**Post date:** [March 15, 2016, 10:32pm UTC](https://boards.straightdope.com/t/programmers-teach-me-about-version-control/748431/51 "2016-03-15T22:32:30Z")

</div>

> [@Blue\_Blistering\_Barnacle](#):
>
> Maybe I need to read the posts more closely- I was gathering that GitHub was a way to subscribe to a Git platform. (I also understand that it is a community of users).

I highly suggest going through a git tutorial before you pick up Github. Not because there’s anything hard about Github, but because it’s extremely helpful to understand the distinction between the two. Once you are pretty familiar with your experimental git project, then learn how to transfer it to Github, and you’ll have a pretty good education.

---

<div class="post-metadata">

**Author:** ![Blue\_Blistering\_Barnacle](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/blue_blistering_barnacle/32/3386_2.png) [@Blue\_Blistering\_Barnacle](https://boards.straightdope.com/u/Blue_Blistering_Barnacle)\
**Post date:** [March 15, 2016, 10:41pm UTC](https://boards.straightdope.com/t/programmers-teach-me-about-version-control/748431/52 "2016-03-15T22:41:47Z")

</div>

So I would get git first, work through that , then sign up with GitHub?

---

<div class="post-metadata">

**Author:** ![HMS\_Irruncible](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/hms_irruncible/32/7394_2.png) [@HMS\_Irruncible](https://boards.straightdope.com/u/HMS_Irruncible)\
**Post date:** [March 16, 2016, 1:10am UTC](https://boards.straightdope.com/t/programmers-teach-me-about-version-control/748431/53 "2016-03-16T01:10:41Z")

</div>

> [@Blue\_Blistering\_Barnacle](#):
>
> So I would get git first, work through that , then sign up with GitHub?

Yes, git is free and local. Load up on those concepts. Google “git tutorial” and work through that. Then GitHub will make a lot more sense to you.

Here’s my best way to explain it… if you’ve ever tried to get several jobs at several different times, and you have Resume\_companyA.doc, Resume\_companyB.doc, Resume2\_companyB.doc… version control will suddenly make a lot of sense to you.

---

<div class="post-metadata">

**Author:** ![Balthisar](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/balthisar/32/2825_2.png) [@Balthisar](https://boards.straightdope.com/u/Balthisar)\
**Post date:** [March 16, 2016, 4:32am UTC](https://boards.straightdope.com/t/programmers-teach-me-about-version-control/748431/54 "2016-03-16T04:32:00Z")

</div>

> [@amanset](#):
>
> I simply can’t split the two. Git without a server is just asking for trouble.

No need for a server at all. You can set up remotes on locally mounted file systems, too. I keep a directory in my Dropbox for this purpose, so I don’t have to constantly push private stuff to Github. And when I’m on another machine, I can pull immediately.

mkdir my\_remote; git init --bare; git remote add dropbox path/to/remote

This is a git repo, too. You can branch and prune and everything else that’s needed, too.

[Previous page](https://boards.straightdope.com/t/programmers-teach-me-about-version-control/748431.md?page=2)
