Getting The Most Out Of Git
Not a single project today will get away without some sort of version control with Git under the hood. Knowing Git well helps you become a better developer, boost your developer’s workflow and truly improve the quality of your code base. However, that requires going a little bit outside of the comfort zone that we are all familiar with. As it turns out, there is a bit more to Git than just commit, push and pull.
Some developers stay true to the main principles in Git, and often that’s absolutely understandable. In the front-end world of ours, there are just so many sophisticated things to understand and get better at, that frankly Git is often not a high priority. As a side effect, many of the valuable techniques that can boost a developer’s workflow remain unnoticed and rarely discovered.
In this article, we’ll explore four advanced Git tools, and hopefully, whet your appetite to learn even more about Git!
Recovering Deleted Commits
You’re convinced that you’ve programmed yourself into a dead end because your last two commits lead nowhere! Understandably, you might want to undo them and start over.

Here’s one way to do this:
$ git reset --hard 2b504be
But let’s also say that, moments later, you notice that you made a mistake: actually, the commits contained important data and you just lost valuable work!
Advertising by Adpathway





