0 votes
22 views
in Technology by (230k points)

What is Git Stash?

1 Answer

0 votes
by (230k points)

GIT stash captures the current state of the working directory and index and keeps it on the stack for future use. It reverts the uncommitted changes (both staged and unstaged) from your working directory and returns you a clean working tree.

You can work on something else now, and when you come back, you can re-apply these changes. So, if you want to switch from one context to another without losing your current changes, then you can use stashing.

It is helpful in quick context switching, where you are in a mid-way of a code change that you don’t want to commit or undo it right now and you have got something else to work on. The command to use is git stash.

Related questions

0 votes
1 answer 20 views
0 votes
1 answer 28 views
asked Nov 4, 2020 in Technology by JackTerrance (230k points)
0 votes
1 answer 39 views
asked Nov 2, 2020 in Technology by JackTerrance (230k points)
0 votes
1 answer 25 views
0 votes
1 answer 20 views
asked Nov 2, 2020 in Technology by JackTerrance (230k points)
0 votes
1 answer 21 views
0 votes
1 answer 31 views
0 votes
1 answer 19 views
0 votes
1 answer 38 views
0 votes
1 answer 27 views
0 votes
1 answer 23 views
0 votes
1 answer 28 views
0 votes
1 answer 18 views
0 votes
1 answer 35 views
0 votes
1 answer 25 views
0 votes
1 answer 22 views
asked Nov 2, 2020 in Technology by JackTerrance (230k points)
0 votes
1 answer 46 views
asked Nov 2, 2020 in Technology by JackTerrance (230k points)
0 votes
1 answer 36 views
asked Nov 4, 2020 in General by JackTerrance (230k points)
0 votes
1 answer 18 views
asked Nov 3, 2020 in Technology by JackTerrance (230k points)
0 votes
1 answer 19 views
asked Nov 2, 2020 in Technology by JackTerrance (230k points)
0 votes
1 answer 28 views
asked Oct 4, 2020 in Technology by Editorial Staff (51.6k points)
...