How can I remove all files in my git repo and update/push from my local git repo?

后端 未结 14 1900
猫巷女王i
猫巷女王i 2021-01-29 20:20

Is it possible to remove all files in a repository and update it with only the files I have in my local machine? The reason is that, there are certain files that is not necessar

相关标签:
14条回答
  • 2021-01-29 21:23

    If you prefer using GitHub Desktop, you can simply navigate inside the parent directory of your local repository and delete all of the files inside the parent directory. Then, commit and push your changes. Your repository will be cleansed of all files.

    0 讨论(0)
  • 2021-01-29 21:26

    I was trying to do :

    git rm -r *
    

    but at the end for me works :

    git rm -r .
    

    I hope it helps to you.

    0 讨论(0)
提交回复
热议问题