Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我不小心从本地存储库中添加并提交了一个文件,我不想将它添加到我的 GitHub 项目的存储库中。我可以使用终端删除此文件还是可以在线手动删除它?
从命令行您可以执行以下操作:
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.