简体   繁体   English

从Github拉取请求中排除自述文件

[英]Exclude readme from Github pull request

I'm using Github and trying to create a pull request on someone else's project that I have forked. 我正在使用Github并尝试在我分叉的其他人的项目上创建一个拉取请求。 I edited the Readme.md in my fork, but I don't want them to get that commit. 我在我的fork中编辑了Readme.md ,但我不希望他们得到那个提交。

How do I do that? 我怎么做? It seems painfully simple but I cannot figure it out. 这看起来很简单,但我无法弄清楚。 Right now I've simply copypasted the original Readme.md back into my project and made the pull request, but that seems counterintuitive. 现在我只是简单地将原始的Readme.md回我的项目并提出拉取请求,但这似乎违反直觉。

What's the best way to go about this? 最好的方法是什么?

All you need to do is: 你需要做的就是:

  • make sure to create a branch from master, from a commit before your README.md modification ( typically, from upstream/master , with upstream being the name of the remote original repo that you forked) 确保 README.md修改之前从提交创建一个分支( 通常来自upstream/masterupstream是您分叉的远程原始存储库的名称)
  • make your changes in that branch (which does not include the README.md modification) 在该分支中进行更改(不包括README.md修改)
  • make your pull request from that dedicated branch (as recommended in " couple tips for PR "). 从该专用分支发出拉取请求(如“ PR的情侣提示 ”中所推荐的那样)。

While you are adding your changes/fixes in that branch, you can modify whatever you want in your master branch, including the README.md . 当您在该分支中添加更改/修复时,您可以在master分支中修改所需的任何内容,包括README.md

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

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