# Using Roots 7.0 with Git deploy

**URL:** https://discourse.roots.io/t/using-roots-7-0-with-git-deploy/1871
**Category:** sage
**Created:** 2014-07-05T04:43:45Z
**Posts:** 6
**Showing post:** 5 of 6

## Post 5 by @shaimoom — 2014-08-07T21:21:42Z

I have been relentlessly practicing this new Git deploy workflow to demonstrate it at my upcoming talk at [WordCamp LAX](http://2014.la.wordcamp.org/session/developers-wearing-the-testing-hat/). This is what I have and please let me know if I am making any errors or being redundant. I am primarily a designer and front-end developer, so I am learning as I go along with a lot of these new technologies Roots has been adopting.

###Services/Software used

- Terminal
- [github.com](https://github.com/)
- [Github for Mac](https://mac.github.com/) (desktop GUI for git)
- [Sublime Text](http://www.sublimetext.com/)
- [MAMP](http://www.mamp.info/en/)
- [Deploy](https://www.deployhq.com/) (deployment from git repositories)

For the purposes of this example, I am renaming the theme as ‘demo’.

####Part I: Github setup

1. Create a repository at [github.com](http://github.com) named ‘demo’

- Clone Roots repository from [github.com](http://github.com) to desktop as ‘demo’
- Change local Roots clone settings as follows:
  - Change Primary remote repository (origin) to: [https://github.com/shaimoom/demo.git](https://github.com/shaimoom/demo.git) (from [github.com](http://github.com) repo)
  - Delete the following from Ignored files (.gitignore):
    - `assets/css/*main*.css`
    - `assets/js/*scripts*.js`
    - `assets/js/vendor/modernizr.min.js`
    - `assets/manifest.json`

- Sync the local and remote repositories (initial commit)

####Part II: Local Dev Setup, Install Dependencies & Grunt

1. Add `define('WP_ENV', 'development');` to the WordPress installation `wp-config.php`

- Right-click on the ‘demo’ repository in Github and select ‘Open in Terminal’
- Run `npm install` on theme root directory (vendor assets will be added to the theme)
- Run `grunt watch` on theme root directory in terminal to track changes
- Activate theme
- Customize theme

####Part III: Deployment

1. Remove `define('WP_ENV', 'development');` in the WordPress installation `wp-config.php`

- Run `grunt build` and commit in Github (minified assets will be generated for production)
- Add SSH & SFTP info to [Deploy](https://www.deployhq.com/) (including theme file path)
- Deploy from latest commit
- Activate theme on production site
- Win?

Repeat **Part II** and **Part III** during local development.

Your comments are appreciated.

---

_[View the full topic](https://discourse.roots.io/t/using-roots-7-0-with-git-deploy/1871)._
