Upload
ruthie-bendor
View
858
Download
1
Tags:
Embed Size (px)
DESCRIPTION
Why and how to use version control with an ExpressionEngine website. Version control is essential to good development practices, but setting it up with a database-driven website can be tricky.
Citation preview
VersionEEringWhy and how to use versioncontrol with ExpressionEngine.
What is version control?
What is version control?A program that tracks changes to files and folders for you.
Also goes by these names.Source Control Manager (SCM)Revision Control System (RCS)Version Control System (VCS)That-Thing-That-Just-Saved-My-Ass
Different flavors?Yup. Each has its own way of tracking your changes. Here are a few:
CVS - SVN - Git - Mercurial - Bazaar Darcs - Perforce - Fossil - BitKeeper
http://en.wikipedia.org/wiki/List_of_revision_control_software
What kinds of files?Text! But also:
GraphicsBinaryWHATEVER YOU WANT.
Why use version control?
Because this sucks.
Because this sucks.
Because this really, really sucks.
How to get started.No servers, nothing fancy -this is all local, baby. So no excuses.
1. Pick a system.We’re going with Git.
2. Install it on your computer.http://git-scm.com/download
$ cd ~/Sites/myproject$ git init$ git add .
$ git commit -‐m "Initial commit."
Change to the project folder.Initialize the repository.Add everything in the project folder to the repository.Make your first commit.
3. Set up a repository for your existing project.
4. Make some changes, and commit them.
$ git status$ git add index.html$ git status
$ git commit -‐m "Added homepage."
Tell me what’s changed. (New file!)Add the new file to the repository.Tell me what’s changed. (Just making sure we didn’t miss anything.)Commit the change.
5. Rinse and repeat until you’re ready to share.
A Basic WorkflowOne way to use version control in practice, with actual live websites.
1. Define your environments.
Some popular ones:
- Local- Development (overkill for team of one)- Staging (can be same as Development)- Live
Workflow show ‘n tell
Git and EE, sitting in a tree.
Gotcha #1:Paths.Let’s play with settings!
1. Make all paths in the Control Panel relative.EE1: Admin > System Preferences > General Configuration
EE2: Admin > General Configuration
Don’t forget uploaded files and generated images.EE1:Admin > System Preferences > Captcha Preferences(Each upload destination) Admin >Channel Administration > File Upload Preferences(Each channel) Admin > Channel Administration > Channel Management > Edit Channel Preferences
EE2: Admin > Content Administration > File Upload Preferences
Gotcha #2:Environment variables.Let’s play with config files!
Gotcha #3:User-generated files.Keeping filesystems in sync.
Gotcha #4:Databases.Pick your poison.
Further ResourcesNew to version control? Check out Version Control for Designers: http://hoth.entp.com/output/git_for_designers.html
Not new to version control, but new to Git? Check out Git Reference: http://gitref.org/
More on the topic of Git and EE:
http://gititon.masugadesign.com/ <-- A++ WOULD RECOMMEND
http://j.mp/ee2multiserver