Difference between revisions of "Talk:Website Workflow"
(dump part 2) |
|||
Line 17: | Line 17: | ||
git clone http://fgdev.chasing-daylight.com/fg.git | git clone http://fgdev.chasing-daylight.com/fg.git | ||
− | This will create a dir called fg, and inside will be the site! All nice and imported for you. Now that you’ve got your own local copy, you’ll have to change wp-config.php to point to your database. Right at the top of the file will be: | + | This will create a dir called fg, and inside will be the site! All nice and imported for you. Now that you’ve got your own local copy, you’ll have to change wp-config.php to point to your database. (need instructions on grabbing current db and what software needed to run it[[User:Tonyc|Tonyc]] 19:56, 27 July 2009 (UTC)) Right at the top of the file will be: |
// * MySQL settings * // | // * MySQL settings * // |
Latest revision as of 11:56, 27 July 2009
Dumped this over from clockingit for grins, and to play with formattingTonyc 17:30, 15 July 2009 (UTC)
Aaron's braindump session 1
So I’ll be putting this up on the FG Wiki soon, just want to get it hashed out here.
You can get ±Git binaries from here: http://git-scm.com/download. or you can “sudo apt-get git” on linux, but that gives you an older version than the newest stable release. (It seems like these older versions of git don’t have curl included in them, so you’ll have to install curl separately if you do it this way. “sudo apt-get install curl”)
I’m making an assumption that you have something like XAMPP, or some other apache/mysql situation set up on your box. I’ll continue to put updated .sql dumps from the dev site in the Files section of clockingIT, so you can download the newest one, and import it to your mysql using phpMyAdmin, or similar tools. Then you need to grab the current site:
Now you’ve got Git installed, and you’re ready to grab from the site repo. Open a terminal, and change directories to your server’s public html directory, i.e. cd var/www
Now that you’re ready, just,
git clone http://fgdev.chasing-daylight.com/fg.git
This will create a dir called fg, and inside will be the site! All nice and imported for you. Now that you’ve got your own local copy, you’ll have to change wp-config.php to point to your database. (need instructions on grabbing current db and what software needed to run itTonyc 19:56, 27 July 2009 (UTC)) Right at the top of the file will be:
// * MySQL settings * // define(‘WP_CACHE’, true); //Added by WP-Cache Manager define(‘DB_NAME’, ‘aryn82_fgeek’); // The name of the database define(‘DB_USER’, ‘aryn82’); // Your MySQL username define(‘DB_PASSWORD’, ‘FK7}>:kX’); // …and password define(‘DB_HOST’, ‘localhost’); // 99% chance you won’t need to change this value define(‘DB_CHARSET’, ‘utf8’); define(‘DB_COLLATE’, ’’);
you need to change DB_USER to your username for your database, and DB_PASSWORD to your password. DB_HOST should most likely stay the same. You may have to change DB_NAME if you named your database differently.
You should have a working local version of the site now! Great!
Brain dump part 2
Free Geek / WordPress Improvements / Site and Git Workflow ideas [Aaron Amstutz] So here's how my personal workflow looks:
Wake up, grab a cup of coffee, and wake up the computer from sleep mode. (Hehe, just kidding, no really.)
Open the terminal and cd into the directory of the project I'm working on that is using Git.
git pull
to update my local copy in case other developers made changes since I last worked on it. This may take a minute depending on the amount of changes that have happened. Once my local copy is all up to date, I decide what I'm gonna work on, and start in on it.
Lets have a theoretical situation here. I decide that I want to change a few relatively small things in the CSS on the FG site. So, I start in on the first part of that. I get the first part working in a way that I like, so, I commit my changes. I commit alot, that way even if I don't want to revert those changes, I have a log of my progress through the changes. First I run a status check to see what files I've changed:
git status
This tells me that I messed with style.css, and changed a couple images. It looks something like:
# On branch master # Untracked files: # (use "git add <file>..." to include in what will be committed) # # ../cache/meta/wp-cache-39537cda51b97eb62cba66e4ac696932.meta # ../cache/wp-cache-39537cda51b97eb62cba66e4ac696932.html
Cool. Since I've added new bytes to the project, and erased a few, I have to:
git add .
This adds everything, so now anything I added is being tracked by git. Cool. So now I commit:
git commit -m "I changed some specific things in style.css, including the theoretical color of the text in exactly this section of the site. I also edited image a, b, and c to work with this css."
-m is the tag for 'there will be a commit message following this' and the message has to be in quotes. Git will run through the commit process real quick, and tell you that it has added and committed the changes. Great! So every little bit, while I'm working, I commit my changes. When I've finished the section of the project I'm working on, such as a Task from ClockingIT, I make a final commit, and then push to the main repo.
I think the best way for us to work, is for you to use patches, which you can email to me. The reason for this, is the git repo is on an http server, and if I let you push, I have to give everyone ssh access. I think this would be yet another complicated thing for alot of people to learn, and maybe we should just move in smaller steps for now.
So to create a patch for each of your commits, simply run:
git format-patch origin
This makes a file with .patch extension for each of your commits, then just email them over and I'll merge them asap. aaron.amstutz@gmail.com
I'll also add to this as you all ask questions, so hopefully its a living useful document. Cool.