Git tutorial #24 - Git stash

in #tutorials7 years ago

Hello everyone I hope you are very well! 🤗

In this new post we are going to talk about a very useful command used in git that is $ git stash

Many times we are working on a branch of our project and we have the need to move to another branch where we have to apply a different change, normally we have to publish the changes we have in the current branch and then move to the branch where we must make the change, but many times we are not ready to publish changes in the current branch and that is where we can make use of this command, Stash is a state that we have as an intermediary. For this we must go to one of our branches and using the git stash command that allows us to make changes, but not confirm them

git stash: is another limb, like the staging area. To add the changes they must be in the staging area.
git stash list: shows us the list of stash we have.
git stash drop stash @ {number}: allows us to delete a stash.
git stash apply: we apply the last change

These are the commands of use, it is very useful, I personally use it a lot when I have to make some changes that have to do with the project but not directly with what I am working with, that is where I see its usefulness.

Well that's all for this post, I hope it serves.

Regards! 🤓 😎

Sort:  

Este Post ha recibido un Upvote desde la cuenta del King: @dineroconopcion, El cual es un Grupo de Soporte mantenido por 5 personas mas que quieren ayudarte a llegar hacer un Top Autor En Steemit sin tener que invertir en Steem Power. Te Gustaria Ser Parte De Este Projecto?

This Post has been Upvote from the King's Account: @dineroconopcion, It's a Support Group by 5 other people that want to help you be a Top Steemit Author without having to invest into Steem Power. Would You Like To Be Part of this Project?

This post has received a 0.35 % upvote from @drotto thanks to: @banjo.

Congratulations! This post has been upvoted from the communal account, @minnowsupport, by juanpchica from the Minnow Support Project. It's a witness project run by aggroed, ausbitbank, teamsteem, theprophet0, someguy123, neoxian, followbtcnews/crimsonclad, and netuoso. The goal is to help Steemit grow by supporting Minnows and creating a social network. Please find us in the Peace, Abundance, and Liberty Network (PALnet) Discord Channel. It's a completely public and open space to all members of the Steemit community who voluntarily choose to be there.

Coin Marketplace

STEEM 0.19
TRX 0.15
JST 0.029
BTC 63131.59
ETH 2586.04
USDT 1.00
SBD 2.78