git的一些常用操作--自用

git clean

git clean 一般用于删除未跟踪的文件,比如无意中创建的多余文件,或是系统自动生成的日志文件等。查看有哪些文件会被该命令删除可以使用:

git clean -n 
[WWW-2]:ybai:/var/www/api.account.leo1v1.com.2$  (master) git clean -df
Removing flow_def.php
Removing flow_node.php
Removing app/Libs_bak/
Removing app/OrderPrice/a.php
Removing app/OrderPrice/order_price_20170107.php
Removing app/OrderPrice/order_price_20171001beifen.php
Removing app/check_is_exist
Removing app/lesson_account
Removing app/teacher_rule.php.bak

只删除当前目录下的文件,只需执行以下命令即可

git clean -f 

如果要全部删除,则需要加上d参数,才可删除

git clean -df 

猜你喜欢

转载自blog.csdn.net/weixin_39179096/article/details/83016912