ok - so if I clone my git respository on my prod server (so it's locale with the prod app in my case) then I would have to each time: step 1- commit changes (locally as my git repository is part of my working area) step 2 - get changes up to the remote server (assuming I'd cloned it to start with) - with "git pull" for this? (or would it be a "git push"?) step 3 - then run "cap deploy"
Q1 - Is this correct? Q2 - Does capistrano handle the 2nd task (i.e. the "git pull" or "git push" or whatever it is)? or is this always a manual step Q3 - What do people normally use to get their changes into the 'main' repository (or the one that capistrano uses anyway), i.e. "push" or "pull"? I see that pulling incorporates getting changes as well as merging them so I would guess it would make more sense to "pull" the changes from the remote, however this would imply step 2 would need to be done after ssh'ing into the remote server (i.e. would be good if capistrano handled this) thanks 2009/2/5 Lee Hambley <[email protected]> > It's using SSH, port 22 typically, although that can be set as part of the > URL. > Gitosis is something for people like Github to run to manage mass amounts > of reopsitories, or maybe you could use it locally - git, and SCM becomes > less than half as useful if it's only on *your* machine, where is the safety > net if your laptop gets stolen.. your code is all gone too! [?] > > - Lee > > 2009/2/5 Greg Hauptmann <[email protected]> > >> >> Hi Lee, >> >> I see a blog post that had a Cap config entry like: >> >> set :repository, "[email protected]:someuser/somegitrepository.git" >> >> which seemed to that capistrano at least is communicating to the >> repository over a network protocol. So given there is no Git server >> what would the network layer typically be? Like what protocol is >> Capistrano using when it communicates to the "github.com" address >> provided in the repository setting? >> >> Also I see Chapter 11 of "PragmaticVersionControl - with Git", is >> called "Running a Git Server with Gitosis". >> >> >> >> Regards >> >> >> 2009/2/5 Lee Hambley <[email protected]>: >> > There's no such thing as a "git server" -- and your web/db/app server >> needs >> > access to your repository. >> > To work like this, You'll need to use the "copy" strategy, which just >> > uploads a copy of the code to the server, or you may be able to tell >> your >> > server how to reach your laptop, but that is asking for trouble with NAT >> & >> > Firewalls. >> > My suggestion would be to buy a cheap, personal plan on something like >> > Github (or try one of the free providers) and experiment that way. >> > - Lee >> > >> > 2009/2/5 Greg Hauptmann <[email protected]> >> >> >> >> [ I'm up & running Git on my local dev Macbook :) ] >> >> >> >> Quick followup question - What's the simplest way for a hobbyist like >> >> myself to get capistrano deployment happening by Git? >> >> >> >> That is, whilst I have a local file Git repository on my Macbook, and >> >> noting that my target production server (so to speak) is a standalone >> >> Redhat linux box that I have, as the capistrano deploy code runs (on >> >> the prod server I believe) it will need to talk to a Git server via a >> >> network like address (e.g. >> >> [email protected]:someuser/somegitrepository.git) I assume. So assuming >> >> there's no hidden Git process/server running on my macbook right now >> >> (a ps ax | grep git, doesn't reveal anything), what's the easiest way >> >> to get setup up? >> >> >> >> I assume the options may include the following? >> >> (a) install Git server on my local Macbook (which one?) >> >> (b) install Git server on my target Redhat prod box >> >> (c) just have a copy of the repository on my target Redhat server >> >> (i.e. file based) and reference this directly as this is where the >> >> capistrano scripts would be running from (not sure this is possible?) >> >> >> >> Also what sort of server is required? (it's a given I need to set one >> >> up myself within my network). I see mention of Gitosis? Can I just >> >> front my existing working directory repository with a web server for >> >> http access (or is there a specific Git server that is required)? >> >> >> >> thanks >> >> >> >> >> >> 2009/1/30 David Masover <[email protected]>: >> >> > >> >> > >> >> > On Wed, Jan 28, 2009 at 8:43 PM, Greg Hauptmann >> >> > <[email protected]> wrote: >> >> >> >> >> >> thanks - Can I ask if it easy enough to set up my own central GitHub >> >> >> server? (like I do wiht svn) >> >> > >> >> > Yes. Very much so. >> >> > >> >> >> c) source backup <== which I'm talking about here >> >> > >> >> > I don't worry about that. >> >> > >> >> > The main property you have to remember is that EVERY checkout of Git >> is >> >> > a >> >> > full repository. >> >> > >> >> > At least one, probably several, of the Capistrano strategies using >> Git >> >> > will >> >> > leave a checkout on the server -- at least one. >> >> > >> >> > That means you have a remote repository, in that sense -- you can >> always >> >> > pull the latest deployed code from your webserver. Probably not a >> best >> >> > practice, but trivially easy. >> >> > >> >> > Or, just set up another user account, and push there. It's about two >> >> > commands to do that. >> >> > >> >> > Backup, well, if you do either of the above, you will always have at >> >> > least >> >> > two full copies -- the server, and your checkout. >> >> > >> >> > There's also always Github, though I'm not sure what the value is for >> a >> >> > one-man, private project. If it's open source, though, it's a great >> way >> >> > to >> >> > lower the barrier of entry -- one click for anyone with a Github >> account >> >> > to >> >> > fork it and start hacking. >> >> > >> >> > > >> >> > >> >> >> >> >> >> >> >> -- >> >> Greg >> >> http://blog.gregnet.org/ >> >> >> >> >> > >> > >> > > >> > >> >> >> >> -- >> Greg >> http://blog.gregnet.org/ >> >> >> > > > > -- Greg http://blog.gregnet.org/ --~--~---------~--~----~------------~-------~--~----~ To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/capistrano -~----------~----~----~----~------~----~------~--~---
<<inline: 33F.gif>>
