git移除target目录下已经提交的内容案例

$ git rm --cached ./target/*
rm 'spring5/spring01-quickstart/target/classes/com/sz/App.class'
rm 'spring5/spring01-quickstart/target/test-classes/com/sz/AppTest.class'


$ git commit -m "rm target"
[master eb5a978] rm target
 2 files changed, 0 insertions(+), 0 deletions(-)
 delete mode 100644 spring5/spring01-quickstart/target/classes/com/sz/App.class
 delete mode 100644 spring5/spring01-quickstart/target/test-classes/com/sz/AppTest.class


git push

posted @ 2018-08-18 17:15  沙漠皇帝  阅读(2593)  评论(0编辑  收藏  举报