Install WordPress From Mac Os X terminal bash/shell/terminal profile function

Sometimes staying on top of the latest version of WordPress can be quite annoying when your testing things locally or rolling out regular wordpress sites. I normally install with .svn but this is a neat little bash script function I threw together to grab the latest version of WordPress and unzip into the current directory through Mac OS X Terminal command.

Open up your

vim ~/.bash_profile

and paste the following code into it.

wp-install(){
	wget http://wordpress.org/latest.tar.gz;
 	tar xfz latest.tar.gz;
	mv wordpress/* ./;
	rmdir ./wordpress/;
	rm -f latest.tar.gz;
}

Now quit and re-open terminal or type ./profile for the changes to take effect.

CD into the desired directory and type wp-install and let magic behold you, you’ll shortly have the latest version of WordPress downloaded and installed.

Checking out remote branch in Git

Simply blogging this for future reference and in the hope it will be useful for someone else.

To checkout a remote branch into your local use the following commands.

git clone myrepo@git.example.com
git branch -r

Will show you all the remote branches pick the one you like…

For instance for me it would be origin/dave.

Run the following command.

git checkout --track origin/dave