Git beginner: Keeping track of on-server changes

So I’m starting to get to grips with Git (never used any VCS before). Some Git users tell me to only push to production server and never pull from it to my local dev server. That leaves me with this scenario.

I run WordPress 3.0 in a Multi Site environment. On the production server, I create a new blog (let’s call it no. 6) from the dashboard and need a custom theme for it.

Read More

I download the db from the live server and install it locally to have the latest plugin settings, blogs etc. I install the database, tweak all the urls to match localhost. But! the folder with the new blog will be missing from the wp-content folder because I’m not syncing that folder from liveserver to devserver.

Can i, with Git, checkout the most current repo from my live server to my local machine (or something like GitHub and then ) when I need to complete a task like this? Or am I looking at it the wrong way?

Related posts

Leave a Reply

2 comments

  1. Can i, with Git, checkout the most
    current repo from my live server to my
    local machine?

    No, unless you also add the wp-content folder under version control.

    You can instead look at other tools, such as rsync.

    As for the database, you could make the live server accept remote MySQL connections, so that you could work on it directly from your dev machine, although I don’t think that’s such a good idea.

  2. Your question is both too vague and too specific at the same time. The answer to the first part of your question is “Yes, it’s possible using Git, Subversion, Mercurial, DARCS, CVS, RCS, SCCS, SourceSafe, Perforce, or any number of other revision control systems”. The answer to your second is “most likely, no, you’re not looking at it incorrectly”.

    Can you be more specific in what you’re asking and, simultaneously, what would make you think it’s a bad idea?