How can I delete a file from a Git repository?

后端 未结 24 2253
無奈伤痛
無奈伤痛 2020-11-22 13:41

I have added a file named \"file1.txt\" to a Git repository. After that, I committed it, added a couple of directories called dir1 and dir2

24条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-22 14:02

    Additionally, if it's a folder to be removed and it's subsequent child folders or files, use:

    git rm -r foldername
    

提交回复
热议问题