git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Deleting a Bare Repo

From
NKNeal Kreitzinger <nkreitzinger@gmail.com>
Date
Mar 18, 2011, 21:36 UTC
Message-ID
<4D83D069.1050206@gmail.com>
In-Reply-To
<AANLkTimaQ3dyXDJgY_Ys19jpNXx07vK2qNLQ_8Cp8NKi@mail.gmail.com>
On 3/18/2011 10:26 AM, Sean B. Palmer wrote:
Show 8 quoted lines
> I'd like to delete a bare git repo, but I want to check that (a) it's
> being used as the actual git bare repo, e.g. if $GIT_DIR is set, and
> (b) that it is actually a git repo. Using rm -rf .git/ doesn't seem
> safe for these reasons, so is there a command in git itself to do
> this?
>
> I've been going through the man pages without success.
>
here is a partial list of considerations and inqueries:
* there is not a git command to delete a repo.  rm -rf is how you do it.
* git repo's are not aware of who has cloned from them and/or is 
pulling/fetching from them.
* if there is a git-daemon-export-ok then that means it was setup to be 
pull-from via the git:// protocol.  however, that doesn't mean anyone is 
actually pulling from it.
* check the config file and see if its setup as a mirror.  if so, 
investigate its mirror.
if you are talking about manual deletion you could:
* cd to the bare repo and do a git-status.  if it returns a status then 
it's a working repo (not necessarily a referenced repo).
* analyze it in gitk and see if anyone has pushed to it recently.
* rename it and see if anyone complains.

v/r, neal

Previous: Sean B. Palmer
Message 2 of 2 in “Deleting a Bare Repo”
  1. Sean B. PalmerMar 18, 2011
  2. Neal KreitzingerMar 18, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.