Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GIT Stash Clarification

I have installed GIT in my ubuntu server.

I have a habit of stashing too often in git for the files which needs more work.

So far I have not come acrosss any issues regarding stashing.

I wanted to clarify whether when I create a stash does it have a lifetime and does it get deleted or cleared after a few days.Just how secure are my changes in the stash.

And while doing any other changes is there a risk of the stash being deleted.

like image 290
Dark Matter Avatar asked Jan 28 '13 12:01

Dark Matter


1 Answers

Since about git version 1.6.0 the stash is set not to expire. Changelog of that git version said:

By default, stash entries never expire.  Set reflogexpire in [gc
"refs/stash"] to a reasonable value to get traditional auto-expiration
behaviour back

So in case you want the stash to expire do as hinted above.

like image 190
gulty Avatar answered Sep 21 '22 13:09

gulty