Skip to content

Commit

Permalink
"git prune" is safe
Browse files Browse the repository at this point in the history
"git prune" is safe in case of concurrent accesses to a repository
but using it in such a case is not recommended.

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Thomas Ackermann authored and Junio C Hamano committed Aug 27, 2013
1 parent 381183f commit ddeb817
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions Documentation/user-manual.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3299,17 +3299,11 @@ state, you can just prune all unreachable objects:
$ git prune
------------------------------------------------

and they'll be gone. But you should only run `git prune` on a quiescent
and they'll be gone. (You should only run `git prune` on a quiescent
repository--it's kind of like doing a filesystem fsck recovery: you
don't want to do that while the filesystem is mounted.

(The same is true of `git fsck` itself, btw, but since
`git fsck` never actually *changes* the repository, it just reports
on what it found, `git fsck` itself is never 'dangerous' to run.
Running it while somebody is actually changing the repository can cause
confusing and scary messages, but it won't actually do anything bad. In
contrast, running `git prune` while somebody is actively changing the
repository is a *BAD* idea).
`git prune` is designed not to cause any harm in such cases of concurrent
accesses to a repository but you might receive confusing or scary messages.)

[[recovering-from-repository-corruption]]
Recovering from repository corruption
Expand Down

0 comments on commit ddeb817

Please sign in to comment.