Skip to content

Commit 2535c49

Browse files
committed
Small note about merge vs rebase
1 parent 01dcd02 commit 2535c49

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

git-tech-writers/common_workflows.dita

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,26 @@
1515
<li><xref href="release_branches.dita"/></li>
1616
<li><xref href="gitflow.dita"/></li>
1717
</ul></p>
18+
<section id="section_lz3_tvy_zbc">
19+
<title>Re-base or merge branches?</title>
20+
<p>In most these workflows changes are made on one branch and then integrated on other
21+
branches. The changes can be integrated either with Git merge or with Git rebase.
22+
This post from <xref
23+
href="https://www.atlassian.com/git/tutorials/merging-vs-rebasing" format="html"
24+
scope="external">Atlassian</xref> explains the differences. Oxygen's Git client
25+
add-on supports in its <uicontrol>Git Branch Manager</uicontrol> view only the
26+
possibility to merge a branch in another one. </p>
27+
<p>Some highlights for each of these choices:<ul id="ul_mdj_nwy_zbc">
28+
<li><uicontrol>Git Merge</uicontrol>: Combines two branches by creating a new
29+
commit. It keeps the history of both branches as-is.</li>
30+
<li>
31+
<p><uicontrol>Git Rebase</uicontrol>: Moves the entire history of the branch
32+
you're on to the tip of the branch you're rebasing onto. It gives a
33+
linear commit history.<note id="note_jd1_bxy_zbc" type="important">The
34+
golden rule of <codeph>git rebase</codeph> is to never use it on
35+
<i>public</i> branches.</note></p>
36+
</li>
37+
</ul></p>
38+
</section>
1839
</body>
1940
</topic>

0 commit comments

Comments
 (0)