Development using Roots

I think she’s assuming you don’t want to pull changes from the source repo. Starter themes like Roots and Bones assume you’ll copy the theme and go forward with no updates from the source repo.

If you’re willing to do a little work deciding what changes to apply, I don’t think there’s any reason you couldn’t set up something like GitHub/roots/roots -> your GitHub (or Bitbucket or etc.) roots -> local master repo -> local theme repo. The idea being, you’d separate the theme from GitHub with the local master. Use branches in the local master to make changes to push back to GitHub and the main Roots repo or to pull down to your theme or both. Fetch updates from GitHub into local master so your baseline is current and then decide which changes to pull to your theme based on changes you’ve made in the theme (might not want to update app.less, for example).

If you’re developing a theme a week, it probably doesn’t matter much because Roots won’t change much in a week. If you’re taking a more leisurely approach, getting updates may be more valuable.

Someone will probably tell me why this is a bad idea.

The part that has me really confused now is the plugins and how the work within the WordPress-Skeleton structure. Also, what if a plugin changes something in the WordPress submodule? $ git status will then report changes in files not tracked…

Maybe this thread is headed in the direction of needing its own topic?

Thanks, @cfx for posting this video series- looks really helpful. There is hope for me yet! :wink:

Do you know if it is possible to use GitHub and BitBucket? I love the Windows GUI for GitHub but I also love the fact you can have unlimited private repos with BitBucket.

@jayseventwo - Your post made me smile. So glad I am not alone in this.

I run a small web agency, but basically I am the main developer- so I don’t need to share the code with anyone else. That’s why I haven’t really seen the need to use Git. However, I’ve found it useful for commenting code and keeping a backup. Once I get my head round branches and undoing changes I think I will finally see its powers. I do love Grunt- it works really well for Roots. I will have to have a play with the Less extension for Dreamweaver. Quite why Adobe don’t support LESS as standard I don’t know. However, I really want to move away from Dreamweaver and use a code editor like SublimeText or NotePad++. The thing I would miss is inbuilt FTP which, like you, I use within Dreamweaver.

I do love the idea of git-ftp which I looked at. However I haven’t got a clue how to set it up. I am wondering whether this is where Capistrano comes in. If I could have a way to push to my dev, staging or production sites it would be awesome.

@MintyBear - great article, thanks. This looks really helpful. Like you, I am waiting to see what Capistrano might do, but there are some interesting ideas in the article. How do use Grunt to push to staging and production servers?

I am still uploading via FTP to my development server (i.e. not testing locally).

@iagdotme, not sure what you mean by “use GitHub and BitBucket”. But what I’ve done is exactly what she’s done in the video: I cloned a GitHub repo into BitBucket, then in my local environment I clone the BitBucket repo, so now when I make changes I push those back to BitBucket and everything stays private. Of course you can always push back to GitHub if you want to make a GitHub repo (which I’ve done). In fact, you can feel free to use my repo which includes Mark Jaquith’s WordPress Skeleton (with WordPress as a submodule); I’ve added Roots as a submodule to my repo: https://github.com/CFXd/WordPress-Skeleton-with-Roots

So you can just do:

git clone --recursive https://github.com/CFXd/WordPress-Skeleton-with-Roots.git .

and that will get you up and running with WP and Roots 6.5.0 or you can do what she does in the vid which is to clone/fork my GitHub repo into your Bitbucket to keep your repo private (recommended).

Not sure how frequently I will update this repo but for now everything is current!

@iagdotme, the latest version of Dreamweaver (CC) does actually support LESS, but does not compile. This is where that plugin helps, although probably not required for Dreamweaver CC if you have grunt doing the compiling for you.

I found an interesting tutorial on using Bitbucket that goes through the basics:

Also, i believe that git bash (the command line client for Git) works with Bitbucket, so perhaps Git for Windows also does (someone please correct me if i’m wrong, as i haven’t had a chance to try it yet).

This looks to be a good a good ftp plugin for Grunt as it does incremental uploads.

https://npmjs.org/package/grunt-ftpush

Any Git “client” will work fine with Bitbucket or any other Git repository host. It’s simply just adding a remote source. You can have a repo with both GitHub and Bitbucket as remotes as well. Good for redundancy in case one goes down (which has been happening frequently with GitHub lately).

This thread has gotten a bit out of control so I’m going to close it. People are encouraged to create new more specific threads about anything talked about in here. And remember that in Discourse you can still click “Reply as a new topic” from any reply.