Cloning a remote branch using Git

Posted by – January 11, 2010

This is here more as a future note to myself, but hopefully someone out there will find this useful.

Essentially, imagine this:  You have a remote repository (say, on GitHub), and that repo has many branches.  You clone the repo and end up with the master branch in your local dev environment.  Now what happens if you want to use one of the other branches in the repo?

Well, initially, you’d think you would create the branch locally, and pull the differences down:

git branch production
git checkout production
git pull origin production

but what if master is ahead of production (a likely scenario)?  In this case this won’t work as your local production branch will now contain the changes in the master branch – as that’s where you originated production from on your machine.

What you need to do is:

git checkout -b <local_name_for_branch> <remote_source>/<remote_branch>

e.g

git checkout -b production origin/production

What this does is create a tracking branch.  Tracking branches are local branches that have a direct relationship to a remote branch. If you’re on a tracking branch and type git push, Git automatically knows which server and branch to push to. Also, running git pull while on one of these branches fetches all the remote references and then automatically merges in the corresponding remote branch.

links for 2010-01-08

Posted by – January 8, 2010

links for 2010-01-05

Posted by – January 5, 2010

links for 2010-01-04

Posted by – January 4, 2010

links for 2009-12-23

Posted by – December 23, 2009

  • jQuery Rich Text Editor

Measuring your SEO services

Posted by – December 23, 2009

Following on from last weeks post about how SEO people should be trying to perform, I had a thought about something that appears to be common across nearly all SEO companies I have worked with in the past, and how wrong it is.

Picture this, you have a website, and an SEO monkey putting some stuff together for you on a monthly basis to report how well you’re doing.  From my experience, most companies seem to want to issue you with some form of keyword rankings report…

Oh, lookie here sir, we’ve now got you to the number one spot on Google for the term “web design company horsham bob mitchell cheap”!  We’re going to make you millionaires!”

Hang on a second there chummie.  This is all very well if I have all of my customers searching for terms that are very specific to my business, but they aren’t, they’re searching for all sorts of things.

In fact, as a website owner, I do not give a fuck what my users are searching for, I only care that they are coming to my site, and doing things which generate me income/profile/whatever the point of having the website in the first place is.

SEO people should be reporting on their work with analytics and conversion rates, not how great you are at appearing on terms that no-one gives a toss about.

Search engine optimisation is not a black art that’s only doable by some sort of SEO wizard – it’s a measurable level of marketing that will return you measurable results.

links for 2009-12-18

Posted by – December 18, 2009

links for 2009-12-16

Posted by – December 16, 2009

links for 2009-12-15

Posted by – December 15, 2009

Why Search Engine Optimizers have the wrong idea…

Posted by – December 14, 2009

These days, it’s impossible to move more than about 20 feet before you get someone trying to sell you some search engine optimisation services of some kind or another.  Funnily enough they do this via direct selling rather letting you find them on Google, but generally speaking they make the same promises:

  1. They’ll get you to the fabled number one slot on Google
  2. They’ll double your traffic

However, they never tend to promise the one thing that you, as a website owner, really want … return on investment.

For instance, let’s say you’re paying a SEO “Expert” to help with your site.  What would you like to see?  10 million hits a day?  The number 1 slot on Google?  More income?

Exactly, whilst traffic is nice from a vanity point of view, it ultimately costs you money in bandwidth and beefier servers.  Only sales conversions generate you true income and I believe this is how all SEO experts should be measured.

Which would you prefer:  10,000 customers who never buy anything, or five who do?

Over time I would like to see SEO Experts moving to charging on a results based model, i.e. the more money you make you via your website, the more they get paid.  If they don’t increase your ROI (i.e do their work properly), they don’t get paid – simple.