Embrace the Command Line

The command line is an intimidating and scary place for a lot of WordPress developers. That is a big shame, since embracing the command line is one of the best things I think you can do for your development career. You will be a lot faster and have some much better tools available if you stick with the command line instead of always relying on a GUI. As an aside, in order to be really effective with Git, you only need about 4-5 commands on a day-to-day basis.


In this video, I wanted to talk about the command line. Because in my opinion, if you want to work successfully and effectively with Git, you need to be comfortable with command line. There's no way around it.

I know there are a lot of GUIs out there but if you don't know how to use the command line you probably don't really understand how Git works and you can end up in some pretty messy situations that you have no other way of working yourself out of than to go to the command line and type in commands that you don't really understand. So it's really important that you take the time to get comfortable with the command line and your life as a developer using Git is going to be a lot easier.

If we type in Git here in the command line you can see that there's a bunch of different commands that we can use and some of them you're going to use pretty frequently and that's why it's pretty helpful if you set up a few aliases. You can see like instead of typing git status, I can just type git st and then it's the same command because I made an alias.

It's pretty easy to set up an alias. Here I have the Git community book and in the chapter about aliases, you can see here how it works. So if I want to set up an alias for commit, I just need to type in this. So “git config global” (so we don't have to do it every time we're in a new git repository) “alias” and then I want “ci” to map to commit. So now if I type git ci, it's the same as typing commit. There's nothing to commit right now so that's why nothing really happens.

Set up a Git alias

Another thing about the command line is that you should get a proper shell. If you're on a Mac, there's a default app called Terminal and it's pretty bad so what you want to do is you want to find iTerm, and if you just Google it you can find it there. It's really awesome and once you've installed iTerm, you probably want to install zshell and once you've installed zshell you probably want to install oh-my-zshell. That's if you're on a Mac. I don't really know much about the best command line apps on Windows. You can probably Google that. It's really important that you have a nice shell environment, so you actually want to use the command line and the default terminal app for Mac is not very good.

There is a course by Wes Bos and I think it's called Terminal Power User. Command Line Power user, sorry. Maybe you should check it out as well. So, that's it for this video. Use the command line and set up a few aliases.

All Lessons

Level up with WP Pusher

Take the pain out of WordPress development. Manage your code with Git and never again deploy files over FTP.

When I came across WP Pusher, I knew I had found the answer and it's now a vital part of our workflow!

Ashley Hart, Green Chilli
GitHub user, runs his local WordPress agency with WP Pusher

WP Pusher makes deploying changes to our websites quick and easy. We could not manage without it.

Simon Appleby, Bookswarm
Bitbucket user, manages 100+ WordPress sites with WP Pusher