neulab/tldr huggingface dataset:
--autosquash, --no-autosquash When the commit log message begins with "squash! ..." or "fixup! ..." or "amend! ...", and there is already a commit in the todo list that matches the same ..., automatically modify the todo list of rebase -i, so that the commit marked for squashing comes right after the commit to be modified, and change the action of the moved commit from pick to squash or fixup or fixup -C respectively. A commit matches the ...  if the commit subject matches, or if the ...  refers to the commit’s hash. As a fall-back, partial matches of the commit subject work, too. The recommended way to create fixup/amend/squash commits is by using the --fixup, --fixup=amend: or --fixup=reword: and --squash options respectively of git-commit(1).
If the --autosquash option is enabled by default using the configuration variable rebase.autoSquash, this option can be used to override and disable this setting.
--autostash, --no-autostash Automatically create a temporary stash entry before the operation begins, and apply it after the operation ends. This means that you can run rebase on a dirty worktree. However, use with care: the final stash application after a successful rebase might result in non-trivial conflicts.
--reschedule-failed-exec, --no-reschedule-failed-exec Automatically reschedule exec commands that failed. This only makes sense in interactive mode (or when an --exec option was provided).
Even though this option applies once a rebase is started, it’s set for the whole rebase at the start based on either the rebase.rescheduleFailedExec configuration (see git-config(1) or "CONFIGURATION" below) or whether this option is provided. Otherwise an explicit --no-reschedule-failed-exec at the start would be overridden by the presence of rebase.rescheduleFailedExec=true configuration.
The following options:
•   --apply
•   --whitespace
•   -C
are incompatible with the following options:
•   --merge
•   --strategy
•   --strategy-option
•   --allow-empty-message
•   --[no-]autosquash
•   --rebase-merges
•   --interactive
•   --exec
•   --no-keep-empty
•   --empty=
•   --reapply-cherry-picks
•   --edit-todo
•   --root when used in combination with --onto
In addition, the following pairs of options are incompatible:
•   --keep-base and --onto
•   --keep-base and --root
•   --fork-point and --root
git rebase has two primary backends: apply and merge. (The apply backend used to be known as the am backend, but the name led to confusion as it looks like a verb instead of a noun. Also, the merge backend used to be known as the interactive backend, but it is now used for non-interactive cases as well. Both were renamed based on lower-level functionality that underpinned each.) There are some subtle differences in how these two backends behave:
Empty commits The apply backend unfortunately drops intentionally empty commits, i.e. commits that started empty, though these are rare in practice. It also drops commits that become empty and has no option for controlling this behavior.
The merge backend keeps intentionally empty commits by default (though with -i they are marked as empty in the todo list editor, or they can be dropped automatically with --no-keep-empty).
Similar to the apply backend, by default the merge backend drops commits that become empty unless -i/--interactive is specified (in which case it stops and asks the user what to do). The merge backend also has an --empty={drop,keep,ask} option for changing the behavior of handling commits that become empty.
Directory rename detection Due to the lack of accurate tree information (arising from constructing fake ancestors with the limited information available in patches), directory rename detection is disabled in the apply backend. Disabled directory rename detection means that if one side of history renames a directory and the other adds new files to the old directory, then the new files will be left behind in the old directory without any warning at the time of rebasing that you may want to move these files into the new directory.
Directory rename detection works with the merge backend to provide you warnings in such cases.
Context The apply backend works by creating a sequence of patches (by calling format-patch internally), and then applying the patches in sequence (calling am internally). Patches are composed of multiple hunks, each with line numbers, a context region, and the actual changes. The line numbers have to be taken with some fuzz, since the other side will likely have inserted or deleted lines earlier in the file. The context region is meant to help find how to adjust the line numbers in order to apply the changes to the right lines. However, if multiple areas of the code have the same surrounding lines of context, the wrong one can be picked. There are real-world cases where this has caused commits to be reapplied incorrectly with no conflicts reported. Setting diff.context to a larger value may prevent such types of problems, but increases the chance of spurious conflicts (since it will require more lines of matching context to apply).
The merge backend works with a full copy of each relevant file, insulating it from these types of problems.
Labelling of conflicts markers When there are content conflicts, the merge machinery tries to annotate each side’s conflict markers with the commits where the content came from. Since the apply backend drops the original information about the rebased commits and their parents (and instead generates new fake commits based off limited information in the generated patches), those commits cannot be identified; instead it has to fall back to a commit summary. Also, when merge.conflictStyle is set to diff3, the apply backend will use "constructed merge base" to label the content from the merge base, and thus provide no information about the merge base commit whatsoever.
The merge backend works with the full commits on both sides of history and thus has no such limitations.
Hooks The apply backend has not traditionally called the post-commit hook, while the merge backend has. Both have called the post-checkout hook, though the merge backend has squelched its output. Further, both backends only call the post-checkout hook with the starting point commit of the rebase, not the intermediate commits nor the final commit. In each case, the calling of these hooks was by accident of implementation rather than by design (both backends were originally implemented as shell scripts and happened to invoke other commands like git checkout or git commit that would call the hooks). Both backends should have the same behavior, though it is not entirely clear which, if any, is correct. We will likely make rebase stop calling either of these hooks in the future.
Interruptability The apply backend has safety problems with an ill-timed interrupt; if the user presses Ctrl-C at the wrong time to try to abort the rebase, the rebase can enter a state where it cannot be aborted with a subsequent git rebase --abort. The merge backend does not appear to suffer from the same shortcoming. (See https://lore.kernel.org/git/20200207132152.GC2868@szeder.dev/ for details.)
Commit Rewording When a conflict occurs while rebasing, rebase stops and asks the user to resolve. Since the user may need to make notable changes while resolving conflicts, after conflicts are resolved and the user has run git rebase --continue, the rebase should open an editor and ask the user to update the commit message. The merge backend does this, while the apply backend blindly applies the original commit message.
Miscellaneous differences There are a few more behavioral differences that most folks would probably consider inconsequential but which are mentioned for completeness:
•   Reflog: The two backends will use different wording when describing the changes made in the reflog, though both will make use of the word "rebase".
•   Progress, informational, and error messages: The two backends provide slightly different progress and informational messages. Also, the apply backend writes error messages (such as "Your files would be overwritten...") to stdout, while the merge backend writes them to stderr.
•   State directories: The two backends keep their state in different directories under .git/
The merge mechanism (git merge and git pull commands) allows the backend merge strategies to be chosen with -s option. Some strategies can also take their own options, which can be passed by giving -X<option> arguments to git merge and/or git pull.
ort This is the default merge strategy when pulling or merging one branch. This strategy can only resolve two heads using a 3-way merge algorithm. When there is more than one common ancestor that can be used for 3-way merge, it creates a merged tree of the common ancestors and uses that as the reference tree for the 3-way merge. This has been reported to result in fewer merge conflicts without causing mismerges by tests done on actual merge commits taken from Linux 2.6 kernel development history. Additionally this strategy can detect and handle merges involving renames. It does not make use of detected copies. The name for this algorithm is an acronym ("Ostensibly Recursive’s Twin") and came from the fact that it was written as a replacement for the previous default algorithm, recursive.
The ort strategy can take the following options:
ours This option forces conflicting hunks to be auto-resolved cleanly by favoring our version. Changes from the other tree that do not conflict with our side are reflected in the merge result. For a binary file, the entire contents are taken from our side.
This should not be confused with the ours merge strategy, which does not even look at what the other tree contains at all. It discards everything the other tree did, declaring our history contains all that happened in it.
theirs This is the opposite of ours; note that, unlike ours, there is no theirs merge strategy to confuse this merge option with.
ignore-space-change, ignore-all-space, ignore-space-at-eol, ignore-cr-at-eol Treats lines with the indicated type of whitespace change as unchanged for the sake of a three-way merge. Whitespace changes mixed with other changes to a line are not ignored. See also git- diff(1) -b, -w, --ignore-space-at-eol, and --ignore-cr-at-eol.
•   If their version only introduces whitespace changes to a line, our version is used;
•   If our version introduces whitespace changes but their version includes a substantial change, their version is used;
•   Otherwise, the merge proceeds in the usual way.
renormalize This runs a virtual check-out and check-in of all three stages of a file when resolving a three-way merge. This option is meant to be used when merging branches with different clean filters or end-of-line normalization rules. See "Merging branches with differing checkin/checkout attributes" in gitattributes(5) for details.
no-renormalize Disables the renormalize option. This overrides the merge.renormalize configuration variable.
find-renames[=<n>] Turn on rename detection, optionally setting the similarity threshold. This is the default. This overrides the merge.renames configuration variable. See also git-diff(1) --find-renames.
rename-threshold=<n> Deprecated synonym for find-renames=<n>.
subtree[=<path>] This option is a more advanced form of subtree strategy, where the strategy makes a guess on how two trees must be shifted to match with each other when merging. Instead, the specified path is prefixed (or stripped from the beginning) to make the shape of two trees to match.
recursive This can only resolve two heads using a 3-way merge algorithm. When there is more than one common ancestor that can be used for 3-way merge, it creates a merged tree of the common ancestors and uses that as the reference tree for the 3-way merge. This has been reported to result in fewer merge conflicts without causing mismerges by tests done on actual merge commits taken from Linux 2.6 kernel development history. Additionally this can detect and handle merges involving renames. It does not make use of detected copies. This was the default strategy for resolving two heads from Git v0.99.9k until v2.33.0.
The recursive strategy takes the same options as ort. However, there are three additional options that ort ignores (not documented above) that are potentially useful with the recursive strategy:
patience Deprecated synonym for diff-algorithm=patience.
diff-algorithm=[patience|minimal|histogram|myers] Use a different diff algorithm while merging, which can help avoid mismerges that occur due to unimportant matching lines (such as braces from distinct functions). See also git-diff(1) --diff-algorithm. Note that ort specifically uses diff-algorithm=histogram, while recursive defaults to the diff.algorithm config setting.
no-renames Turn off rename detection. This overrides the merge.renames configuration variable. See also git-diff(1) --no-renames.
resolve This can only resolve two heads (i.e. the current branch and another branch you pulled from) using a 3-way merge algorithm. It tries to carefully detect criss-cross merge ambiguities. It does not handle renames.
octopus This resolves cases with more than two heads, but refuses to do a complex merge that needs manual resolution. It is primarily meant to be used for bundling topic branch heads together. This is the default merge strategy when pulling or merging more than one branch.
ours This resolves any number of heads, but the resulting tree of the merge is always that of the current branch head, effectively ignoring all changes from all other branches. It is meant to be used to supersede old development history of side branches. Note that this is different from the -Xours option to the recursive merge strategy.
subtree This is a modified ort strategy. When merging trees A and B, if B corresponds to a subtree of A, B is first adjusted to match the tree structure of A, instead of reading the trees at the same level. This adjustment is also done to the common ancestor tree.
With the strategies that use 3-way merge (including the default, ort), if a change is made on both branches, but later reverted on one of the branches, that change will be present in the merged result; some people find this behavior confusing. It occurs because only the heads and the merge base are considered when performing a merge, not the individual commits. The merge algorithm therefore considers the reverted change as no change at all, and substitutes the changed version instead.
You should understand the implications of using git rebase on a repository that you share. See also RECOVERING FROM UPSTREAM REBASE below.
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.
Upon completion, <branch> will be the current branch.
1. revert-a-faulty-merge How-To file:///usr/share/doc/git-doc/howto/revert-a-faulty-merge.html
2. filter-repo https://github.com/newren/git-filter-repo
Rebasing interactively means that you have a chance to edit the commits which are rebased. You can reorder the commits, and you can remove them (weeding out bad or otherwise unwanted patches).
The interactive mode is meant for this type of workflow:
1. have a wonderful idea
2. hack on the code
3. prepare a series for submission
4. submit
where point 2. consists of several instances of
a) regular use
1. finish something worthy of a commit
b) independent fixup
1. realize that something does not work
2. fix that
3. commit it
Sometimes the thing fixed in b.2. cannot be amended to the not-quite perfect commit it fixes, because that commit is buried deeply in a patch series. That is exactly what interactive rebase is for: use it after plenty of "a"s and "b"s, by rearranging and editing commits, and squashing multiple commits into one.
Start it with the last commit you want to retain as-is:
git rebase -i <after-this-commit>
An editor will be fired up with all the commits in your current branch (ignoring merge commits), which come after the given commit. You can reorder the commits in this list to your heart’s content, and you can remove them. The list looks more or less like this:
pick deadbee The oneline of this commit pick fa1afe1 The oneline of the next commit ...
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 the files and/or the commit message, amend the commit, and continue rebasing.
To interrupt the rebase (just like an "edit" command would do, but without cherry-picking any commit first), use the "break" command.
If you just want to edit the commit message for a commit, replace the command "pick" with the command "reword".
To drop a commit, replace the command "pick" with "drop", or just delete the matching line.
If you want to fold two or more commits into one, replace the command "pick" for the second and subsequent commits with "squash" or "fixup". If the commits had different authors, the folded commit will be attributed to the author of the first commit. The suggested commit message for the folded commit is the concatenation of the first commit’s message with those identified by "squash" commands, omitting the messages of commits identified by "fixup" commands, unless "fixup -c" is used. In that case the suggested commit message is only the message of the "fixup -c" commit, and an editor is opened allowing you to edit the message. The contents (patch) of the "fixup -c" commit are still incorporated into the folded commit. If there is more than one "fixup -c" commit, the message from the final one is used. You can also use "fixup -C" to get the same behavior as "fixup -c" except without opening an editor.
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 -i HEAD~5
And move the first patch to the end of the list.
You might want to recreate merge commits, e.g. if you have a history like this:
X \ A---M---B / ---o---O---P---Q
Suppose you want to rebase the side branch starting at "A" to "Q". Make sure that the current HEAD is "B", and call
$ git rebase -i -r --onto Q O
Reordering and editing commits usually creates untested intermediate steps. You may want to check that your history editing did not break anything by running a test, or at least recompiling at intermediate points in history by using the "exec" command (shortcut "x"). You may do so by creating a todo list like this one:
pick deadbee Implement feature XXX fixup f1a5c00 Fix to feature XXX exec make pick c0ffeee The oneline of the next commit edit deadbab The oneline of the commit after exec cd subdir; make test ...
The interactive rebase will stop when a command fails (i.e. exits with non-0 status) to give you an opportunity to fix the problem. You can continue with git rebase --continue.
The "exec" command launches the command in a shell (the one specified in $SHELL, or the default shell if $SHELL is not set), so you can use shell features (like "cd", ">", ";" ...). The command is run from the root of the working tree.
$ git rebase -i --exec "make test"
This command lets you check that intermediate commits are compilable. The todo list becomes like that:
pick 5928aea one exec make test pick 04d0fda two exec make test pick ba46169 three exec make test pick f4593f9 four exec make test
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 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:
•   Start an interactive rebase with git rebase -i <commit>^, where <commit> is the commit you want to split. In fact, any commit range will do, as long as it contains that commit.
•   Mark the commit you want to split with the action "edit".
•   When it comes to editing that commit, execute git reset HEAD^. The effect is that the HEAD is rewound by one, and the index follows suit. However, the working tree stays the same.
•   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.
•   Commit the now-current index with whatever commit message is appropriate now.
•   Repeat the last two steps until your working tree is clean.
•   Continue the rebase with git rebase --continue.
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 after each commit, test, and amend the commit if fixes are necessary.
Rebasing (or any other form of rewriting) a branch that others have based work on is a bad idea: anyone downstream of it is forced to manually fix their history. This section explains how to do the fix from the downstream’s point of view. The real fix, however, would be to avoid rebasing the upstream in the first place.
To illustrate, suppose you are in a situation where someone develops a subsystem branch, and you are working on a topic that is dependent on this subsystem. You might end up with a history like the following:
o---o---o---o---o---o---o---o  master \ o---o---o---o---o  subsystem \ *---*---*  topic
If subsystem is rebased against master, the following happens:
o---o---o---o---o---o---o---o  master \                       \ o---o---o---o---o       o'--o'--o'--o'--o'  subsystem \ *---*---*  topic
If you now continue development as usual, and eventually merge topic to subsystem, the commits from subsystem will remain duplicated forever:
o---o---o---o---o---o---o---o  master \                       \ o---o---o---o---o       o'--o'--o'--o'--o'--M  subsystem \                         / *---*---*-..........-*--*  topic
Such duplicates are generally frowned upon because they clutter up history, making it harder to follow. To clean things up, you need to transplant the commits on topic to the new subsystem tip, i.e., rebase topic. This becomes a ripple effect: anyone downstream from topic is forced to rebase too, and so on!
There are two kinds of fixes, discussed in the following subsections:
Easy case: The changes are literally the same. This happens if the subsystem rebase was a simple rebase and had no conflicts.
Hard case: The changes are not the same. This happens if the subsystem rebase had conflicts, or used --interactive to omit, edit, squash, or fixup commits; or if the upstream used one of commit --amend, reset, or a full history rewriting command like filter-repo[2].
The easy case 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 changes that are already present in the new upstream (unless --reapply-cherry-picks is given). So if you say (assuming you’re on topic)
$ git rebase subsystem
you will end up with the fixed history
o---o---o---o---o---o---o---o  master \ o'--o'--o'--o'--o'  subsystem \ *---*---*  topic
The hard case Things get more complicated if the subsystem changes do not exactly correspond to the ones before the rebase.
Note While an "easy case recovery" sometimes appears to be successful even in the hard case, it may have unintended consequences. For 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 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 subsystem is at subsystem@{1}. Subsequent fetches will increase the number. (See git-reflog(1).)
•   Relative to the tip of topic: knowing that your topic has three commits, the old tip of subsystem must be topic~3.
You can then transplant the old subsystem..topic to the new tip by saying (for the reflog case, and assuming you are on topic already):
$ git rebase --onto subsystem subsystem@{1}
The ripple effect of a "hard case" recovery is especially bad: everyone downstream from topic will now have to perform a "hard case" recovery too!
The interactive rebase command was originally designed to handle individual patch series. As such, it makes sense to exclude merge commits from the todo list, as the developer may have merged the then-current master while working on the branch, only to rebase all the commits onto master eventually (skipping the merge commits).
However, there are legitimate reasons why a developer may want to recreate merge commits: to keep the branch structure (or "commit topology") when working on multiple, inter-related branches.
In the following example, the developer works on a topic branch that refactors the way buttons are defined, and on another topic branch that uses that refactoring to implement a "Report a bug" button. The output of git log --graph --format=%s -5 may look like this:
*   Merge branch 'report-a-bug' |\ | * Add the feedback button * | Merge branch 'refactor-button' |\ \ | |/ | * Use the Button class for all buttons | * Extract a generic Button class from the DownloadButton one
The developer might want to rebase those commits to a newer master while keeping the branch topology, for example when the first topic branch is expected to be integrated into master much earlier than the second one, say, to resolve merge conflicts with changes to the DownloadButton class that made it into master.
This rebase can be performed using the --rebase-merges option. It will generate a todo list looking like this:
label onto
# Branch: refactor-button reset onto pick 123456 Extract a generic Button class from the DownloadButton one pick 654321 Use the Button class for all buttons label refactor-button
# Branch: report-a-bug reset refactor-button # Use the Button class for all buttons pick abcdef Add the feedback button label report-a-bug
reset onto merge -C a1b2c3 refactor-button # Merge 'refactor-button' merge -C 6f5e4d report-a-bug # Merge 'report-a-bug'
In contrast to a regular interactive rebase, there are label, reset and merge commands in addition to pick ones.
The label command associates a label with the current HEAD when that command is executed. These labels are created as worktree-local refs (refs/rewritten/<label>) that will be deleted when the rebase finishes. That way, rebase operations in multiple worktrees linked to the same repository do not interfere with one another. If the label command fails, it is rescheduled immediately, with a helpful message how to proceed.
The reset command resets the HEAD, index and worktree to the specified revision. It is similar to an exec git reset --hard <label>, but refuses to overwrite untracked files. If the reset command fails, it is rescheduled immediately, with a helpful message how to edit the todo list (this typically happens when a reset command was inserted into the todo list manually and contains a typo).
The merge command will merge the specified revision(s) into whatever is HEAD at that time. With -C <original-commit>, the commit message of the specified merge commit will be used. When the -C is changed to a lower-case -c, the message will be opened in an editor after a successful merge so that the user can edit the message.
If a merge command fails for any reason other than merge conflicts (i.e. when the merge operation did not even start), it is rescheduled immediately.
By default, the merge command will use the ort merge strategy for regular merges, and octopus for octopus merges. One can specify a default strategy for all merges using the --strategy argument when invoking rebase, or can override specific merges in the interactive list of commands by using an exec command to call git merge explicitly with a --strategy argument. Note that when calling git merge explicitly like this, you can make use of the fact that the labels are worktree-local refs (the ref refs/rewritten/onto would correspond to the label onto, for example) in order to refer to the branches you want to merge.
Note: the first command (label onto) labels the revision onto which the commits are rebased; The name onto is just a convention, as a nod to the --onto option.
It is also possible to introduce completely new merge commits from scratch by adding a command of the form merge <merge-head>. This form will generate a tentative commit message and always open an editor to let the user edit it. This can be useful e.g. when a topic branch turns out to address more than a single concern and wants to be split into two or even more topic branches. Consider this todo list:
pick 192837 Switch from GNU Makefiles to CMake pick 5a6c7e Document the switch to CMake pick 918273 Fix detection of OpenSSL in CMake pick afbecd http: add support for TLS v1.3 pick fdbaec Fix detection of cURL in CMake on Windows
The one commit in this list that is not related to CMake may very well have been motivated by working on fixing all those bugs introduced by switching to CMake, but it addresses a different concern. To split this branch into two topic branches, the todo list could be edited like this:
pick afbecd http: add support for TLS v1.3 label tlsv1.3
reset onto pick 192837 Switch from GNU Makefiles to CMake pick 918273 Fix detection of OpenSSL in CMake pick fdbaec Fix detection of cURL in CMake on Windows pick 5a6c7e Document the switch to CMake label cmake
reset onto merge tlsv1.3 merge cmake
rebase.backend Default backend to use for rebasing. Possible choices are apply or merge. In the future, if the merge backend gains all remaining capabilities of the apply backend, this setting may become unused.
rebase.stat Whether to show a diffstat of what changed upstream since the last rebase. False by default.
rebase.autoSquash If set to true enable --autosquash option by default.
rebase.autoStash When set to true, automatically create a temporary stash entry before the operation begins, and apply it after the operation ends. This means that you can run rebase on a dirty worktree. However, use with care: the final stash application after a successful rebase might result in non-trivial conflicts. This option can be overridden by the --no-autostash and --autostash options of git-rebase(1). Defaults to false.
rebase.missingCommitsCheck If set to "warn", git rebase -i will print a warning if some commits are removed (e.g. a line was deleted), however the rebase will still proceed. If set to "error", it will print the previous warning and stop the rebase, git rebase --edit-todo can then be used to correct the error. If set to "ignore", no checking is done. To drop a commit without warning or error, use the drop command in the todo list. Defaults to "ignore".
rebase.instructionFormat A format string, as specified in git-log(1), to be used for the todo list during an interactive rebase. The format will automatically have the long commit hash prepended to the format.
rebase.abbreviateCommands If set to true, git rebase will use abbreviated command names in the todo list resulting in something like this:
p deadbee The oneline of the commit p fa1afe1 The oneline of the next commit ...
instead of:
pick deadbee The oneline of the commit pick fa1afe1 The oneline of the next commit ...
Defaults to false.
rebase.rescheduleFailedExec Automatically reschedule exec commands that failed. This only makes sense in interactive mode (or when an --exec option was provided). This is the same as specifying the --reschedule-failed-exec option.
rebase.forkPoint If set to false set --no-fork-point option by default.
sequence.editor Text editor used by git rebase -i for editing the rebase instruction file. The value is meant to be interpreted by the shell when it is used. It can be overridden by the GIT_SEQUENCE_EDITOR environment variable. When not configured the default commit message editor is used instead.
PUP(1)                       General Commands Manual                      PUP(1)
pup - gtk+ based graphical Printer Utility Program
pup is a GUI utility for maintaining your printer under Linux or any Unix O/S that supports GTK+ . For uni-directional mode it supports the Lexmark Optra Color 40 and 45, Lexmark Optra E310, HP 2100M, HP 4000, and HP LJ4 Plus. For bi-directional mode it supports any PJL printer (or partially, depending on the printer).
Current features include ink cartridge setup and maintainance (Lexmark Optra 40/45 only), printing of various test pages, printer status, and changing printer default settings. There are two ways to change the settings: the "dynamic choices" and the "fixed choices" methods. The dynamic choices method queries the printer, filters out some things, and builds a list of choices for you to change settings. Current settings are high-lighted in red. There is also the feature to query the printer to see all settings unfiltered, for information only.
The fixed choices method is for the specific printers listed above, and are based on queries done before hand on these printers and hard-coded into Pup.  This is for those folks who do not have read-back available on their system, as it works in uni-directional mode.
The printer can be selected in Pup's Preferences window (under File).
Pup sends the appropriate commands to whatever is listed in the output box-- either a printer device, a file, or an lpr command (when preceeded with a '|'). If a file is used, this file can then be ftp'd to a remote printer or sent to the device directly (e.g. /dev/lp0) with the cat command. In dynamic mode, however, Pup requires a device.
The help window describes all the features of pup. To view it, bring up pup, go to the Help menu and select 'Info'. Also consult the README file that came with pup.
This manual page was written by Matthew Simpson <matthewsimpson@home.com>, for the Debian GNU/Linux system (but may be used by others).
lsscsi(8)                            LSSCSI                            lsscsi(8)
lsscsi - list SCSI devices (or hosts), list NVMe devices
lsscsi [--brief] [--classic] [--controllers] [--device] [--generic] [--help] [--hosts] [--kname] [--list] [--long] [--long-unit] [--lunhex] [--no-nvme] [--pdt] [--protection] [--protmode] [--scsi_id] [--size] [--sysfsroot=PATH] [--sz-lbs] [--transport] [--unit] [--verbose] [--version] [--wwn] [H:C:T:L]
Uses information in sysfs (Linux kernel series 2.6 and later) to list SCSI devices (or hosts) currently attached to the system. Many non-SCSI storage devices (but not all) used the SCSI subsystem in Linux. In lsscsi version 0.30 support was added to list NVMe devices.
In single line per device (LU or NVMe namespace) mode, the default, each line starts with a 4 element tuple surrounded by square brackets. For SCSI devices the first element 'H' is the host number, the second element 'C' is the controller number, the third element 'T' is the target number and the final element is the Logical Unit Number (LUN). All four are integers.  For NVMe namespaces see two paragraphs down. When the --hosts option is given for SCSI devices the tuple is reduced to one element: the host number.
If a H:C:T:L tuple is given as an argument on the command line then it acts as a filter and only devices that match it are listed. The colons don't have to be present, and '-', '*', '?' or missing components at the end are interpreted as wildcards. The default is '*:*:*:*' which means to match devices (i.e.  Logical Units). Any filter string using '*' of '?' should be surrounded by single or double quotes to stop shell expansions. If '-' is used as a wildcard then the whole filter tuple should be prefixed by '-- ' to tell this utility there are no more options on the command line to be interpreted.  A leading '[' and trailing ']' are permitted ( e.g. '[1:0:0]' matches all LUNs on 1:0:0). May also be used to filter --hosts in which case only the H is active and may be either a number or in the form "host<n>" where <n> is a host number.
For NVMe devices and controllers almost all of the previous paragraph applies. The main difference is that "N" appears in the 'H' (first) position.  The 'C' position for NVMe is the controller's Linux generated "char" device minor number which is the first number that appears in a typical NVMe controller name, for example: "/dev/nvme2". The 'T' position for NVMe is the "CNTLID" value. The final 'L' position is the NVMe namespace identifier which is typically a sequential value starting at 1. The leading explicit "N" for NVMe devices is converted internally into a large value (32,767) that should not interfere with any Linux generated SCSI host number; it also means that the numeric sort used to show hosts (controllers) and devices (LUs or logical units) will always place NVMe devices and controllers after those that use the SCSI subsystem. To filter using a H:C:T:L argument for NVMe controllers, "hostN", "hostN:<num>", "N" or "N:<num>" may be used; when no "<num>" is given, only NVMe controllers will be listed (i.e. it lists no SCSI hosts (HBAs)).
By default in this utility device node names (e.g. "/dev/sda" or "/dev/root_disk") are obtained by noting the major and minor numbers for the listed device obtained from sysfs (e.g. the contents of "/sys/block/sda/dev") and then looking for a match in the "/dev" directory. This "match by major and minor" will allow devices that have been given a different name by udev (for example) to be correctly reported by this utility.
In some situations it may be useful to see the device node name that Linux would produce by default, so the --kname option is provided.  An example of where this may be useful is kernel error logs which tend to report disk error messages using the disk's default kernel name.
Arguments to long options are mandatory for short options as well. The options are arranged in alphabetical order based on the long option name. Hyphenated long options can also take underscore, and vice versa (e.g. --scsi_id or --scsi-id are acceptable).
-b, --brief reduces one line per device output to the tuple and the primary device name.  This may simplify scripts that process the output of this utility. With the --generic option it will show on each line the tuple (from which the bsg pass-through device name can be deduced), the primary device name (which the block subsystem uses) and the sg device name (also a pass-through). When the --pdt option is used together with this option the SCSI Peripheral Device Type (PDT) is displayed in hex (with a leading "0x") between the tuple and the primary device name. For NVMe namespaces "0x0" is displayed (for a disk or direct access device).
-c, --classic The output is similar to that obtained from 'cat /proc/scsi/scsi'
-C, --controllers Lists NVMe controllers and SCSI hosts. This is a synonym for the --hosts option.
-d, --device After outputting the (probable) SCSI device name the device node major and minor numbers are shown in brackets (e.g. "/dev/sda[8:0]").
-g, --generic Output the SCSI generic device file name. Note that if the sg driver is a module it may need to be loaded otherwise '-' may appear. NVMe does not have generic (char) devices in the same sense as SCSI.  Instead NVMe Admin, NVM (i.e. block type commands such as Read and Write) and MI (Management Interface (e.g. to an enclosure)) commands are all sent to the containing controller whose device name is shown when the --hosts option is used. To unclutter the single line per device mode the --brief option combined with this option should help.
-h, --help Output the usage message and exit.
-H, --hosts List the SCSI hosts and NVMe controllers currently attached to the system. If this option is not given (and the --controllers option is not given) then SCSI devices (logical units (LUs)) followed by NVMe devices (namespaces) are listed.
-k, --kname Use Linux default algorithm for naming devices (e.g. block major 8, minor 0 is "/dev/sda") rather than the "match by major and minor" in the "/dev" directory as discussed above.
-L, --list Output additional information in <attribute_name>=<value> pairs, one pair per line preceded by two spaces. This option has the same effect as '-lll'.
-l, --long Output additional information for each SCSI device (host). Can be used multiple times for more output in which case the shorter option form is more convenient (e.g. '-lll'). When used three times (i.e. '-lll') outputs SCSI device (host) attributes one per line; preceded by two spaces; in the form "<attribute_name>=<value>".
-U, --long-unit Output logical unit name in full, if available. It replaces the normal vendor, product and revision strings given in the single logical unit per line mode. If no logical unit name is found "none" is printed. If the logical unit name is long (e.g. a UUID) then following fields are pushed further to the right as required. This option is functionally equivalent to the '-uuu' option. If the option is used twice (e.g. '-UU') then EUI, NAA, UUID and T10 vendor ID formats are prefixed by "eui.", "naa.", "uuid." and "t10." respectively.  Note that SCSI name format used by iSCSI should already be prefixed by 'iqn.'. Using the '--unit' option 4 or more times (e.g. '-uuuu') will have the same action as '-UU'. --long_unit is also an acceptable form when invoking this option.
-x, --lunhex when this option is used once the LUN in the tuple (at the start of each device line) is shown in "T10" format which is up to 16 hexadecimal digits. It is prefixed by "0x" to distinguish the LUN from the decimal value shown in the absence of this option. Also hierarchal LUNs are shown with a "_" character separating the levels. For example the two level LUN: 0x0355006600000000 will appear as 0x0355_0066. If this option is given twice (e.g. using the short form: '-xx') then the full 16 hexadecimal digits are shown for each LUN, prefixed by "0x". For NVMe, the namespace identifier (nsid) is shown in the "L" position. The nsid is a 32 bit unsigned quantities with 0x0 and 0xffffffff reserved.  Without this option, the nsid is shown in decimal. When this option is used once the nsid is output in hex with a lead 0x and with up to 3 leading zeros.  When this option is used twice the nsid is output in hex with up to 7 leading zeros.
-N, --no-nvme this option excludes NVMe devices and controllers for the output. This option may be needed to stop NVMe device output interfering with specific format output like that produced when the --classic option is used. To only show NVMe devices, use 'lsscsi N', to only show NVMe controllers, use 'lsscsi -H N'.
-D, --pdt this option displays the SCSI Peripheral Device Type (PDT) in hex preceded by "0x". For NVME namespaces "0x0' is displayed which corresponds to a disk ("Direct Access Device" or SSD). In single line output this hex PDT replaces the device type abbreviation (e.g. "0x0     " replaces "disk    ") and appears after the tuple.
-p, --protection Output target (DIF) and initiator (DIX) protection types.
-P, --protmode Output effective protection information mode for each disk device.
-i, --scsi_id outputs the udev derived matching id found in /dev/disk/by-id/scsi* .  This is only for disk (and disk like) devices. If no match is found then "dm-uuid-mpath*" and "usb*" are searched in the same directory.  If there is still no match then the /sys/class/block/<disk>/holders directory is searched. The matching id is printed following the device name (e.g.  /dev/sdc) and if there is no match "-" is output. Note that only disk (like) devices are matched by this option; so, for example, a SCSI enclosure will have an identifier of '-'. Prior to revision 164 the first match in /dev/disk/by-id/scsi* was printed. A change was added at that point to check for identifiers in a specific order as some are considered "stronger" than others. See the ORDER OF SCSI IDENTIFIERS section below.
-s, --size Print disk capacity in human readable form. When given once, normal base 10 SI units are used as a prefix for 'B' which is bytes (aka octets).  For example MB, GB and TB stand for 10^6, 10^9 and 10^12 bytes respectively. When given twice, IEC 80000-3 prefixes for 'B' are used; for example MiB, GiB and TiB stand for 2^20, 2^30 and 2^40 bytes respectively. The output is rounded to 3 or less significant figures in order to fit on a single line.  It will also output the size of RBC devices, CD/DVD media and host managed ZBC disks. Host aware ZBC disks have their "peripheral device type" set to 0 (the same as normal disks) so their size is output. If given three times (short form is the more convenient: '-sss') then the disk capacity as a logical block count is given. This is an exact figure in decimal reported by the storage device at discovery. Discovery is typically just after boot time, or when it was last attached if the storage device is removable. To unclutter the single line per device mode the --brief option combined with this option should help.
-y, --sysfsroot=PATH assumes sysfs is mounted at PATH instead of the default '/sys' . If this option is given PATH should be an absolute path (i.e. start with '/').
-S, --sz-lbs Print disk capacity as a number of logical blocks (which is the same as '-sss'). When used twice a comma is added followed by the logical block size in bytes. It should be a number like 512 or 4096. If the logical block size cannot be found (e.g. because the version of Linux predates the /sys/block/<dev_name>/queue directory) then the number of 512 byte blocks followed comma and then '512' is output irrespective of what the true logical block size of the device is. This special case action occurs whether this option is given one or more times. To unclutter the single line per device mode the --brief option combined with this option should help.
-t, --transport Output transport information. This will be target related information or, if --hosts is given, initiator related information. When used without --list, a name or identifier (or both) are output on a single line, usually prefixed by the type of transport. For devices this information replaces the normal vendor, product and revision strings. When the --list option is also given then additionally multiple lines of attribute_name=value pairs are output, each indented by two spaces. See the section on transports below.
-u, --unit Output logical unit name, if available. If this option is given once or twice, then the 30 character field where the vendor, product and revision strings are usually placed is expanded to 32 characters and replaced by the logical unit name. If no logical unit name is found "none" is printed.  The first found of the NAA, EUI-64 or SCSI name string is output unless a SCSI name string is found and the associated target port indicates the iSCSI protocol, in which case the SCSI name string is preferred. Finally if there is no match on the above and a T10 Vendor ID descriptor is found then it is used. If the name cannot fit in the 32 character field then it is truncated to the right and a trailing '_' character is used to alert the reader to the truncation. The 32 character width is chosen since that is large enough to hold 16 byte NAA or EUI-64 identifiers. However SCSI name strings as used by iSCSI can be larger than that. If this option is used twice then this field is also 32 character wide. If the logical unit name cannot fit then it will be truncated to the left and a leading '_' character is used to alert the reader to the truncation. If this option is used three times the whole logical unit name is output, followed by several spaces. In order for this option to work, it needs a Linux kernel from and including 3.15 . It accesses the sysfs vpd_pg83 file for the device in question. Old SCSI and ATA (SATA) equipment may not provide this information. If it is provided by ATA (SATA) then it will be the WWN.
-v, --verbose outputs directory names where information is found. Use multiple times for more output.
-V, --version outputs version information then exits. If used once outputs to stderr; if used twice outputs to stdout and shortens the date to yyyymmdd numeric format. The first number in the version string is the release number.