{"thread":{"id":"26775","subject":"Deleting a Bare Repo","startedAt":"2011-03-18T15:26:37Z","lastAt":"2011-03-18T21:36:41Z","messageCount":2,"participants":["Sean B. Palmer","Neal Kreitzinger"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"163650","messageId":"AANLkTimaQ3dyXDJgY_Ys19jpNXx07vK2qNLQ_8Cp8NKi@mail.gmail.com","threadId":"26775","inReplyTo":null,"subject":"Deleting a Bare Repo","fromName":"Sean B. Palmer","fromEmail":"sean@miscoranda.com","sentAt":"2011-03-18T15:26:37Z","receivedAt":"2011-03-18T15:26:37Z","isPatch":false,"sender":{"key":"sean@miscoranda.com","avatar":null},"body":"I'd like to delete a bare git repo, but I want to check that (a) it's\nbeing used as the actual git bare repo, e.g. if $GIT_DIR is set, and\n(b) that it is actually a git repo. Using rm -rf .git/ doesn't seem\nsafe for these reasons, so is there a command in git itself to do\nthis?\n\nI've been going through the man pages without success.\n\n-- \nSean B. Palmer, http://inamidst.com/sbp/\n"},{"id":"163682","messageId":"4D83D069.1050206@gmail.com","threadId":"26775","inReplyTo":"AANLkTimaQ3dyXDJgY_Ys19jpNXx07vK2qNLQ_8Cp8NKi@mail.gmail.com","subject":"Re: Deleting a Bare Repo","fromName":"Neal Kreitzinger","fromEmail":"nkreitzinger@gmail.com","sentAt":"2011-03-18T21:36:41Z","receivedAt":"2011-03-18T21:36:41Z","isPatch":false,"sender":{"key":"nkreitzinger@gmail.com","avatar":null},"body":"On 3/18/2011 10:26 AM, Sean B. Palmer wrote:\n> I'd like to delete a bare git repo, but I want to check that (a) it's\n> being used as the actual git bare repo, e.g. if $GIT_DIR is set, and\n> (b) that it is actually a git repo. Using rm -rf .git/ doesn't seem\n> safe for these reasons, so is there a command in git itself to do\n> this?\n>\n> I've been going through the man pages without success.\n>\nhere is a partial list of considerations and inqueries:\n* there is not a git command to delete a repo.  rm -rf is how you do it.\n* git repo's are not aware of who has cloned from them and/or is \npulling/fetching from them.\n* if there is a git-daemon-export-ok then that means it was setup to be \npull-from via the git:// protocol.  however, that doesn't mean anyone is \nactually pulling from it.\n* check the config file and see if its setup as a mirror.  if so, \ninvestigate its mirror.\n\nif you are talking about manual deletion you could:\n* cd to the bare repo and do a git-status.  if it returns a status then \nit's a working repo (not necessarily a referenced repo).\n* analyze it in gitk and see if anyone has pushed to it recently.\n* rename it and see if anyone complains.\n\nv/r,\nneal\n"}]}