Is there a reason why you don’t use conventional cloud storage? The only reason I can think for someone to use a git forge for generic cloud storage is the version history, which you’ve said you don’t need. Something like your OP problem wouldn’t happen for a conventional cloud provider.
Comment on How do I remove a file from a git commit?
ComicalMayhem@lemmy.world 6 days agoThe 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.
communism@lemmy.ml 5 days ago
ComicalMayhem@lemmy.world 5 days ago
price, desire to keep out of commercial cloud providers + inability to host my own private cloud service, desire/need to be more familiar with git in general as a compsci major, and ease of use. those are pretty much the main reasons
communism@lemmy.ml 5 days ago
desire to keep out of commercial cloud providers
I’m afraid that GitHub is run by Microsoft and I would consider it pretty thoroughly corporate these days.
Fair enough if you want to get more familiar with git (although using it as a cloud service is basically just gonna be add all and then commit, surely? you’re not practising any other git operations if only using as cloud storage?), but people normally do this with programming projects, which you should have no shortage of as a CS major.
ComicalMayhem@lemmy.world 5 days ago
I’m afraid that GitHub is run by Microsoft and I would consider it pretty thoroughly corporate these days
Ah. Did not know that. That’s… unfortunate.
although using it as a cloud service is basically just gonna be add all and then commit, surely? you’re not practising any other git operations if only using as cloud storage?
This is true enough actually but it helped drill the process into my head when I first started it and I found it simple enough to use after a while, esp since I just wrote a bash function to cut down on cd’ing.
but people normally do this with programming projects, which you should have no shortage of as a CS major.
You’d be surprised.
VibeSurgeon@piefed.social 6 days ago
It is possible through several means.
The reset-method makes it disappear (and then you create a replacement).
If you have nothing you want to keep at all in the commit and it happens to not be the latest one, you can as mentioned use an interactive rebase. You then mark the commit for deletion, and it’s like it never even happened. If any subsequent commits depended on changes in the deleted commit, however, you will get conflicts, as git won’t know how to apply the subsequent commits in that case.