문제

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