2

我不小心从本地存储库中添加并提交了一个文件,我不想将它添加到我的 GitHub 项目的存储库中。我可以使用终端删除此文件还是可以在线手动删除它?

4

1 回答 1

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.
于 2013-04-05T20:31:12.480 回答