How to rename a tag in Git

Well, first of — you can’t. You have to map a new tag to the old one then delete the old tag. Let’s assume we currently have a tag called “old_tag” and we want to replace it with a tag named “new_tag”.

To link the new tag to the old one:

[code lang=”bash”]git tag new_tag old_tag[/code]

This creates a new_tag that references the commit made by old_tag.

Now we need know how to delete the old tag in Git.

[code lang=”bash”]git tag -d old_tag[/code]

Bye old_tag. Now the thing about git is it doesn’t let you delete the tag on the remote server just as a precaution. Now you can’t do something like “git push –tags origin master” to delete the tag from the remote server.

Here’s how to do it:

[code lang=”bash”]git push origin :refs/tags/old_tag[/code]

You need to explicitly state that you want that reference updated. This will delete the tag in the remote server.

6,081 visits last month, thanks!

Search engines sent 67.95% of the visitors. Asides search engines, most of the visitors come from Twitter,, Facebook and Stackoverflow.

Firefox is a favorite browser with 60%. Chrome visits constitutes 5% which I am responsible for at least half of Chrome visits I presume.

The top searches are XAMPP, jQuery, Django and PostgreSQL related. I code using CakePHP but no one reads my CakePHP stuff. My top tags are NetBeans, XAMPP and Sex, the combination upsets me.

Top countries visiting are US, UK, Singapore, India and Canada. I had a visitor from Zimbabwe, I didn’t know they can afford computers. Zimbabwe, a victim of hyper inflation, announced last February the removal of 12 zeroes from the currency, i.e. 1,000,000,000,000 Zimbabwe dollars being exchanged for 1 new dollar.

Alright, before I go offtrack, kthxbai.

How book publishing can modernize

“As far as I’ve been able to tell, there are no buttons that say mobile devices are sexy. But that’s the challenge. Make a device that makes us look smarter and more attractive than we actually are, just like books do,” says Michael Tamblyn, the C.E.O. of BookNet Canada. Tamblyn discusses on 6 ways technology of book publishing could evolve.

[via The New Yorker]

I think this may very well come true.

How to lowercase all tags in WordPress

Don’t know if any one would find this useful. I didn’t like cased tags and I just decide that lowercase is the way to go. I know you can do it with CSS but that’s not the result I want.

[code lang=”sql”]UPDATE wp_terms SET name=LOWER(name);[/code]

I had many tags are some are in capitals, some are in small letters, it looks really messy from my admin panel so I decided to clean of every thing. Continue reading “How to lowercase all tags in WordPress”