简体   繁体   中英

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. 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.

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?

If you:

  • deleted it in your local clone of your fork
  • git push --force to your fork on GitHub

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM