How long does git keep out
Assume I create a branch in my local repository named feature1
based on master
and add one or two commits. Then I switch back to master
and decide that feature1
is not going to make it and delete the branch.
I assume that a branch is basically a "pointer" to a particular commit object.
Now on to the actual questions.
git checkout SHA1-HERE
)? Is there some kind of "retention policy" that would remove commits which are not part of any existing branch history or tag (not sure if using correct terminology here...) ? Reason for this question: I am currently working on a project that has receive.denyNonFastForwards
enforced on the basis that it avoids losing any committed work (I suspect receive.denyDeletes
is also enforced). I want to make sure there is no better way to preserve commited but unmerged work and also be able to clean up old branches to avoid clutter.
The default s 90 days:
gc.reflogexpire
gc.<pattern>.reflogexpire
git reflog
expire removes reflog entries older than this time; defaults to 90 days. With " <pattern>
" (eg " refs/stash
") in the middle the setting applies only to the refs that match the <pattern>
.
So:
上一篇: Maven:什么是“mvn
下一篇: git保持多久