Get the Git Commit ID via Command Line
I know just enough git to be dangerous. I'm not doing advanced bisecting but I can stash, rebase, and reset with the best of them. One new trick I learned from my boss, Luke Crouch, saves me loads of time: getting the commit ID via command line. For years I would merge a PR, go the project's main page, and copy the commit ID so that I could push code to staging and production. Always seemed like an extra step rather than just making it happen from the terminal. Here's the magical command:
git rev-parse HEAD
Of course you need to update your local repo to remote master, but you do that anyway, right? Hopefully this will become a timesaver the same way it has for me!
![Interview with a Pornhub Web Developer]()
Regardless of your stance on pornography, it would be impossible to deny the massive impact the adult website industry has had on pushing the web forward. From pushing the browser's video limits to pushing ads through WebSocket so ad blockers don't detect them, you have...
![CSS Filters]()
CSS filter support recently landed within WebKit nightlies. CSS filters provide a method for modifying the rendering of a basic DOM element, image, or video. CSS filters allow for blurring, warping, and modifying the color intensity of elements. Let's have...
![Background Animations Using MooTools]()
One of the sweet effects made easy by JavaScript frameworks like MooTools and jQuery is animation. I ran across this great jQuery tutorial that walks you through animating a background image of a page. Here's a quick MooTools code snippet that...
![MooTools CountDown Plugin]()
There are numerous websites around the internet, RapidShare for example, that make you wait an allotted amount of time before presenting you with your reward. Using MooTools, I've created a CountDown plugin that allows you to easily implement a similar system.
The MooTools JavaScript
The CountDown class...
On Mac, you should try this, it will copy the commit ID to your clipboard:
Also you can use short version of git hash:
I miss working a Mac, but Windows is working out just great too.
To shorten things further, you can use @ as an abbreviation of HEAD.
Here’s npm package if you need it in JS: https://github.com/sheerun/git-commit-id