summaryrefslogtreecommitdiff
path: root/Documentation/git-rebase.txt
AgeCommit message (Collapse)Author
2011-07-22Merge branch 'mz/doc-rebase-abort'Junio C Hamano
* mz/doc-rebase-abort: rebase: clarify "restore the original branch"
2011-07-14rebase: clarify "restore the original branch"Martin von Zweigbergk
The description for 'git rebase --abort' currently says: Restore the original branch and abort the rebase operation. The "restore" can be misinterpreted to imply that the original branch was somehow in a broken state during the rebase operation. It is also not completely clear what "the original branch" is --- is it the branch that was checked out before the rebase operation was called or is the the branch that is being rebased (it is the latter)? Although both issues are made clear in the DESCRIPTION section, let us also make the entry in the OPTIONS secion more clear. Also remove the term "rebasing process" from the usage text, since the user already knows that the text is about "git rebase". Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-07-06Documentation: use [verse] for SYNOPSIS sectionsMartin von Zweigbergk
The SYNOPSIS sections of most commands that span several lines already use [verse] to retain line breaks. Most commands that don't span several lines seem not to use [verse]. In the HTML output, [verse] does not only preserve line breaks, but also makes the section indented, which causes a slight inconsistency between commands that use [verse] and those that don't. Use [verse] in all SYNOPSIS sections for consistency. Also remove the blank lines from git-fetch.txt and git-rebase.txt to align with the other man pages. In the case of git-rebase.txt, which already uses [verse], the blank line makes the [verse] not apply to the last line, so removing the blank line also makes the formatting within the document more consistent. While at it, add single quotes to 'git cvsimport' for consistency with other commands. Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-28Merge branch 'mz/rebase'Junio C Hamano
* mz/rebase: (34 commits) rebase: define options in OPTIONS_SPEC Makefile: do not install sourced rebase scripts rebase: use @{upstream} if no upstream specified rebase -i: remove unnecessary state rebase-root rebase -i: don't read unused variable preserve_merges git-rebase--am: remove unnecessary --3way option rebase -m: don't print exit code 2 when merge fails rebase -m: remember allow_rerere_autoupdate option rebase: remember strategy and strategy options rebase: remember verbose option rebase: extract code for writing basic state rebase: factor out sub command handling rebase: make -v a tiny bit more verbose rebase -i: align variable names rebase: show consistent conflict resolution hint rebase: extract am code to new source file rebase: extract merge code to new source file rebase: remove $branch as synonym for $orig_head rebase -i: support --stat rebase: factor out call to pre-rebase hook ...
2011-03-15Merge branch 'jk/doc-credits' of git://github.com/peff/gitJunio C Hamano
* 'jk/doc-credits' of git://github.com/peff/git: docs: point git.txt author credits to git-scm.com doc: add missing git footers doc: drop author/documentation sections from most pages
2011-03-14Documentation: "rebase <onto> <that>" stays on <that> branch upon exitDrew Northup
This change makes it clearer that the change to the history effected by executing 'git rebase master' while on 'topic' branch, and by executing 'git rebase master topic' on any branch, will be the same; the implicit checkout of the second form will remain after the rebase exits. Signed-off-by: Drew Northup <drew.northup@maine.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-11doc: drop author/documentation sections from most pagesJeff King
The point of these sections is generally to: 1. Give credit where it is due. 2. Give the reader an idea of where to ask questions or file bug reports. But they don't do a good job of either case. For (1), they are out of date and incomplete. A much more accurate answer can be gotten through shortlog or blame. For (2), the correct contact point is generally git@vger, and even if you wanted to cc the contact point, the out-of-date and incomplete fields mean you're likely sending to somebody useless. So let's drop the fields entirely from all manpages except git(1) itself. We already point people to the mailing list for bug reports there, and we can update the Authors section to give credit to the major contributors and point to shortlog and blame for more information. Each page has a "This is part of git" footer, so people can follow that to the main git manpage.
2011-02-10rebase: use @{upstream} if no upstream specifiedMartin von Zweigbergk
'git rebase' without arguments is currently not supported. Make it default to 'git rebase @{upstream}'. That is also what 'git pull [--rebase]' defaults to, so it only makes sense that 'git rebase' defaults to the same thing. Defaulting to @{upstream} will make it possible to run e.g. 'git rebase -i' without arguments, which is probably a quite common use case. It also improves the scenario where you have multiple branches that rebase against a remote-tracking branch, where you currently have to choose between the extra network delay of 'git pull' or the slightly awkward keys to enter 'git rebase @{u}'. The error reporting when no upstream is configured for the current branch or when no branch is checked out is reused from git-pull.sh. A function is extracted into git-parse-remote.sh for this purpose. Helped-by: Yann Dirson <ydirson@altern.org> Helped-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-23rebase: support --verifyMartin von Zweigbergk
Interactive rebase allows the '--verify' option to be passed, but it will be ignored. Implement proper support for the option for both interactive and non-interactive rebase by making it override any previous '--no-verify'. Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-03Merge branch 'jn/doc-backslash'Junio C Hamano
* jn/doc-backslash: Documentation: remove stray backslash in show-branch discussion Documentation: remove stray backslashes from "Fighting regressions" article Documentation: do not convert ... operator to ellipses Documentation: avoid stray backslash in user manual Documentation: avoid stray backslashes in core tutorial Documentation: remove stray backslashes in rev-parse manual Documentation: remove backslash before ~ in fast-import manual Documentation: remove stray backslash from "git bundle" manual Documentation/technical: avoid stray backslash in parse-options API docs Documentation: remove backslashes in manpage synopses Documentation: clarify quoting in gitignore docs Documentation: clarify quoting in "git rm" example Documentation: add missing quotes to "git grep" examples Documentation: clarify quoting in "git add" example Documentation: unbreak regex in show-ref manual Documentation: quoting trouble in "git rm" discussion Documentation: tweak description of log.date
2010-08-31Merge branch 'hv/autosquash-config'Junio C Hamano
* hv/autosquash-config: add configuration variable for --autosquash option of interactive rebase
2010-08-22Merge branch 'mm/rebase-i-exec'Junio C Hamano
* mm/rebase-i-exec: git-rebase--interactive.sh: use printf instead of echo to print commit message git-rebase--interactive.sh: rework skip_unnecessary_picks test-lib: user-friendly alternatives to test [-d|-f|-e] rebase -i: add exec command to launch a shell command Conflicts: git-rebase--interactive.sh t/t3404-rebase-interactive.sh
2010-08-20Documentation: do not convert ... operator to ellipsesJonathan Nieder
The symmetric difference or merge-base operator ... as used by rev-list and diff is actually three period characters. If it gets replaced by an ellipsis glyph in the manual, that would stop readers from copying and pasting it. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-11rebase -i: add exec command to launch a shell commandMatthieu Moy
The typical usage pattern would be to run a test (or simply a compilation command) at given points in history. The shell command is ran (from the worktree root), and the rebase is stopped when the command fails, to give the user an opportunity to fix the problem before continuing with "git rebase --continue". This needs a little rework of skip_unnecessary_picks, which wasn't robust enough to deal with lines like exec >"file name with many spaces" in the todolist. The new version extracts command, sha1 and rest from each line, but outputs the line itself verbatim to avoid changing the whitespace layout. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-03rebase: support -X to pass through strategy optionsMike Lundy
git-rebase calls out to merge strategies, but did not support merge strategy options so far. Add this, in the same style used in git-merge. Sadly we have to do the full quoting/eval dance here, since merge-recursive supports the --subtree=<path> option which potentially contains whitespace. This patch does not cover git rebase -i, which does not call any merge strategy directly except in --preserve-merges, and even then only for merges. [jc: with a trivial fix-up for 'expr'] Signed-off-by: Mike Lundy <mike@fluffypenguin.org> Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-14add configuration variable for --autosquash option of interactive rebaseHeiko Voigt
If you use this feature regularly you can now enable it by default. In case the user wants to override this config on the commandline --no-autosquash can be used to force disabling. Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-11rebase -i -p: document shortcomingsJonathan Nieder
The rebase --preserve-merges facility presents a list of commits in its instruction sheet and uses a separate table to keep track of their parents. Unfortunately, in practice this means that with -p after most attempts to rearrange patches, some commits have the "wrong" parent and the resulting history is rarely what the caller expected. Yes, it would be nice to fix that. But first, add a warning to the manual to help the uninitiated understand what is going on. Reported-by: Jiří Paleček <jpalecek@web.de> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-02Documentation: A...B shortcut for checkout and rebaseMichael J Gruber
Describe the A...B shortcuts for checkout and rebase [-i] which were introduced in these commits: 619a64e ("checkout A...B" switches to the merge base between A and B, 2009-10-18) 61dfa1b ("rebase --onto A...B" replays history on the merge base between A and B, 2009-11-20) 230a456 (rebase -i: teach --onto A...B syntax, 2010-01-07) Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-19Documentation: rebase -i ignores options passed to "git am"Markus Heidelberg
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-24Teach rebase the --no-ff option.Marc Branchaud
For git-rebase.sh, --no-ff is a synonym for --force-rebase. For git-rebase--interactive.sh, --no-ff cherry-picks all the commits in the rebased branch, instead of fast-forwarding over any unchanged commits. --no-ff offers an alternative way to deal with reverted merges. Instead of "reverting the revert" you can use "rebase --no-ff" to recreate the branch with entirely new commits (they're new because at the very least the committer time is different). This obviates the need to revert the reversion, as you can re-merge the new topic branch directly. Added an addendum to revert-a-faulty-merge.txt describing the situation and how to use --no-ff to handle it. Signed-off-by: Marc Branchaud <marcnarc@xiplink.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-21git-rebase.txt: Fix spellingHorst H. von Brand
Signed-off-by: Horst H. von Brand <vonbrand@inf.utfsm.cl> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-21Merge remote branch 'remotes/trast-doc/for-next'Junio C Hamano
* remotes/trast-doc/for-next: Documentation: spell 'git cmd' without dash throughout Documentation: format full commands in typewriter font Documentation: warn prominently against merging with dirty trees Documentation/git-merge: reword references to "remote" and "pull" Conflicts: Documentation/config.txt Documentation/git-config.txt Documentation/git-merge.txt
2010-01-10Documentation: spell 'git cmd' without dash throughoutThomas Rast
The documentation was quite inconsistent when spelling 'git cmd' if it only refers to the program, not to some specific invocation syntax: both 'git-cmd' and 'git cmd' spellings exist. The current trend goes towards dashless forms, and there is precedent in 647ac70 (git-svn.txt: stop using dash-form of commands., 2009-07-07) to actively eliminate the dashed variants. Replace 'git-cmd' with 'git cmd' throughout, except where git-shell, git-cvsserver, git-upload-pack, git-receive-pack, and git-upload-archive are concerned, because those really live in the $PATH.
2010-01-07rebase -i --autosquash: auto-squash commitsNanako Shiraishi
Teach a new option, --autosquash, to the interactive rebase. When the commit log message begins with "!fixup ...", and there is a commit whose title begins with the same ..., automatically modify the todo list of rebase -i so that the commit marked for squashing come right after the commit to be modified, and change the action of the moved commit from pick to squash. Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-07Add a command "fixup" to rebase --interactiveMichael Haggerty
The command is like "squash", except that it discards the commit message of the corresponding commit. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-23Merge branch 'tr/maint-merge-ours-clarification' (early part)Junio C Hamano
* 'tr/maint-merge-ours-clarification' (early part): rebase docs: clarify --merge and --strategy Documentation: clarify 'ours' merge strategy
2009-11-17rebase docs: clarify --merge and --strategyThomas Rast
Add a paragraph about the swapped sides in a --merge rebase, which was otherwise only documented in the sources. Add a paragraph about the effects of the 'ours' strategy to the -s description. Also remove the mention of the 'octopus' strategy, which was copied from the git-merge description but is pointless in a rebase. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-08Teach 'rebase -i' the command "reword"Björn Gustavsson
Make it easier to edit just the commit message for a commit using 'git rebase -i' by introducing the "reword" command. Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-05git apply: option to ignore whitespace differencesGiuseppe Bilotta
Introduce --ignore-whitespace option and corresponding config bool to ignore whitespace differences while applying patches, akin to the 'patch' program. 'git am', 'git rebase' and the bash git completion are made aware of this option. Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-18am, rebase: teach quiet optionStephen Boyd
git-am and git-rebase are talkative scripts. Teach them to be quiet when told, allowing them to speak only when they fail or experience errors. The quiet option is maintained when git-am or git-rebase fails to apply a patch. This means subsequent --resolved, --continue, --skip, --abort invocations will be quiet if the original invocation was quiet. Drop a handful of >&2 redirection; the rest of the program sends all the info messages to stdout, not to stderr. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-21doc/git-rebase.txt: remove mention of multiple strategiesNguyễn Thái Ngọc Duy
git-rebase.sh does not seem to support this. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-19rebase: add options passed to git-amMichele Ballabio
Add the options --committer-date-is-author-date and --ignore-date to git-rebase. They were introduced in commit a79ec62d0 for git-am. These options imply --force-rebase. Signed-off-by: Michele Ballabio <barra_cuda@katamail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-19document --force-rebaseMichele Ballabio
Signed-off-by: Michele Ballabio <barra_cuda@katamail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-03git-rebase: Add --stat and --no-stat for producing diffstat on rebaseTor Arne Vestbø
The behavior of --verbose is unchanged, but uses a different state variable internally, so that the meaning of verbose output may be expanded without affecting the diffstat. This is also reflected in the documentation. The configuration option rebase.stat works the same was as merg.stat, but the default is currently false. Signed-off-by: Tor Arne Vestbø <torarnv@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-02-28git-rebase: Update --whitespace documentationTodd Zullinger
The parameters accepted by the --whitespace option of "git apply" have changed over time, and the documentation for "git rebase" was out of sync. Remove the specific parameter list from the "git rebase" documentation and simply point to the "git apply" documentation for details, as is already done in the "git am" documentation. Signed-off-by: Todd Zullinger <tmz@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-02-13git-rebase.txt: --interactive does not work with --whitespaceMark Burton
Signed-off-by: Mark Burton <markb@ordern.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-12rebase: update documentation for --rootThomas Rast
Since the new option depends on --onto and omission of <upstream>, use a separate invocation style, and omit most options to save space. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-19Merge branch 'tr/workflow-doc'Junio C Hamano
* tr/workflow-doc: Documentation: add manpage about workflows Documentation: Refer to git-rebase(1) to warn against rewriting Documentation: new upstream rebase recovery section in git-rebase
2008-10-19Merge branch 'ae/preservemerge'Junio C Hamano
* ae/preservemerge: rebase: Support preserving merges in non-interactive mode
2008-10-14rebase: Document --no-verify option to bypass pre-rebase hookNanako Shiraishi
Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-30rebase: Support preserving merges in non-interactive modeAndreas Ericsson
As a result of implementation details, 'git rebase' could previously only preserve merges in interactive mode. That limitation was hard for users to understand and awkward to explain. This patch works around it by running the interactive rebase helper git-rebase--interactive with GIT_EDITOR set to ':' when the user passes "-p" but not "-i" to the rebase command. The effect is that the interactive rebase helper is used but the user never sees an editor. The test-case included in this patch was originally written by Stephen Habermann <stephen@exigencecorp.com>, but has been extensively modified since its creation. Signed-off-by: Andreas Ericsson <ae@op5.se> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-09-24Fixed some grammatical errors in git-rebase.txt documentation.Garry Dolley
Generally, the dependent clause "for example" is suffixed with a comma. Used present tense where appropriate to be consistent with the other paragraphs. Rewrote the paragraph in the second hunk to be more clear. Signed-off-by: Garry Dolley <gdolley@ucla.edu> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-09-16Documentation: new upstream rebase recovery section in git-rebaseThomas Rast
Document how to recover if the upstream that you pull from has rebased the branches you depend your work on. Hopefully this can also serve as a warning to potential rebasers. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-22Rename .git/rebase to .git/rebase-applyJohannes Schindelin
With git-am, it sounds awkward to have the patches in ".git/rebase/", but for technical reasons, we have to keep the same directory name for git-am and git-rebase. ".git/rebase-apply" seems to be a good compromise. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-21Update my e-mail addressJunio C Hamano
The old cox.net address is still getting mails from gitters. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-16Rename ".dotest/" to ".git/rebase" and ".dotest-merge" to "rebase-merge"Johannes Schindelin
Since the files generated and used during a rebase are never to be tracked, they should live in $GIT_DIR. While at it, avoid the rather meaningless term "dotest" to "rebase", and unhide ".dotest-merge". This was wished for on the mailing list, but so far unimplemented. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-08Documentation: mention ORIG_HEAD in am, merge, and rebaseBrian Gernhardt
Merge has always set ORIG_HEAD but never mentioned it, while we recently added it to am and rebase. These facts should be reflected in the documentation. git-reset also sets ORIG_HEAD, but that fact is already mentioned in the very first example so no changes were needed there. Signed-off-by: Brian Gernhardt <benji@silverinsanity.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05manpages: italicize git command names (which were in teletype font)Jonathan Nieder
The names of git commands are not meant to be entered at the commandline; they are just names. So we render them in italics, as is usual for command names in manpages. Using doit () { perl -e 'for (<>) { s/\`(git-[^\`.]*)\`/'\''\1'\''/g; print }' } for i in git*.txt config.txt diff*.txt blame*.txt fetch*.txt i18n.txt \ merge*.txt pretty*.txt pull*.txt rev*.txt urls*.txt do doit <"$i" >"$i+" && mv "$i+" "$i" done git diff . Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05Documentation: more "git-" versus "git " changesJonathan Nieder
With git-commands moving out of $(bindir), it is useful to make a clearer distinction between the git subcommand 'git-whatever' and the command you type, `git whatever <options>`. So we use a dash after "git" when referring to the former and not the latter. I already sent a patch doing this same thing, but I missed some spots. Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-02Documentation formatting and cleanupJonathan Nieder
Following what appears to be the predominant style, format names of commands and commandlines both as `teletype text`. While we're at it, add articles ("a" and "the") in some places, italicize the name of the command in the manual page synopsis line, and add a comma or two where it seems appropriate. Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>