docs:git:rebase

Differences

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

Link to this comparison view

docs:git:rebase [2009/10/21 21:33] – created billhdocs:git:rebase [2009/10/21 23:14] (current) billh
Line 1: Line 1:
 ===== rebase ===== ===== rebase =====
 FIXME FIXME
 +rebase allows you to do several things, one of which is to take a group of commits, rewrite history, and organize them into a lumped commit.  This is great for when a developer has done his own thing with branches and many small commits, but wants to publish one nice clean commit of the work onto a public repository.
 +
 +  * start a rebase operation in interactive mode, for the latest 5 commits<code>
 +git rebase -i HEAD~5
 +</code>
 +  * your text editor will be started, showing you a list of the commits within the specified scope, and instructions listed at the bottom
 +  * edit this file as necessary per the instructions, then save it and exit your editor
 +  * if the rebase fails or your decide not to go through with it, you need to abort<code>
 +git rebase -i --abort
 +</code>
 +  * if you need to fix something from a conflict, you can continue the operation<code>
 +git rebase -i --continue
 +</code>
  
 ===== External Links ===== ===== External Links =====
   * [[http://blog.madism.org/index.php/2007/09/09/138-git-awsome-ness-git-rebase-interactive|git awsome-ness [git rebase --interactive]]]   * [[http://blog.madism.org/index.php/2007/09/09/138-git-awsome-ness-git-rebase-interactive|git awsome-ness [git rebase --interactive]]]
  • docs/git/rebase.1256182439.txt.gz
  • Last modified: 2009/10/21 21:33
  • by billh