As a developer, good knowledge of Git or any version control software is more than a skill — it is a must. And among the many good things that Git has to offer, there is Git Stash. Why is it great? Because it prevents you from committing every tiny change when working on several Git branches at the same time.

Discovering it as a junior dev helped me a lot, so here is a basic rundown of the main commands and the way they can be useful.

In an ideal developer workday, one would be able to focus on a single task until completion and then switch to the next. But in reality, there are always smaller urgent issues that need immediate attention and longer-term work that requires more thinking and trying.

One way to handle this is to commit everything before switching branches, but this can make your work dirtier by increasing the number of commits while breaking apart their logic. Not ideal.

So let’s use git stash instead and learn to use its set of commands.

#version-control #javascript #software-development #programming #git

Why Knowing Git Stash Is a Must
1.15 GEEK