Checkout the Previous Branch with git
Command line shortcuts are can be a huge time saver, which is why I like creating bash aliases and and enjoy other tricks I've found. I do have a list of tasks I don't yet have a shortcut for, like easy switching between my current branch and the previous branch. I have to do this often when I update master via remote pull and then rebasing a feature branch, and since many of my branch names include a hard to remember bug number, switching between branches is a pain.
I recently found out that you can switch the the previous branch you were on using the following command:
git checkout master
# Do whatever
git pull remote master
# Go back to the previous branch
git checkout -
Using -
references the previous branch name, thus allowing you to navigate branches with ease!
![Send Text Messages with PHP]()
Kids these days, I tell ya. All they care about is the technology. The video games. The bottled water. Oh, and the texting, always the texting. Back in my day, all we had was...OK, I had all of these things too. But I still don't get...
![Introducing MooTools Templated]()
One major problem with creating UI components with the MooTools JavaScript framework is that there isn't a great way of allowing customization of template and ease of node creation. As of today, there are two ways of creating:
new Element Madness
The first way to create UI-driven...
![MooTools: Set Style Per Media]()
I'd bet one of the most used MooTools methods is the setStyle()
method, which allows you to set CSS style declarations for an element. One of the limitations of MooTools' setStyle()
method is that it sets the specific style for all medias.
![Duplicate DeSandro’s CSS Effect]()
I recently stumbled upon David DeSandro's website when I saw a tweet stating that someone had stolen/hotlinked his website design and code, and he decided to do the only logical thing to retaliate: use some simple JavaScript goodness to inject unicorns into their page.
Like in the terminal:
To return to the previously visited directory.
Also useful when you want to merge the branch that you were just working on into dev/master (or any branch really)