diff options
Diffstat (limited to 'Documentation/git-rebase.txt')
-rw-r--r-- | Documentation/git-rebase.txt | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index e2e61d3642..89a957ef77 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -17,7 +17,7 @@ SYNOPSIS 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. @@ -170,8 +170,8 @@ This is useful if F and G were flawed in some way, or should not be 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 @@ -187,7 +187,7 @@ desired resolution, you can continue the rebasing process with git rebase --continue -Alternatively, you can undo the 'git-rebase' with +Alternatively, you can undo the 'git rebase' with git rebase --abort @@ -238,10 +238,10 @@ other words, the sides are swapped. -s <strategy>:: --strategy=<strategy>:: Use the given merge strategy. - If there is no `-s` option 'git-merge-recursive' is used + If there is no `-s` option 'git merge-recursive' is used instead. This implies --merge. + -Because 'git-rebase' replays each commit from the working branch +Because 'git rebase' replays each commit from the working branch on top of the <upstream> branch using the given strategy, using the 'ours' strategy simply discards all patches from the <branch>, which makes little sense. @@ -280,13 +280,13 @@ which makes little sense. --ignore-whitespace:: --whitespace=<option>:: - These flag are passed to the 'git-apply' program + These flag are passed to the 'git apply' program (see linkgit:git-apply[1]) that applies the patch. Incompatible with the --interactive option. --committer-date-is-author-date:: --ignore-date:: - These flags are passed to 'git-am' to easily change the dates + These flags are passed to 'git am' to easily change the dates of the rebased commits (see linkgit:git-am[1]). -i:: @@ -323,7 +323,7 @@ include::merge-strategies.txt[] NOTES ----- -You should understand the implications of using 'git-rebase' on a +You should understand the implications of using 'git rebase' on a repository that you share. See also RECOVERING FROM UPSTREAM REBASE below. @@ -379,12 +379,12 @@ pick fa1afe1 The oneline of the next commit ... ------------------------------------------- -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. @@ -399,13 +399,13 @@ message for the folded commit is the concatenation of the commit messages of the first commit and of those with the "squash" command, but omits the commit messages of commits with the "fixup" command. -'git-rebase' will stop when "pick" has been replaced with "edit" or +'git rebase' will stop when "pick" has been replaced with "edit" or when a command fails due to merge errors. When you are done editing and/or resolving conflicts you can continue with `git rebase --continue`. 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 @@ -435,7 +435,7 @@ SPLITTING COMMITS ----------------- 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: @@ -451,7 +451,7 @@ 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. @@ -462,7 +462,7 @@ add other commits. This can be used to split a commit into two: 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. @@ -537,7 +537,7 @@ Only works if the changes (patch IDs based on the diff contents) on 'subsystem' are literally the same before and after the rebase 'subsystem' did. -In that case, the fix is easy because 'git-rebase' knows to skip +In that case, the fix is easy because 'git rebase' knows to skip changes that are already present in the new upstream. So if you say (assuming you're on 'topic') ------------ @@ -564,12 +564,12 @@ NOTE: While an "easy case recovery" sometimes appears to be successful example, a commit that was removed via `git rebase \--interactive` will be **resurrected**! -The idea is to manually tell 'git-rebase' "where the old 'subsystem' +The idea is to manually tell 'git rebase' "where the old 'subsystem' ended and your 'topic' began", that is, what the old merge-base between them was. You will have to find a way to name the last commit of the old 'subsystem', for example: -* With the 'subsystem' reflog: after 'git-fetch', the old tip of +* With the 'subsystem' reflog: after 'git fetch', the old tip of 'subsystem' is at `subsystem@\{1}`. Subsequent fetches will increase the number. (See linkgit:git-reflog[1].) |