XNA Creators Club Online
Page 1 of 1 (19 items)
Sort Posts: Previous Next

How to people manage/backup their source?

Last post 4/23/2009 8:43 PM by Erglegrue. 18 replies.
  • 4/19/2009 7:28 PM

    How to people manage/backup their source?

    Hello!
    I wonder if any of you guys have a good way of backing up your sources. I like to keep "milestones" separate so I know I'll have a safe base to revert to if I should need to. Currently I just make a zip with a description and date, but it strikes me as not the best way of doing it. :)

    Is there any of you who use some kind of simple management system for their code files? I'd love to hear who others manage their code in terms of backups and version control and such.

    Thanks!

    Kjetil
  • 4/19/2009 7:42 PM In reply to

    Re: How to people manage/backup their source?

    I use SVN (specifically using VisualSVN which is a Visual Studio plugin wrapper of the freely available TortoiseSVN tool) along with xp-dev.com's free 1GB of hosting. I check my files in every time I work on them so I can revert back to any change I want. Works pretty well and also gives me access to the source files from any machine.
  • 4/19/2009 7:59 PM In reply to
    • (2334)
    • premium membership MVP
    • Posts 1,222

    Re: How to people manage/backup their source?

    Source control is what you're looking for.  There are a bunch of resources listed here.
    Matt Pettineo | DirectX/XNA MVP


    Ride into The Danger Zone | PIX With XNA Tutorial
  • 4/19/2009 7:59 PM In reply to

    Re: How to people manage/backup their source?

    I have a 1tb external hard drive, and I copy my entire project folder over to it every few days or before I'm about to do something major. It's not the most efficient way though; I'm figuring out how to work TortoiseSVN so I can use that too. I'm a bit weary of online storage - the thought of my hard work floating around on the internet is kind of scary - so I'm probably going to get another 1tb drive and keep it at an off site location.
    "Software is never finished, it is in varying states of 'less broken'" because "If it ain't broke, it doesn't have enough features yet"

    In Playtest: Avatar Land | The MANLY Game for MANLY Men

    The signature that was too big for the 512 char limit
  • 4/19/2009 8:06 PM In reply to

    Re: How to people manage/backup their source?

    Any source control system with proper backups will be sufficient.  As Nick mentioned, SVN is popular.  For XNA projects, SVN is probably good enough for you.  It allows for collaboration and adequate branching/tagging.

    Personally, I use Git for all of my code plus nightly backups of all Git repositories, but you're not going to find any pretty GUI tools for Windows.  :)
    Microsoft DirectX/XNA MVP
  • 4/19/2009 8:06 PM In reply to

    Re: How to people manage/backup their source?

    UberGeekGames:
    It's not the most efficient way though; I'm figuring out how to work TortoiseSVN so I can use that too.
    Even if you're just locally doing version control, SVN is a great solution. Check out the VisualSVN Server which is a quick install that handles setting up your local SVN repository and acts as an admin tool for it. And it's free. :)

    I'm a bit weary of online storage - the thought of my hard work floating around on the internet is kind of scary - so I'm probably going to get another 1tb drive and keep it at an off site location.
    I recommend both, personally. Keep a local copy in case the online one goes away, keep the online one in case your local one dies. I wouldn't worry about anyone stealing the code, to be honest. There's so much information and data online, and odds are your code is nothing extremely novel, that the odds of someone finding it and deciding it's worth stealing are pretty slim.

    But then, I also made my repository public so I clearly don't care about people using it. :)
  • 4/19/2009 8:25 PM In reply to

    Re: How to people manage/backup their source?

    okay, yeah I know about SVN but I didnt know how hard it is to setup and use We used it at my work 5 years ago, and it demanded some management then, but maybe it's changed into something easier now :) I'll look into this.

    How do you make sure you keep syncronized files though, check in all files each time? or, at regular intervals perhaps.

    Well, I'll check this. Thanks for all the tips guys.

    Kjetil
  • 4/19/2009 9:41 PM In reply to

    Re: How to people manage/backup their source?

    I check in every hour or so, but only if everything compiled correctly.
  • 4/19/2009 10:16 PM In reply to

    Re: How to people manage/backup their source?

    Heh, I just use a 4GB flash drive, and copy stuff over any time I think I've done something useful.
  • 4/20/2009 12:41 AM In reply to

    Re: How to people manage/backup their source?

    I personally use VisualSVN, and I store my code changes to a server that Twanks set up.

    It works wonderfully, and has all kinds of options that prevent you from messing your code up.  It also allows you to revert your changes automatically, and merges files together.


  • 4/20/2009 2:31 AM In reply to

    Re: How to people manage/backup their source?

    Erglegrue:
    Heh, I just use a 4GB flash drive, and copy stuff over any time I think I've done something useful.


    That sent shivers down my spine remembering way back in the day when I lost my University assignments because of the silly little things.
    But then again that was back a while when their quality was a little less.

    I just copy over to my other PC over the network and name the folder with date and a name that reminds me what had been done to date and a tag to say if compilable or not. Also keep a 'go back to copy' which is the latest working example and keep a separate folder for experimental work on the current project.

    Been meaning to look into other methods as mentioned above. But don't think my project is really at a stage where it matters too much at the moment.
  • 4/20/2009 3:06 AM In reply to

    Re: How to people manage/backup their source?

    Most people only seem to think about accidentally deleting a file or needing to revert back to an old version of a file when they consider file backups.

    You should also consider what happens in the event of a disaster, like your house burns down, there is a flood, a crazy girlfriend destroys all your possessions, etc. The likelyhood of that happening is small, but how much would it suck to lose everything you've worked on? You should have some sort of offsite backup. Going with an online source is your safest bet.

    I use Mozy.com right now for nightly backups (no need to check anything it, all my files get backed up) and I'm gonna try out XP-dev so I can do my source control offsite as well (maybe quit using Mozy if it works well).
  • 4/20/2009 4:00 AM In reply to

    Re: How to people manage/backup their source?

    kjetilhj:
    okay, yeah I know about SVN but I didnt know how hard it is to setup and use We used it at my work 5 years ago, and it demanded some management then, but maybe it's changed into something easier now :) I'll look into this.


    I guess this depends on where and how you want to set it up.  I found it to be a bit of a PITA to setup on Windows Server 2k3 (works great once you do get it setup) but it was a breeze setting it up on a Linux server for work.  If you're concerned about the setup an online solution might be best as it requires no real setup on your part.  You could also take a look at this Lifehacker article from a while back: Link.

    kjetilhj:


    How do you make sure you keep syncronized files though, check in all files each time? or, at regular intervals perhaps.



    Just run svnupdate on your working copy and let Subversion sort it all out.  It works quite nicely and any worthwhile SVN client will have a diff viewer to handle any conflicts that arise.
  • 4/20/2009 4:28 AM In reply to

    Re: How to people manage/backup their source?

    For those wanting to setup Subversion on a Windows machine. I found the Coding Horrors step by step instructions for setting up Subversion on Windows pretty easy to follow (and if you're not already reading his site, definitely a good one to add to your RSS feed as a developer).
  • 4/20/2009 5:37 AM In reply to

    Re: How to people manage/backup their source?

    Is Subversion completely open source though?  Meaning if I am developing a game and I would like to back up my files (or maybe even have them accessible to team mates) but I want to keep the code within my team, is there a way to do this?  I read about Subversion a little and it sounded like uploading to that site gave anyone access to your files (but then again it could have meant the subversion software is open source, I'm not exactly sure).  Could someone please clarify for me?
  • 4/20/2009 10:49 AM In reply to

    Re: How to people manage/backup their source?

    Subversion as an application itself is open-source. That does not mean that anything that you store in it automatically becomes open-source too. Compare it to an open-source database. The fact that the database is open-source does not mean that any data stored in it is open-source too.

    BTW, it is not always necessary to set up a Subversion repository as a real "server" repository (with a Windows service running etc., like it is decribed behind the link George gave). If you are a single developer and have only one development computer, which contains both your working copy (i.e. the place where you edit your sources) and your Subversion repository, then it is very easy to set up the repository in such a way, that there isn't even any server software running (no service in the background etc). The Subversion client then simply accesses the repository directly using the file:// protocol (instead of svn://). Of course then you need a client which supports "file://" (not all do, but many). I'm using this myself and it keeps the Subversion footprint on my computer very low. This should even work for a smaller home network and several computers, using shares and mapped drive-letters (although at that point a "real" server/service may be easier to configure).

    Doc
  • 4/20/2009 1:05 PM In reply to

    Re: How to people manage/backup their source?

    Source Control is defo the way to go. Not only does it provide backups of sorts, but also allows you to make easy comparisons between versions.

    For example, you can compare your current code to your last working code, to find out what it is you've just done to break it.

    This appears to be free for up to 2 users...

    http://www.perforce.com/

  • 4/21/2009 10:14 AM In reply to

    Re: How to people manage/backup their source?

    I'm using CVS; backup and working versions on different hard drives, then duplicate the back up to flash drive every now and then. I did try Subversion, but it was too much hassle to figure out - I've got CVS integrated into Explorer, which is rather nice. Before that I used to zip up sets of source code and title them with the date (year/month/day to make sorting clearer), until a friend told me to stop being silly and use proper source control.
  • 4/23/2009 8:43 PM In reply to

    Re: How to people manage/backup their source?

    JuiceMan118:
    Erglegrue:
    Heh, I just use a 4GB flash drive, and copy stuff over any time I think I've done something useful.


    That sent shivers down my spine remembering way back in the day when I lost my University assignments because of the silly little things.
    But then again that was back a while when their quality was a little less.
    I figure the chances of having both my flash drive get lost and my hard drive crashing at the same time are very, very slim. I copy to the flash rather frequently, and I always leave it on my desk. I have a separate drive if I want to carry files to other places.
Page 1 of 1 (19 items) Previous Next