如何从 Github 删除已提交的文件?
我的项目是这里 [该链接并不像许多人想象的那样用于营销],我对Git 和 Github,我在 Visual Studio 2008 中使用 Git 扩展。我将文件、目录 Plug.Sln 和 Samples 提交到 Github,现在
我到底如何从它们中删除它&没有留下该文件存在于我的存储库中的痕迹?[在 github 上,但让它们保留在本地存储库中]
我想在 Visual Studio 中取消跟踪这些签入的文件[我的意思是,如何让它声明它是在签入这些文件之前]
如何恢复到上次提交的状态版本?
My project is here [the link is not for marketing thing as many might think], I am entirely new to Git and Github and I Use Git Extensions with Visual Studio 2008. I committed the file, directory Plug.Sln and Samples into Github, now
How the heck do I remove it from them & leave no trail that file existed in my repository?[on github, but make them remain in local repository]
I want to untrack these checked in Files in Visual Studio[I mean like, how do I get it to state it was before checking in these]
How do I revert to a last committed version?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Github 有一个针对这种情况的帮助部分。您可以在此处查看。如果它们从未存在过,则会将其删除。
如果您想保留它们,请在遵循 github 指南之前复制该文件。将它们从存储库中删除后,将它们添加回您的工作目录,然后将它们添加到您的 .gitignore 文件 以防止 git 跟踪它们。
Github has a help section for this situation. You can view it here. That will remove them if they never existed.
If you want to keep them around, make a copy of the file before you follow the github guide. Once you have removed them from your repository, add them back to your working directory, and add than add them to your .gitignore file to keep git from tracking them.
听起来您想从版本控制中删除该文件。查看如何停止跟踪并忽略更改 Git 中的文件? 寻求解决方案。
It sounds like you want to remove the file from version control. Check out How to stop tracking and ignore changes to a file in Git? for a solution.