DESCRIPTION
-----------
-If <branch> is specified, `git-rebase` will perform an automatic
+If <branch> is specified, 'git-rebase' will perform an automatic
`git checkout <branch>` before doing anything else. Otherwise
it remains on the current branch.
The current branch is reset to <upstream>, or <newbase> if the
--onto option was supplied. This has the exact same effect as
-`git reset --hard <upstream>` (or <newbase>).
+`git reset --hard <upstream>` (or <newbase>). ORIG_HEAD is set
+to point at the tip of the branch before the reset.
The commits that were previously saved into the temporary area are
then reapplied to the current branch, one by one, in order. Note that
completely automatic. You will have to resolve any such merge failure
and run `git rebase --continue`. Another option is to bypass the commit
that caused the merge failure with `git rebase --skip`. To restore the
-original <branch> and remove the .dotest working files, use the command
-`git rebase --abort` instead.
+original <branch> and remove the .git/rebase-apply working files, use the
+command `git rebase --abort` instead.
Assume the following history exists and the current branch is "topic":
part of topicA. Note that the argument to --onto and the <upstream>
parameter can be any valid commit-ish.
-In case of conflict, `git-rebase` will stop at the first problematic commit
-and leave conflict markers in the tree. You can use `git-diff` to locate
+In case of conflict, 'git-rebase' will stop at the first problematic commit
+and leave conflict markers in the tree. You can use 'git-diff' to locate
the markers (<<<<<<) and make edits to resolve the conflict. For each
file you edit, you need to tell git that the conflict has been resolved,
typically this would be done with
git rebase --continue
-Alternatively, you can undo the `git-rebase` with
+Alternatively, you can undo the 'git-rebase' with
git rebase --abort
Use the given merge strategy; can be supplied more than
once to specify them in the order they should be tried.
If there is no `-s` option, a built-in list of strategies
- is used instead (`git-merge-recursive` when merging a single
- head, `git-merge-octopus` otherwise). This implies --merge.
+ is used instead ('git-merge-recursive' when merging a single
+ head, 'git-merge-octopus' otherwise). This implies --merge.
-v::
--verbose::
ever ignored.
--whitespace=<nowarn|warn|error|error-all|strip>::
- This flag is passed to the `git-apply` program
+ This flag is passed to the 'git-apply' program
(see linkgit:git-apply[1]) that applies the patch.
-i::
When you rebase a branch, you are changing its history in a way that
will cause problems for anyone who already has a copy of the branch
in their repository and tries to pull updates from you. You should
-understand the implications of using 'git rebase' on a repository that
+understand the implications of using 'git-rebase' on a repository that
you share.
-When the git rebase command is run, it will first execute a "pre-rebase"
+When the git-rebase command is run, it will first execute a "pre-rebase"
hook if one exists. You can use this hook to do sanity checks and
reject the rebase if it isn't appropriate. Please see the template
pre-rebase hook script for an example.
...
-------------------------------------------
-The oneline descriptions are purely for your pleasure; `git-rebase` will
+The oneline descriptions are purely for your pleasure; 'git-rebase' will
not look at them but at the commit names ("deadbee" and "fa1afe1" in this
example), so do not delete or edit the names.
By replacing the command "pick" with the command "edit", you can tell
-`git-rebase` to stop after applying that commit, so that you can edit
+'git-rebase' to stop after applying that commit, so that you can edit
the files and/or the commit message, amend the commit, and continue
rebasing.
For example, if you want to reorder the last 5 commits, such that what
was HEAD~4 becomes the new HEAD. To achieve that, you would call
-`git-rebase` like this:
+'git-rebase' like this:
----------------------
$ git rebase -i HEAD~5
-----------------
In interactive mode, you can mark commits with the action "edit". However,
-this does not necessarily mean that `git-rebase` expects the result of this
+this does not necessarily mean that 'git-rebase' expects the result of this
edit to be exactly one commit. Indeed, you can undo the commit, or you can
add other commits. This can be used to split a commit into two:
- Now add the changes to the index that you want to have in the first
commit. You can use `git add` (possibly interactively) or
- `git-gui` (or both) to do that.
+ 'git-gui' (or both) to do that.
- Commit the now-current index with whatever commit message is appropriate
now.
If you are not absolutely sure that the intermediate revisions are
consistent (they compile, pass the testsuite, etc.) you should use
-`git-stash` to stash away the not-yet-committed changes
+'git-stash' to stash away the not-yet-committed changes
after each commit, test, and amend the commit if fixes are necessary.
Authors
------
-Written by Junio C Hamano <junkio@cox.net> and
+Written by Junio C Hamano <gitster@pobox.com> and
Johannes E. Schindelin <johannes.schindelin@gmx.de>
Documentation