Alex Rivera | Logout

Source Control - If, Why, How to start?

Asked 2010-01-14T13:13:35.613
10

Possible Duplicate:
Using Source Control

So, although even here on Stack Overflow are literally dozens things on version control, I can't find something nice to answer all my questions. If you have anything to say or post a link, please do it here.

1., Do I need to start with version control?

While most people agree, that even single developer/programmer should start with version control, nobody (or at least in understandable form) tells

2., How?

In my nature is that I need to know what means CVS, SVN, Tortoise, Git, GitHub and what are the differences, but I struggle to find some dead simple kick-start into world of version control.

As a developer/programmer, I worked or studied almost every programming/markup language, that is major (from Pascal to Java, from HTML to PHP) and used dozens of editors, IDEs and programs. And when somebody mentions you can use source control even for writing stuff - homework for students, annual reports, books... You have to include even more editors...

I have no clue how to start with version control, how to incorporate it in my workflow, if I need server or what.

Edit

From all your answers (thank you), I get the feeling it's really only something like "synced folders with history" (in the most obvious way). If yes, can you answer two questions? (numbered 4. and 5., so it wont mix up in answers)

4., what if I decide to completely change structure of my program (for ex. in flex, I decide to use two as3 class instead for MXML components) - won't it make confusion?

5., From other questions, how often do I commit? (found this question posted and probably answered, lost it again however)

Edit 2

Again, more answers (thank you).

6., My question 4 was more like if I accidentally (or not) renew some de

Edit
Report

3 Answers

2

Regarding source control you might want to look at this "How to use SVN, Branch? Tag? Trunk?".

And about using some kind of source control, it's always good to have revisions of your code and documents regading the software development. It might be worth looking in to GIT.

answered 2010-01-14T13:17:07.040
2

On the solitary hobby side of things, source control solves three problems for me.

  1. Backup in case of hardware/software/wetware failure
  2. Easy synchronization between different machines (laptop, desktop, friend's computer)
  3. But, the game changer for me was Git's strong support for branching.

Let me expand on #1. Besides the uncontrollable failure cases, I can go off and do speculative development and if/when the speculation fails going back to a stable base is easy.

Let me expand on #3 for a second. I always have a fairly large list of features I want to add to the software I'm writing. I create a branch for a feature I want to add and can work on it for a while. If later, I feel the desire to work on a different feature, I can go back to a working base and work on the other feature for a while. When I'm happy with any/all of the changes, merging it all together is easy.

I've used SourceSafe, ClearCase, CVS, SVN, SCCS, RCS, and Git in development, and for me the tool that got me using version control on a regular basis in hobby programming was Git. It not only got out of my way, but it made the above mentioned tasks easier.

answered 2010-01-14T14:14:15.757
1

Yes!Yes! please start with Git.

Am a developer with a habit of trying new things/methods to an already stable application. Before i met Git i kept copying my current stable project to a folder an date stamp the folder just to remember where i was and which was the stable version, then i would start toying around with the code.

But with Git i have no problem trying new tricks on my code, what i do is just branch from my master (main stable app) do my tries, and if i fail in what i was attempting i just discard the branch and switch back to my Master quickly which is still intact, safe and stable. And if am successful (which most of the time am not ) i just Merge the branch to the master, then discard the branch. How nice.

Branching in Git was what made me fall head over heels with it. Try it

answered 2010-01-14T14:23:27.873

Your Answer