2013-08-23 21 views

回答

1

這些參數不會做不同的事情,而是修改底座如何應用更改。

http://linux.die.net/man/1/git-rebase

-m, --merge 

Use merging strategies to rebase. When the recursive (default) merge strategy is used, this allows rebase to be aware of renames on the upstream side. 
Note that a rebase merge works by replaying each commit from the working branch on top of the <upstream> branch. Because of this, when a merge conflict happens, the side reported as ours is the so-far rebased series, starting with <upstream>, and theirs is the working branch. In other words, the sides are swapped. 

換句話說,而不是僅僅施加與每個所述的變化提交執行合併變化到分支。例如,如果一個文件被重命名,git會對該文件進行更改,而不是創建一個新文件。

其他參數修改如何執行合併:

-s <strategy>, --strategy=<strategy> 

Use the given merge strategy. If there is no -s option git merge-recursive is used instead. This implies --merge. 
Because git rebase replays each commit from the working branch on top of the <upstream> branch using the given strategy, using the ours strategy simply discards all patches from the <branch>, which makes little sense. 

Git有用於確定哪些更改合併更改時使用多種方式。該選項指定使用哪一個。默認值爲recursive,但根據具體情況還有其他可能適用的值。

-X指定要傳遞給要使用的合併策略的任何其他選項。例如recursive有三個可以使用的選項:ours,theirssubtree。你會用-X來指定你想要的。

相關問題