我不小心添加并提交了一份来自我本地仓库的文件,我不希望将其添加到我的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.
Run Code Online (Sandbox Code Playgroud)