简体   繁体   English

git会从我的fork中将已删除的文件拉到github上的主项目吗?

[英]Will git pull a deleted file from my fork to the main project on github?

I accidentally merged and pushed a large binary file to my fork of a particular repo. 我无意中合并了一个大型二进制文件,并将其推送到特定回购协议的fork。 I deleted the file from my fork, and in fact did my best to completely annihilate it with the bfg repo cleaner http://rtyley.github.io/bfg-repo-cleaner/ - now I don't see the file anymore. 我从叉子上删除了文件,实际上我尽了最大努力用bfg回购清理器彻底销毁了该文件http://rtyley.github.io/bfg-repo-cleaner/-现在我不再看到该文件了。

My fear is that although I can't find the file anymore, it might still end up lurking in the main repo when my pull request is merged, taking up space and slowing downloads for everyone using the main repo. 我担心的是,尽管我再也找不到文件了,但是当合并我的拉取请求时,它可能最终仍潜伏在主存储库中,从而占用了空间并减慢了使用主存储库的每个人的下载速度。

So... 所以...

If I do a pull request on github from the branch where all of this is occurring, can I be sure that the large binary file will not be included in the push? 如果我在所有发生此事的分支上对github发出了一次pull请求,我可以确定大二进制文件不会包含在push中吗?

If you: 如果你:

  • deleted it in your local clone of your fork 在您的fork的本地克隆中将其删除
  • git push --force to your fork on GitHub git push --force到GitHub上的fork

That means the history of the branch you are using for your pull request simply does not reference the commit with the large file: there is no way said commit "reappear" during the pull request in the original repo. 这意味着您用于拉取请求的分支的历史记录根本不会引用带有大文件的提交:在原始存储库中的拉取请求期间,无法说提交“重新出现”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用 github UI 或通过命令行将来自主项目分支的拉取请求应用到我的分支? - How can I apply a pull request from the main project branch to my fork using the github UI or via command line? 从 GitHub 上的已删除分支恢复作为拉取请求发送的提交 - Recover a commit sent as a pull-request from a deleted fork on GitHub 从github仓库派生出来的git pull产生冲突 - git pull from a github repository fork gives conflicts 对于Ruby on Rails项目的请求请求,git push到我的fork失败 - For Ruby on Rails project pull request, git push to my fork failing 我应该从Github派生一个小组项目还是在Eclipse中进行工作? - Should I fork or pull a group project from Github to work on in Eclipse? Github:从fork中提取一些提交到原始项目中 - Github: Pull some commits from fork into original project 从Github fork中提取更改 - Pull in changes from a Github fork 从我的叉子拉 - Pull from my fork 我如何git隐藏我的工作,从github提取,然后将我的工作放回项目中? - How do I git stash my work, pull from github, and put my work back into project? 从 github 上的存储库创建分叉,但在新的拉取请求中找不到我的分叉 - Create fork from repository on github but in new pull request not find my fork
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM