max_ max_ - 1 year ago 73
Git Question

Delete all files and history from remote Git repo without deleting repo itself

I would appreciate it if someone could tell me how I could delete every single file/folder on my git repository without actually deleting the repository itself. I want to delete all history associated with those files as well.

Answer Source

You can delete a branch from a repository remote like this

git push origin :branchname

if you've got any tags you can delete them like this:

git push origin :refs/tags/tagname

This is assuming you have a remote set up to github called origin

This will leave the local tags / branches on your computer, though.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download