0

I am logged in to GitHub and browsed a repository at a certain point in history (a few commits/pushes ago). I found a file in this old commit/push that I need to delete, but when I click on the file the delete button is disabled and displays "You must be on a branch to make or propose changes to this file" when I hover over it.

I have researched this message, but still don't understand 1) what it means and 2) how to delete this file.

How would you delete this file?

user7560542
  • 497
  • 1
  • 4
  • 13
  • 2
    Has the file already been deleted in a more recent commit? – Devon Aug 21 '18 at 20:27
  • @Devon yes, it has. edit: the file is still in the repo though- I can download it, view data in Raw, etc. – user7560542 Aug 21 '18 at 20:27
  • 2
    Yes, that's kind of the point of a VCS, being able to see file history as they are changed. – Devon Aug 21 '18 at 20:30
  • 1
    Why do you need to delete it? Just to "tidy up", because it contains sensitive information, because it's too big, something else? – Chris Aug 21 '18 at 20:36
  • @Chris yeah it's too big and has been part of some recent commits. I don't mind deleting the files individually, in each commit, if needed. Just not certain how to do this. – user7560542 Aug 21 '18 at 20:37
  • @Chris, I was hoping to learn how to accomplish this using the GitHub web UI. As stated in the post, the delete button is visible, but is disabled. – user7560542 Aug 21 '18 at 20:39
  • There is no mechanism for doing this in GitHub's web UI. – Chris Aug 21 '18 at 20:40

0 Answers0