Update links (HTTPSify and drop code.google.com)
[TortoiseGit.git] / doc / source / en / TortoiseGit / tgit_dug / dug_rebase.xml
blob6d92a38ec174f127ec132713d80de648a9396c76
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
6   <indexterm>\r
7     <primary>Rebase</primary>\r
8   </indexterm>\r
9   <para>\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
11   </para>\r
12   <para>\r
13         <menuchoice>\r
14                 <guimenu>TortoiseGit</guimenu>\r
15                 <guimenuitem>Rebase</guimenuitem>\r
16         </menuchoice>\r
17   </para>\r
18   <para>\r
19         Rebase dialog will be shown. <graphic fileref="../images/GitRebase.png"/>\r
20   </para>\r
21   <para>\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
23   </para>\r
24         <tip>\r
25                 <para>\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
28                 </para>\r
29         </tip>\r
30         <tip>\r
31                 <para>\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
37                         <menuchoice>\r
38                                 <guimenu>Context Menu</guimenu>\r
39                                 <guimenuitem>Rebase</guimenuitem>\r
40                         </menuchoice>\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
44                 </para>\r
45         </tip>\r
46         <important>\r
47                 <para>\r
48                         TortoiseGit currently cannot rebase merge commits (<ulink url="https://tortoisegit.org/issue/2314">issue #2314</ulink>).\r
49                 </para>\r
50         </important>\r
51 </sect1>