Now I saw your later post. In my opinion VirtualBox is wrong way to learn OS. Because it enable you to switch between OSs whenever āhard timesā comes, when you dont know how to do something. If you want to learn faster stick to one OS and found your way. And, may the force (of internet) be with you.
Iām still in the cowboy coding camp unfortunately, but Iāve been taking my time and reading up on git for the past few weeks. Iāve found the greatest difficulty in establishing a workflow model that works for me, since Iām nearly always the only coder on my projects.
I actually came across what looks to be a really great playlist on Youtube: http://www.youtube.com/playlist?list=PLmw3IgYjTuTZazmvA0RcLaeHh-ykTEEzr for a WordPress + git + Bitbucket workflow. Iām still working through it and trying to fully understand each step before weaving Roots and Grunt into the mix but it looks promising and itās a very nice introduction to DVCS and WP.
Enjoy!
I canāt comment on the quality of those videos but going from the titles it looks like a great introduction. Learning proper development practices will definitely be worthwhile. Cowboy coding can be fun at times but sooner or later it will catch up with you.
Agree with @ctx. Watch same playlist and must say that help me, more then some others. Maybe its women ātouchā.
Iām following the videos and finding them useful.
When she gets to video 5 and clones the theme repo, then deletes the .git folder and .gitignore, DO NOT delete .gitignore. If you do, youāll be keeping the node_modules directory in your repo, adds 1800 files to the repo that are only for development tools. Lesson learned. @_@
Iām actually not sure why she deletes any of the git files. Wonāt those come in handy when it comes time to upgrade the theme? Confusedā¦
@iagdotme, iām glad you brought this topic up, as i too am currently trying to improve my workflow (also using Dreamweaver using code view). I am a lone freelancer, so up until this point didnāt really see the need for Git etc, as i am the only one dealing with the code. When the new Roots website came online, i started looking into Git, Grunt, etc and have already improved my workflow:
Created a local roots repository
learned a few git commands on how to copy and rename to my current project (usually the website name)
use grunt watch to compile my code on save
I use the following Dreamweaver extension to utilise LESS - http://www.dmxzone.com/go/21528/dmxzone-less-css-compiler
I too currently use Dreamweaver to push to ftp, but am investigating better ways to do this, such as has been mentioned in the above posts. I would be interested to hear how you go, and i will also update as i learn new ways of doing things.
I did think of using git-ftp (https://github.com/git-ftp/git-ftp), but it looks to be a bit of a pain on windows and i still need to incorporate version control.
@cfx, thanks for the video links- am going through them now. I like that Bitbucket has free private repositories, as that was what concerned me about git.
Iāve used git-ftp for deployment, itās pretty good. But more recently Iāve moved to using grunt as it does staging and production servers really nicely.
Instructions in the bottom of this post: http://mattbanks.me/grunt-wordpress-development-deployments/
Iām interested in seeing what capistrano can do though.
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!
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.
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.