Damus
Justine Smithies profile picture
Justine Smithies
@Justine Smithies
I'm after some advice from folk that use #Git . I have my own self hosted Git server and I have one repository that I'd like to empty of all content and history. I know I can just delete the remote repository and recreate it again starting a fresh. But would using git push --force <remote> <branch> not just do the same by overwriting the remote repository with the locals contents ? Or could I end up with files in the remote that are not in my local ???
I should also say that I am the only person that pushes to this remote repo too. Any help or advice is very much appreciated and thank you.
2
Peter Krefting · 27w
nostr:nprofile1qy2hwumn8ghj7un9d3shjtnyd968gmewwp6kyqpqw65rptwmg7gr50yqjdmje49s8kfk4e95hwqgzr2zqpfynjzt29lq9thl5m You'll end up with objects from both the old and new files in the object store, but that should sort itself out over time when you run gc on it, anything not referenced anywhere will eve...
Justine Smithies · 27w
So I'm guessing that I could do the following from within the remote Git repository to delete it's history and contents, Allowing me to start a fresh by pushing new files from the local repo ??? git branch -D master git checkout --orphan master git rm -rf *