Reset File Changes with git
There are many different philosophies when it comes to code review but mine is fairly simple: I like receiving early "work in progress" patches, I like to be positive in my code review messages, and if a patch is 90% there, I like to finish the patch myself so the project and contributor both benefit.
Every once in while, however, a patch comes in with an unrelated file change or code added to the wrong file, in which case I need to reset a file's contents before the change commit. You can restore a file's contents before a patch with the following:
git reset origin/master path/to/file-to-be-changed.ext
Once this shell snippet is executed, the file's contents are restored and can be re-commited to restore the file contents.
I spent a few months experimenting with different approaches for writing simple, elegant and maintainable media queries with Sass. Each solution had something that I really liked, but I couldn't find one that covered everything I needed to do, so I ventured into creating my...
It's no secret that Facebook has become a major traffic driver for all types of websites. Nowadays even large corporations steer consumers toward their Facebook pages instead of the corporate websites directly. And of course there are Facebook "Like" and "Recommend" widgets on every website. One...
The idea of Spyjax is nothing new. In pasts posts I've covered how you can spy on your user's history with both MooTools and jQuery. Today we'll cover how to check user history using the Dojo Toolkit.
The HTML
For the sake of this...
Wouldn’t
achieve the same?
Not if the change was already committed!