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

后端 未结 3 1624
不思量自难忘°
不思量自难忘° 2020-11-30 21:26

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 de

3条回答
  •  猫巷女王i
    2020-11-30 22:06

    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.

提交回复
热议问题