从GitHub上的Pull Request中删除文件 [英] Delete file from Pull Request on GitHub

查看:418
本文介绍了从GitHub上的Pull Request中删除文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在git上发出了请求请求(带有"xcodeproj/project.pbxproj"文件-我的错),因此我可以从创建的请求请求中删除此文件吗?谢谢.

I have make pull request on git (with "xcodeproj/project.pbxproj" file - my fault), so can I delete this file from created Pull Request? Thanks..

推荐答案

  • 进行提交,以删除该文件并将其推送.
  • 转到您的叉子的Github页面,然后再次单击 Pull Request .您将收到一条消息,指出您已经有一个拉取请求,并且可以调整它的提交范围.
  • 包括新提交(带有删除内容).
    • Make a commit that deletes this file and push it.
    • Go to your fork's Github page and click Pull Request again. You will get a message stating that you already have a pull request, and that you can adjust the commit range for it.
    • Include your new commit (with the deletion).
    • 请注意,有问题的文件仍将保留在要合并的变更集中,因此,如果其中包含敏感数据,则最好关闭拉取请求并首先从fork的存储库中删除该文件. Github帮助描述如何做到这一点.

      The offending file will still be in the changesets to be merged, mind you, so if it contains sensitive data it's best to close the pull request and wipe out the file from your fork's repository first. Github help describes how to do that.

      这篇关于从GitHub上的Pull Request中删除文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆