git 什么是合并期间创建的 .rej 文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/34585865/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What are .rej files which are created during merge
提问by GajanaN Chalke
I was merging master branch into new branch, there are some .rej files are created.
我正在将 master 分支合并到新分支中,创建了一些 .rej 文件。
I took a pool of master branch into new branch I got conflicts which I've resolved but there are some .rej files.
我将一个主分支池带到了新分支中,但我已经解决了一些冲突,但是有一些 .rej 文件。
Can you please help me to know about the .rej files and what am I suppose to do with those files.
你能帮我了解 .rej 文件以及我想用这些文件做什么。
回答by CodeWizard
.rej
files are rejected files (usually hunks patches but not only).
.rej
文件是被拒绝的文件(通常是大块补丁,但不仅如此)。
When ever you get those files after merge you will manually have to edit them, fix them and then apply them back.
当您在合并后获得这些文件时,您必须手动编辑它们,修复它们,然后将它们重新应用。
You can read heresome more about it and what is it
你可以在这里阅读更多关于它的内容以及它是什么
.rej
file
.rej
文件
diff a.txt (rejected hunks) ....
diff a.txt (rejected hunks) ....
Fix it manually and then apply the .rej
files like a regular patch.
手动修复它,然后.rej
像常规补丁一样应用文件。
manually merge the change from *.rej
into the required file and remove the *.rej
file.
手动将更改合并*.rej
到所需文件中并删除该*.rej
文件。
Another very usefully article addressing this can be found here.
回答by Marlo
Since I knew that my remote master branch was up to date, I just deleted all the .rej
files and then did git pull
.
由于我知道我的远程 master 分支是最新的,我只是删除了所有.rej
文件,然后执行了git pull
.