Talk:Website Workflow

From FreekiWiki
Revision as of 10:26, 15 July 2009 by Tonyc (talk | contribs) (dumpin Aaron's workflow into discussion page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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.