Category Archives: Git

“Essential” Sublime Text 3 Plugins

Everyone likes to publish their favorite or “essential” Sublime Text plugins, so I’m joining the party.

These are all Sublime Text 3-compatible plugins. I have a number of other plugins installed, but these are the only ones that I would immediately miss if I did a fresh install of ST3 (along with the Ubuntu Mono font).

  1. Alignment
    Makes your code like pretty and more readable by lining up selections based on “=” “=>”, etc. Great for arrays.
  2. GitGutter
    Unobtrusive display of uncommitted changes in the gutter (next to line numbers).
  3. Trailing Spaces
    Highlights and trims unused whitespace at the end of lines.
  4. SideBarEnhancements
    Gives you way more options for dealing with files in the sidebar. I just wish I could figure out how to delete a file with shift+delete.
  5. SublimeLinter
    Highlights errors in your code as you type.
  6. Laravel Blade Highlighter
    Provides color-coding for Laravel’s blade templates.

I’ve really wanted to like other editors, and there appears to be a big push toward PHPStorm in the Laravel community right now, but ST3 is just too fast, too pretty, and too customizable for me to change.

2014-02-22 at 11.22 AM

My “toolbox” re-visited

Every developer’s toolbox changes and evolves over time, even the old Reluctant Developer’s. In fact, I go through periods where I spend way too much time trying to find the next app that’s going to get me over the hump from hack to rock star. I haven’t found it yet because it doesn’t exist, but it’s still interesting exchanging some of the tools in the toolbox now and then, and sometimes finding that app that really makes a difference in one’s workflow.

So here’s a list of what I’m using now, along with a brief (sometimes very brief) explanation of “why”:

Continue reading

Using Git to display your web app’s version

I’m mainly writing this down for my own benefit, but others might find this useful. In a previous post about setting up git to deploy to a remote web server, I wrote about a way to display the lastest abbreviated commit hash in your web app’s footer.

Today, I discovered that simply running:

git describe

will output the most recent tag and the current abbreviated commit hash (if there are commits after the tag), so you can use tags to show more human-readable versions of your app (v1.0, etc.) along with the current commit. Unfortunately, you apparently can’t run ‘git describe’ on a bare git repository like what I’m using for deployment on the remote server.

Continue reading

Git deployment & WordPress

As I rely more and more for Git to deploy changes to web apps (see here and here), the thought of going back to FTP induces shutters (OK, that’s an overstatement). Now I’m working on a WordPress site with a purchased theme that requires some customization. I don’t see any reason to store the core WordPress files in a repository, or the plugins folder for that matter (unless I’m writing my own, and I’m not), so I only want to version control and deploy the theme I’m making customizations to.

Gitignore to the rescue.

I found this great .gitnore file on Github that is working perfectly: https://gist.github.com/jdbartlett/444295

Hostgator and Git

I previously posted about using git to deploy to Ubuntu. However, that’s only relevant to me for my  ”day job” where I can have some control over my server environment. For other work, I currently host a number of sites on Hostgator. I’ve fallen in love with the simplicity and power of deploying sites using Git (after the initial setup), so using Git in a shared hosting environment would be a huge win.

Luckily, I found a few resources out there on how to set this up, but in the end, the only real difference between my workflow for Ubuntu and hostgators turns out to be saving the Hosgator SSH port (2222) in a ~/.ssh/config file as described here.

Notes:

  1. You must have SSH access on the domain you are working with. I believe it comes with your primary domain, and you have to pay $2(?) a month for SSH access per domain beyond that.
  2. It’s easier if you use the SSH public keys as described here.
  3. You can just create your bare Git repositories under /home/[username]/git if you want to set it up as I described in my previous post.