version control strategies

Hi folks, first time poster. Pardon me a few possibly stupid questions.

What is the best strategy for versioning when developing oF/C++? I don’t mean hooking XCode up to subversion necessarily, but the workflow of quickly and easily leaving a trail of versions as you code like the wind.

So far I have just been, every so often, coming out of XCode, duping the “src” folder and naming it with the date and time. But that doesn’t really make it easy to roll back quickly. There must be a smarter way than this.

I’m used to working in Processing, and hitting “save as…” every 10 minutes.

Any pointers appreciated.

And … um … hello.

Hi,

I would recomend taking the time to learn git. It offers a really powerful branching mechanism. For instance, it’s very easy to create “experimental” branches, which you can easily merge in or discard. This talk might help if you are interested.

best regards

david

cheers david, but my query is actually much dumber than that. I really want the fastest way of doing a “save as” for a whole project. This is how I am used to working in Processing, creating many, many iterations of my code as I go.

In fact any pointers on workflow and file organisation would be appreciated. It is the main thing I am struggling to get my head around.

there are two options:

  1. copy + paste the entire apps/myApp folder, just like processing.
  2. learn a version control system like git.

i’m not smart enough to manage many copies of projects in different folders, i get confused easily by the duplication, so i use git even on small single-user single-folder 4-source-file projects.

I have to say I use the very lo-fi method of CMD+D on my apps/MyApp folder (the folder above ‘src’, that way the data folder also gets backed up and you can open the xcode project directly). I then rename the folder name and xcode project file with a sequence number and description.

OF
— apps
------ Body Paint Dev
--------- Body Paint 001
------------ Body Paint 001.xcodeprj
------------ src
------------ bin
------ Body Paint 002 with VBO
------------ Body Paint 002 with VBO.xcodeprj
------------ src
------------ bin
------ Body Paint 003 lines
------------ Body Paint 003 lines.xcodeprj
------------ src
------------ bin
------ Body Paint 004 FBO Blur
------------ Body Paint 004 FBO Blur.xcodeprj
------------ src
------------ bin
etc.

as the folders gets bigger I just selectively delete and/or zip some folders.

i’ve started using git too, but I still prefer seeing everything like this. I can open multiple versions at the same time, use Araxis Merge to do 3-way comparisons with a nice GUI between different version source files etc. Also I really recommend Time Machine (on Mac), it actually works… and amazingly well too (it’s all automatic, you just go back in time and browse how your machine was xxx hours/days/weeks/months ago). I use the folder duplicating for major milestones, svn/git for minor milestones, and Time Machine for anything left over.

I prefer git, especially in use with GitHub.
The good thing: openFrameworks is on GitHub, too! :smiley:

I think an

  
git commit -a  

at the console is as easy as a “save as”

Hi there,

actually I’m looking for exactly the same thing as zenbullets: just a quick and dirty save as. I don’t want to copy the whole folder, as it is huge, compared to the tiny changes to the code I want to commit.

@zenbullets: how did you end up doing it?

Regards
StrongBow

So I am planning on using OF as the basis for a kinda large (4-10 person) indy game project in a few months. Since there will be a number of people working on the project I will be setting up a Version Control System before too long. I had a few questions:

  1. Since a big chunk of the people working on the project will be student interns I would like to make the process of getting them up to speed as painless as possible.
    Is it possible to set up the project so that everyone else won’t have to go through the OF install process? (I would like to just get them in the correct version of Code::Blocks and then point them to the VCS server)

  2. If the above is possible, what will it take? Is the default OF project pretty well encapsulated (we will be using a few addons) or will I be in for a huge mess? (I am coming from Processing But I did a bunch of undergrad level C++ work before that)

  3. and a side note, assuming I am not using any video is it a pain to develop for Win/OSX/LINUX all at the same time?

I decided to use OF to make my life easy(er). Are the above good ideas or am I being foolish.

thanks

Hi Luke,

[quote author=“luke.noonan”]1. Since a big chunk of the people working on the project will be student interns I would like to make the process of getting them up to speed as painless as possible.
Is it possible to set up the project so that everyone else won’t have to go through the OF install process? (I would like to just get them in the correct version of Code::Blocks and then point them to the VCS server)[/quote]

For Code::Blocks there are a number of extra files that need to be installed in appropriate places; this isn’t easy.

Fortunately you can copy the entire openFrameworks tree and that is self-contained.

  1. and a side note, assuming I am not using any video is it a pain to develop for Win/OSX/LINUX all at the same time?

If you stick to oF code, it’s dead simple.

Cheers all.

@StrongBow I haven’t been able to come up with anything better than Memo’s directory structuring above, even though it sometimes means copying a few Meg with every iteration. But it means there is always a full working version to roll back to.

I have also been Cmd-D’ing the “src” folder alone, and creating sub-iterations with that. Not easy to roll back to but they only take a few K of disk space.

I’m just glad I’m not the only one with such a sloppy workflow.