fixing update_head in gitlab_projects for issue#5408 (at gitlabhq/gitlabhq)

Please have a look at discussion this issue https://github.com/gitlabhq/gitlabhq/issues/5408 in **gitlabhq/gitlabhq**.

Although this fix is enough for the part which gitlab_shell is doing, but after changing the default branch in project settings if you directly goto **Files** or **Commits**, the selected branch in dropdown is still the old one. So if you goto project home once and come back to **Files** or **Commits** then selected branch in dropdown is updated to default one. And I think this has to do something with updating project model about the default_branch.

Here Line#169..172 might be unnecessary, these lines just check if this command executes successfully. And then actually checks the output of **git show-ref** if it is empty or not.

My apologies in advance if there is some mistake, as I never programmed/touched ruby before and these few lines are my first attempt.