Github - 拉取请求,忽略一些文件更改 [英] Github - Pull Request, ignore some file changes
本文介绍了Github - 拉取请求,忽略一些文件更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我在GitHub上执行Pull请求时(针对master分支),我们是否可以忽略一些文件更改,如
解决方案
您不能有选择地忽略拉取请求中的某些文件。
这可以解决两个问题 -
第一 -
- 从'release'创建一个新分支
- 从'master'替换不需要的文件
- 从这个新分支创建请求 >
第二个 -
- master'
- 将所需文件从'release'更改
- 从这个新分支创建请求
- we have one file named 'fileA' in branch 'release', and we have the same file in 'master', but we do some changes in 'fileA' in branch 'release'
- when we do a Pull Request, is there any way we can ignore the changes in 'fileA', do not let that merge into 'master'.
- Create a new branch from 'release'
- Replace the non-required files from 'master'
- Create pull request from this new branch
- Create a new branch from 'master'
- Put changes of required files from 'release'
- Create pull request from this new branch
ul>
这种方法都可以工作。哪个更容易取决于包含/排除多少个文件。
When I do a Pull Request on GitHub (against master branch), can we ignore some file changes, like
解决方案
You can't ignore some files from a pull request selectively. Two workarounds for this can be -
First -
Second -
Any of this method will work. Which will be easier depends upon how many files are to be included / excluded.
这篇关于Github - 拉取请求,忽略一些文件更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文