合并仅所需提交的请求

时间:2019-12-04 12:45:21

标签: git git-merge

我的经理希望我发送原子合并请求,以便轻松跟踪更改。我要实现两个功能,import os import docx def getText(filename): doc = docx.Document(filename) fullText = [] for para in doc.paragraphs: fullText.append(para.text) return '\n'.join(fullText) if __name__ == '__main__': foldername='/content/drive/My Drive/path/'; #folder name all_files = os.listdir(foldername) #get all filenames docx_files = [ filename for filename in all_files if filename.endswith('.docx') ] #get .docx filenames file = open("copy.txt", "a+") for docx_file in docx_files: #loop over .docx files fullText=getText(filename) file.write(fullText) file.close() feature1彼此之间并不完全独立。假设我在feature2中编写了一个类定义和一些方法,并在feature1中向同一类添加了其他方法。

我的想法是我从feature2分支创建分支X并实现master。我提交并推送并发送合并请求。对于feature1,我从分支feature2创建另一个分支Y,使其包含X。我实现了feature1的提交,推送和发送合并请求。

如果我的经理在实施feature2之前不接受第一个合并请求,则第二个合并请求不仅包括feature2,还包括feature2。这会使更改变得更加困难。

我的第二个合并请求中只需要feature1。如何实现我的目的?

1 个答案:

答案 0 :(得分:0)

您可以创建从YX而不是master的伪合并请求。然后,它将仅显示feature2实现。 合并X后,您可以编辑合并请求并将目标更改为master

相关问题