[Klug-general] rsync woes, or, version control for web-developers?
James Morris
jwm.art.net at gmail.com
Sun Nov 13 17:27:39 UTC 2011
Hi Karl, Mike,
It's for my own personal site which is running my own PHP scripts
which I've developed over the last 5 years while learning PHP.
My preconception of version control had me thinking it required things
which aren't available on shared hosting with shell accounts. I'd
simply not realised I could do it through SSH (and the same for
RSYNC).
The link I gave earlier:
http://joemaller.com/990/a-web-focused-git-workflow/
I'm finding quite nice to use. I no longer need to do things like:
scp code.php user at example.com:some/directory/where/live/stuff/goes/
I just need to be in the top-level directory under control of git and
git add . -v
git commit -m 'short description of updates'
git push
Which is exactly what I thought wasn't possible, and once setup, its
very very easy. And, if I do live edits on the server I just follow
the same procedure as above and then on my dev machine, just:
git pull
I'm very pleased with this way of doing things.
I've got a lot of binary data (images and audio) on my site, which I
mistakenly included in the git repo (I interrupted the process as it
was taking too long). Now I've adding the relevant dirs into the
.gitignore file.
I'm just wondering though, is there a way for git to have basic
control of these files, ie, in a basic Makefile kind of way, as in,
transfer if missing or modified?
James.
On 12 November 2011 22:30, Mike Evans <mike at tandem.f9.co.uk> wrote:
> I'd agree with what Karl said for trivial projects - and it's what I do at
> home for little scripts and the like. However for anything other than
> programs of a page or so of code I thoroughly recommend version control.
> Which one you use on a single machine is pretty arbitrary. I tend to use
> svn because I'm used to it - but git should work just as well. This then
> solves the problem of "Oh bugger I seem to have messed it up about three
> weeks ago! Hmm, now what changes did I make three weeks ago exactly?" I
> surprise and embarrass myself with how frequently that happens.
>
> Mike
More information about the Kent
mailing list