我创建了一个 git repo 并在我的 android projekt 上做了一些工作,但现在我认识到我将文件添加到 repo 中,每次都会更改,因为它们是生成的。我怎样才能删除它们并确保不会再次添加它们。
我已经将它们添加到像这样锁定的 .gitignore
bin/classes/**
gen/**
bin/PDiXUploader.apk
bin/classes.dex
bin/resources.ap_
gen/de/srs/android/pdixuploader/R.java
但是现在我不确定如何从 repo 中删除它,这样它就不会受到版本控制。
这是我的 git 状态日志
$ git status
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: bin/PDiXUploader.apk
# modified: bin/classes.dex
# modified: bin/resources.ap_
# modified: gen/de/srs/android/pdixuploader/R.java
# modified: res/layout/activity_instance_selection.xml
# modified: res/layout/activity_main.xml
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# res/values/dimens.xml
no changes added to commit (use "git add" and/or "git commit -a")
谢谢