使用git工具删除github上的文件或者文件夹

解决 使用git工具删除github上的文件或者文件夹

当我们需要从github上删除一些我们不需要的文件或者文件夹时,如果通过github来操作的话,将会很麻烦,因为github只允许删除一个仓库,而不允许只删除一个单一的文件或者文件夹,使用git 工具可以快速删除。

1.

git rm --cached filename  //删除文件

git rm --cached -r dictory //删除目录

2.

git commit -m "注释"

3.

git push -u origin master  

猜你喜欢

转载自www.cnblogs.com/jums/p/10625466.html