我不小心添加并提交了一份来自我本地仓库的文件,我不想将其添加到我的GitHub项目的回购中。我可以使用终端删除此文件,还是可以在线手动删除?
答案 0 :(得分:5)
从命令行可以执行以下操作:
git rm <file> - remove file locally and marks it for deletion
git commit -m"your message" - commit file to local repo
git push origin master - push the change to github.