1 <?xml version="1.0" encoding="utf-8"?>
\r
2 <!DOCTYPE sect1 SYSTEM "../../../dtd/dblite.dtd">
\r
3 <sect1 id="tgit-dug-rebase">
\r
4 <title>Rebase</title>
\r
5 <?dbhh topicname="HIDD_REBASE"?>
\r
7 <primary>Rebase</primary>
\r
10 Rebase is quite complex, it alters the history of a repository. Please make sure you understood its principles before using it (For hints where to find more information about Git and merging see <xref linkend="tgit-preface-readingguide"/>).
\r
14 <guimenu>TortoiseGit</guimenu>
\r
15 <guimenuitem>Rebase</guimenuitem>
\r
19 Rebase dialog will be shown. <graphic fileref="../images/GitRebase.png"/>
\r
22 Rebasing commits takes places from the bottom of the list to the top (in ascending order of the ID column). For example, "squash" means that the commit gets squashed/combined with the previous commit(s) which are located below in the list (with a lower ID).
\r
26 Instead of setting "pick", "skip", "edit", "squash" by using the context-menu, you can also use the following keys:
\r
27 <keycap>space</keycap>: shifts the state, <keycap>s</keycap>: skip, <keycap>e</keycap>: edit, <keycap>p</keycap>: pick, <keycap>q</keycap>: squash
\r
32 There is a button that swaps branch and upstream.
\r
33 Assume you are currently working on <literal>master</literal> branch,
\r
34 and wish to rebase <literal>feature</literal> branch onto <literal>master</literal>.
\r
35 Instead of switching to <literal>feature</literal> in advance,
\r
36 select the commit of <literal>feature</literal> in log list,
\r
38 <guimenu>Context Menu</guimenu>
\r
39 <guimenuitem>Rebase</guimenuitem>
\r
41 and click this swap button.
\r
42 TortoiseGit's rebase moves <literal>feature</literal> to <literal>master</literal> directly, then
\r
43 cherry-picks the commits. This approach touches fewer files and runs faster.
\r
48 TortoiseGit currently cannot rebase merge commits (<ulink url="https://tortoisegit.org/issue/2314">issue #2314</ulink>).
\r