Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
git_rebase [2019/04/03 20:39] – [Example requiring --onto newbase] rpjdaygit_rebase [2019/04/06 21:34] (current) – [Removing a sequence of commits] rpjday
Line 35: Line 35:
         D---E---F---G             master         D---E---F---G             master
 </code> </code>
 +
 +One of:
 +
 +<code>
 +$ git checkout topic
 +$ git rebase master
 +</code>
 +
 +or:
  
 <code> <code>
Line 61: Line 70:
  
 <code> <code>
 +                          o---o---o  topic
 +                         /
         o---o---o---o---o  master         o---o---o---o---o  master
-            |            \ 
-            |             o'--o'--o'  topic 
              \              \
               o---o---o---o---o  next               o---o---o---o---o  next
- 
-</code> 
-===== DESCRIPTION ===== 
- 
-<code> 
-If <branch> is specified, git rebase will perform an automatic 
-git checkout <branch> before doing anything else. Otherwise it 
-remains on the current branch. 
-</code> 
- 
-In other words, the final optional argument ''[branch]'' can always be omitted if you first just: 
- 
-<code> 
-$ git checkout <branch> 
 </code> </code>
  
-then just pretend it says ''HEAD''. 
  
-===== Examples ===== 
  
 ==== Removing a sequence of commits ===== ==== Removing a sequence of commits =====
Line 97: Line 90:
  
 <code> <code>
-$ git rebase --onto B D+$ git rebase --onto B D [HEAD]
 </code> </code>
  
  • git_rebase.1554323967.txt.gz
  • Last modified: 2019/04/03 20:39
  • by rpjday