Jump to:

23581 Posts in 19403 Topics by 2893 members

General Questions

SilverStripe Forums » General Questions » taking a leap to Source Control

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1360 Views
  • DsX
    Avatar
    Community Member
    178 Posts

    taking a leap to Source Control Link to this post

    OK, I have a number of silverstripe projects on the go, and they are on going.
    I am a single developer, and am starting to feel the need for source control, since I am back and forth between these projects.

    I don't know where to start?
    Really.. this is totally new to me. I tried to go through a online tutorial and blahh.. that didn't work.

    One thing is that I have checked-out 'most' modules in my sites by SVN (tortiouse), I have 1 or 2 that are checked out via Git... my silverstripe core files are just copies extracted from the download.

    Can anyone lead me down this road? Do I need to change the way I have the files setup on my machine now (can I version control folders that are under version control)? Should I use an online repository or local? What is the suggested way to setup so that the core silverstripe folders (eg cms, sapphire) can just be Updated via SVN?

    Should only MY folders be source controlled?

    Once sourced controlled what is the preferred method of launching an update to server?

    Its the complex nature of the system I think that has me messed up. My files, SVN folders, Git folders etc...

    Any help would be greatly appreciated.. this is the next big leap for me in my silverstripe development.

  • Willr
    Avatar
    Forum Moderator
    5511 Posts

    Re: taking a leap to Source Control Link to this post

    Hi DsX,

    The method we recommend currently is to use Piston to manage Sapphire, CMS and the modules, this is especially useful if you only need the modules for read only uses (http://piston.rubyforge.org/)

    Do I need to change the way I have the files setup on my machine now (can I version control folders that are under version control)?

    Well you *could* but it is a bad idea. Piston helps solve this. The files will be stored in your version control repository but a link to the main repo will exist, allowing you to update at any point.

    Should I use an online repository or local?

    Online is much more useful, though if you're not 'sharing' then could be less of a factor. Storing your repo online can also act as another backup for you which is always good.

    What is the suggested way to setup so that the core silverstripe folders (eg cms, sapphire) can just be Updated via SVN?

    Like I said, using piston is our recommended way. If you're like simon_w you won't like git and prefer svn:externals (google for tutorial) you can use the mirror available at http://svn.simon.geek.nz/silverstripe/ to link to modules + core.

    Once sourced controlled what is the preferred method of launching an update to server?

    So many ways to do this, if you want a simple tool google for "<your version control system> post commit deploy". That can set you up so when you 'commit' (or 'push' something in git) it will deploy to your server. Capistrano is quite a useful tool for managing deploys (https://github.com/capistrano/capistrano/wiki) but for simple sites a post commit (or post push) hook is good enough.

  • DsX
    Avatar
    Community Member
    178 Posts

    Re: taking a leap to Source Control Link to this post

    Again, thanks for the reply.
    I have been having trouble with this. I will give it another go soon, I know once its working for me I will be much happier with my environment.

  • markh
    Avatar
    Community Member
    1 Post

    Re: taking a leap to Source Control Link to this post

    Hi DsX, just wondering how you went with setting up your source control system. I'm looking at doing something similar - I want to develop on a number of different machines, all at different locations - and then be able to run test on a remote site.

    This looks like being a pretty tough problem...

    Thanks
    Mark

  • prawnstar
    Avatar
    Community Member
    116 Posts

    Re: taking a leap to Source Control Link to this post

    Hi, Mark,

    In short...my advice is to just use git. If you're not afraid to 'roll-your-own' all you need is a remote server with ssh capabilities and git installed.

    I'm working on 20 or so sites at any given time and like the original poster I was facing the same issues. With git I can create a repository on my remote server and access that repository from any location(as long as git is installed on the local machine).

    When I first set up git I had never worked with a versioning tool before. It took me a few days to research, and afternoon of installing git and setting up my environment on my remote server and a few weeks of learning the finer points of using git. That said, I'm not an expert at git. Really more of a novice that's learned a few tricks because I've had to.

    If that sounds like a hassle, just fork over a few bucks and get set up with a github account.

    Hope that helps,
    Chris.b

    1360 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.