Comment on How do I remove a file from a git commit?

<- View Parent
ComicalMayhem@lemmy.world ⁨6⁩ ⁨days⁩ ago

The reason you can’t do the prior in a separate follow-up commit is that the file would still be in the git history, and hence it must be pushed to GitHub along with the rest of the repo files.

This makes sense. Is it possible to delete the offending commit completely? I use github like a cloud service for files, writing, and class notes, mostly just to push things from my laptop to my desktop and vice versa, so I’m not particularly worried about keeping commit history or anything. If not, then I’ll try out the rm method.

source
Sort:hotnewtop