Quick tip: How to delete a tag from a Git repository?

The ability to tag specific changes in commit history has become very important. Programmers use git tag  to mark the releases (aka versions) of their applications. That way they can specify a desired version in their dependency tools.

Sometimes we make a mistake; we are all humans after all. We tag a wrong change set, or we tag a version on a wrong branch, or we even tag a version of other component in a current working directory. It happened to me, and I’m confident that some of those things happened to you to.

I’m sure most of you are very familiar with Git and tagging, but if you are not you should check the Git documentation page. If you are just looking for the way to delete the wrongly marked tag, then here’s the quick tip for you; so you don’t have to search through extensive documentation page.

Removing a Tag on the local repository

Deleting a tag on the local Git repository is pretty straightforward:

You can easily remember it because it’s so declarative. We can read this command as: use  git tag  command to delete -d  tag with a name 1.15 .

That will delete only the tag on your local repository. If you have already pushed your tag to the remote repository (to the Github for example), then you should also remove a tag on the remote repository.

Removing a tag on the remote repository

To delete a tag on the remote repository, we just need to push information about deleted tag to the remote:

or just:

And that’s it.

How To Redirect www To non-www And Vice Versa with Nginx

In this short tutorial I’ll show you how to make permanent redirect from a www URL to non-www and vice versa. I’ll assume that you have superuser privileges, sudo  or root access and Nginx already configured, as well as DNS records. More specifically, you need to have an A records for www.yourdomain.com  and yourdomain.com .

Redirect non-www to www

To redirect users from a plain, non-www domain to a www domain, you need to add this snippet in your Nginx domain configuration file:

Save your configuration and exit. Before restarting Nginx make sure to test your configuration:

Continue reading How To Redirect www To non-www And Vice Versa with Nginx

Awesome Looking Terminal With Oh-My-Zsh

A lot of people asked me after reading my article A Brief Introduction to Laravel Envoy,  how do I get my terminal window to look so awesome. It’s not that hard as it may look like, I keep it simple. Here is what I use:

and of course Ubuntu GNU/Linux.

Continue reading Awesome Looking Terminal With Oh-My-Zsh

SSH Authentication With Keys Instead Passwords

SSH is a must have tool for every System administrator or DevOps Engineer. It provides you a secure way to access remote servers. But, if you use standard password authentication there is always a chance that someone will break into system due to weak password.  This potential risk increases if multiple users have SSH access to the server, because system administrator can’t influence to the users to make a better passwords.

Continue reading SSH Authentication With Keys Instead Passwords

Pro tip: Display all validation errors in Blade View

Every Blade View have $errors variable bounded to it unless you set different one by yourself. If you use controller based error handling, you will probably have something like this inside it:

We passed validation errors to the profile view using withErrors() method and inside that view you can display them: