Skip to content

Deleting files via trees no longer works? #24420

Discussion options

You must be logged in to vote

I just tested it and it worked fine. Here’s what I did:

  1. Create new directory directory in https://github.com/lee-dohm/test-repo with two files delete-this-file.txt and do-not-delete-this-file.txt (see result)
  2. Create a new tree object for directory that does not contain delete-this-file.txt
  3. Create a new tree object for / that points to all the same stuff except points to the new tree object created in step 2 for directory
  4. Create a commit object pointing to the tree object created in step 3 and the parent commit created in step 1
  5. Update the master branch to point to the new commit object created in step 4

You can see the final result in the repository.

One thing I did notice is that whe…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants