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

Re: Obliterating a commit

From
Wincent Colaiuta <win@wincent.com>
Date
Sep 30, 2007, 14:13 UTC
Message-ID
<57945943-2355-447D-9474-89834BADB312@wincent.com>
In-Reply-To
<1f6632e50709300515h57f4b4ffh9a18fef29b134f13@mail.gmail.com>
El 30/9/2007, a las 14:15, Matthias Kestenholz escribió:
Show 7 quoted lines
> If you use ssh to push your changes (that is, you are not copying
> or rsyncing packfiles), only commits, trees and blobs, which are  
> reachable
> through the DAG will be published. Commits and Blobs which are only
> reachable through your reflog are not published, since the reflog  
> only applies
> to your local repository.

Ah, this is good to know. Yes, I do principally publish by pushing to a central repo, but I wanted to really destroy the objects just in case in the future I or somebody else ever clones my local repo.

Show 6 quoted lines
> The simplest thing you could do is remove the reflog for HEAD and
> refs/heads/master respectively your current branch and run 'git prune'
> afterwards (if you have not repacked
> already, otherwise you'd need to run 'git repack -a -d' or 'git gc'  
> to get
> rid of blobs inside your packfile.

Thanks very much, Matthias. Blowing away those reflogs and running git-prune worked and it's doesn't require too much fiddling.

Cheers, Wincent

Previous: Matthias Kestenholz
Message 3 of 3 in “Obliterating a commit”
  1. Wincent ColaiutaSep 30, 2007
  2. Matthias KestenholzSep 30, 2007
  3. Wincent ColaiutaSep 30, 2007

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.