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.

有帮助吗?

解决方案

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.

其他提示

Commits in the git stash have references as a local ref, so they will stick around indefinitely (i.e. won't get garbage-collected).

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top