config

Personal configuration.
git clone git://code.dwrz.net/config
Log | Files | Refs

magit.info (540304B)


      1 This is magit.info, produced by makeinfo version 6.7 from magit.texi.
      2 
      3      Copyright (C) 2015-2024 Jonas Bernoulli
      4      <emacs.magit@jonas.bernoulli.dev>
      5 
      6      You can redistribute this document and/or modify it under the terms
      7      of the GNU General Public License as published by the Free Software
      8      Foundation, either version 3 of the License, or (at your option)
      9      any later version.
     10 
     11      This document is distributed in the hope that it will be useful,
     12      but WITHOUT ANY WARRANTY; without even the implied warranty of
     13      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     14      General Public License for more details.
     15 
     16 INFO-DIR-SECTION Emacs
     17 START-INFO-DIR-ENTRY
     18 * Magit: (magit).       Using Git from Emacs with Magit.
     19 END-INFO-DIR-ENTRY
     20 
     21 
     22 File: magit.info,  Node: Top,  Next: Introduction,  Up: (dir)
     23 
     24 Magit User Manual
     25 *****************
     26 
     27 Magit is an interface to the version control system Git, implemented as
     28 an Emacs package.  Magit aspires to be a complete Git porcelain.  While
     29 we cannot (yet) claim that Magit wraps and improves upon each and every
     30 Git command, it is complete enough to allow even experienced Git users
     31 to perform almost all of their daily version control tasks directly from
     32 within Emacs.  While many fine Git clients exist, only Magit and Git
     33 itself deserve to be called porcelains.
     34 
     35 This manual is for Magit version 3.3.0.50-git.
     36 
     37      Copyright (C) 2015-2024 Jonas Bernoulli
     38      <emacs.magit@jonas.bernoulli.dev>
     39 
     40      You can redistribute this document and/or modify it under the terms
     41      of the GNU General Public License as published by the Free Software
     42      Foundation, either version 3 of the License, or (at your option)
     43      any later version.
     44 
     45      This document is distributed in the hope that it will be useful,
     46      but WITHOUT ANY WARRANTY; without even the implied warranty of
     47      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     48      General Public License for more details.
     49 
     50 * Menu:
     51 
     52 * Introduction::
     53 * Installation::
     54 * Getting Started::
     55 * Interface Concepts::
     56 * Inspecting::
     57 * Manipulating::
     58 * Transferring::
     59 * Miscellaneous::
     60 * Customizing::
     61 * Plumbing::
     62 * FAQ::
     63 * Debugging Tools::
     64 * Keystroke Index::
     65 * Function and Command Index::
     66 * Variable Index::
     67 
     68 — The Detailed Node Listing —
     69 
     70 Installation
     71 
     72 * Installing from Melpa::
     73 * Installing from the Git Repository::
     74 * Post-Installation Tasks::
     75 
     76 Interface Concepts
     77 
     78 * Modes and Buffers::
     79 * Sections::
     80 * Transient Commands::
     81 * Transient Arguments and Buffer Variables::
     82 * Completion, Confirmation and the Selection: Completion Confirmation and the Selection.
     83 * Mouse Support::
     84 * Running Git::
     85 
     86 Modes and Buffers
     87 
     88 * Switching Buffers::
     89 * Naming Buffers::
     90 * Quitting Windows::
     91 * Automatic Refreshing of Magit Buffers::
     92 * Automatic Saving of File-Visiting Buffers::
     93 * Automatic Reverting of File-Visiting Buffers::
     94 
     95 
     96 Sections
     97 
     98 * Section Movement::
     99 * Section Visibility::
    100 * Section Hooks::
    101 * Section Types and Values::
    102 * Section Options::
    103 
    104 
    105 Completion, Confirmation and the Selection
    106 
    107 * Action Confirmation::
    108 * Completion and Confirmation::
    109 * The Selection::
    110 * The hunk-internal region::
    111 * Support for Completion Frameworks::
    112 * Additional Completion Options::
    113 
    114 
    115 Running Git
    116 
    117 * Viewing Git Output::
    118 * Git Process Status::
    119 * Running Git Manually::
    120 * Git Executable::
    121 * Global Git Arguments::
    122 
    123 
    124 Inspecting
    125 
    126 * Status Buffer::
    127 * Repository List::
    128 * Logging::
    129 * Diffing::
    130 * Ediffing::
    131 * References Buffer::
    132 * Bisecting::
    133 * Visiting Files and Blobs::
    134 * Blaming::
    135 
    136 Status Buffer
    137 
    138 * Status Sections::
    139 * Status Header Sections::
    140 * Status Module Sections::
    141 * Status Options::
    142 
    143 
    144 Logging
    145 
    146 * Refreshing Logs::
    147 * Log Buffer::
    148 * Log Margin::
    149 * Select from Log::
    150 * Reflog::
    151 * Cherries::
    152 
    153 
    154 Diffing
    155 
    156 * Refreshing Diffs::
    157 * Commands Available in Diffs::
    158 * Diff Options::
    159 * Revision Buffer::
    160 
    161 
    162 References Buffer
    163 
    164 * References Sections::
    165 
    166 
    167 Visiting Files and Blobs
    168 
    169 * General-Purpose Visit Commands::
    170 * Visiting Files and Blobs from a Diff::
    171 
    172 
    173 Manipulating
    174 
    175 * Creating Repository::
    176 * Cloning Repository::
    177 * Staging and Unstaging::
    178 * Applying::
    179 * Committing::
    180 * Branching::
    181 * Merging::
    182 * Resolving Conflicts::
    183 * Rebasing::
    184 * Cherry Picking::
    185 * Resetting::
    186 * Stashing::
    187 
    188 Staging and Unstaging
    189 
    190 * Staging from File-Visiting Buffers::
    191 
    192 
    193 Committing
    194 
    195 * Initiating a Commit::
    196 * Editing Commit Messages::
    197 
    198 
    199 Branching
    200 
    201 * The Two Remotes::
    202 * Branch Commands::
    203 * Branch Git Variables::
    204 * Auxiliary Branch Commands::
    205 
    206 
    207 Rebasing
    208 
    209 * Editing Rebase Sequences::
    210 * Information About In-Progress Rebase::
    211 
    212 
    213 Cherry Picking
    214 
    215 * Reverting::
    216 
    217 
    218 Transferring
    219 
    220 * Remotes::
    221 * Fetching::
    222 * Pulling::
    223 * Pushing::
    224 * Plain Patches::
    225 * Maildir Patches::
    226 
    227 Remotes
    228 
    229 * Remote Commands::
    230 * Remote Git Variables::
    231 
    232 
    233 Miscellaneous
    234 
    235 * Tagging::
    236 * Notes::
    237 * Submodules::
    238 * Subtree::
    239 * Worktree::
    240 * Sparse checkouts::
    241 * Bundle::
    242 * Common Commands::
    243 * Wip Modes::
    244 * Commands for Buffers Visiting Files::
    245 * Minor Mode for Buffers Visiting Blobs::
    246 
    247 Submodules
    248 
    249 * Listing Submodules::
    250 * Submodule Transient::
    251 
    252 
    253 Wip Modes
    254 
    255 * Wip Graph::
    256 * Legacy Wip Modes::
    257 
    258 
    259 Customizing
    260 
    261 * Per-Repository Configuration::
    262 * Essential Settings::
    263 
    264 Essential Settings
    265 
    266 * Safety::
    267 * Performance::
    268 * Global Bindings::
    269 
    270 
    271 Plumbing
    272 
    273 * Calling Git::
    274 * Section Plumbing::
    275 * Refreshing Buffers::
    276 * Conventions::
    277 
    278 Calling Git
    279 
    280 * Getting a Value from Git::
    281 * Calling Git for Effect::
    282 
    283 
    284 Section Plumbing
    285 
    286 * Creating Sections::
    287 * Section Selection::
    288 * Matching Sections::
    289 
    290 
    291 Conventions
    292 
    293 * Theming Faces::
    294 
    295 
    296 FAQ
    297 
    298 * FAQ - How to ...?::
    299 * FAQ - Issues and Errors::
    300 
    301 FAQ - How to ...?
    302 
    303 * How to pronounce Magit?::
    304 * How to show git's output?::
    305 * How to install the gitman info manual?::
    306 * How to show diffs for gpg-encrypted files?::
    307 * How does branching and pushing work?::
    308 * Should I disable VC?::
    309 
    310 
    311 FAQ - Issues and Errors
    312 
    313 * Magit is slow::
    314 * I changed several thousand files at once and now Magit is unusable::
    315 * I am having problems committing::
    316 * I am using MS Windows and cannot push with Magit::
    317 * I am using macOS and SOMETHING works in shell, but not in Magit: I am using macOS and SOMETHING works in shell but not in Magit.
    318 * Expanding a file to show the diff causes it to disappear::
    319 * Point is wrong in the COMMIT_EDITMSG buffer::
    320 * The mode-line information isn't always up-to-date::
    321 * A branch and tag sharing the same name breaks SOMETHING::
    322 * My Git hooks work on the command-line but not inside Magit::
    323 * git-commit-mode isn't used when committing from the command-line::
    324 * Point ends up inside invisible text when jumping to a file-visiting buffer::
    325 * I am no longer able to save popup defaults::
    326 
    327 
    328 
    329 
    330 File: magit.info,  Node: Introduction,  Next: Installation,  Prev: Top,  Up: Top
    331 
    332 1 Introduction
    333 **************
    334 
    335 Magit is an interface to the version control system Git, implemented as
    336 an Emacs package.  Magit aspires to be a complete Git porcelain.  While
    337 we cannot (yet) claim that Magit wraps and improves upon each and every
    338 Git command, it is complete enough to allow even experienced Git users
    339 to perform almost all of their daily version control tasks directly from
    340 within Emacs.  While many fine Git clients exist, only Magit and Git
    341 itself deserve to be called porcelains.
    342 
    343    Staging and otherwise applying changes is one of the most important
    344 features in a Git porcelain and here Magit outshines anything else,
    345 including Git itself.  Git’s own staging interface (‘git add --patch’)
    346 is so cumbersome that many users only use it in exceptional cases.  In
    347 Magit staging a hunk or even just part of a hunk is as trivial as
    348 staging all changes made to a file.
    349 
    350    The most visible part of Magit’s interface is the status buffer,
    351 which displays information about the current repository.  Its content is
    352 created by running several Git commands and making their output
    353 actionable.  Among other things, it displays information about the
    354 current branch, lists unpulled and unpushed changes and contains
    355 sections displaying the staged and unstaged changes.  That might sound
    356 noisy, but, since sections are collapsible, it’s not.
    357 
    358    To stage or unstage a change one places the cursor on the change and
    359 then types ‘s’ or ‘u’.  The change can be a file or a hunk, or when the
    360 region is active (i.e., when there is a selection) several files or
    361 hunks, or even just part of a hunk.  The change or changes that these
    362 commands - and many others - would act on are highlighted.
    363 
    364    Magit also implements several other "apply variants" in addition to
    365 staging and unstaging.  One can discard or reverse a change, or apply it
    366 to the working tree.  Git’s own porcelain only supports this for staging
    367 and unstaging and you would have to do something like ‘git diff ... |
    368 ??? | git apply ...’ to discard, revert, or apply a single hunk on the
    369 command line.  In fact that’s exactly what Magit does internally (which
    370 is what lead to the term "apply variants").
    371 
    372    Magit isn’t just for Git experts, but it does assume some prior
    373 experience with Git as well as Emacs.  That being said, many users have
    374 reported that using Magit was what finally taught them what Git is
    375 capable of and how to use it to its fullest.  Other users wished they
    376 had switched to Emacs sooner so that they would have gotten their hands
    377 on Magit earlier.
    378 
    379    While one has to know the basic features of Emacs to be able to make
    380 full use of Magit, acquiring just enough Emacs skills doesn’t take long
    381 and is worth it, even for users who prefer other editors.  Vim users are
    382 advised to give Evil (https://github.com/emacs-evil/evil), the
    383 "Extensible VI Layer for Emacs", and Spacemacs
    384 (https://github.com/syl20bnr/spacemacs), an "Emacs starter-kit focused
    385 on Evil" a try.
    386 
    387    Magit provides a consistent and efficient Git porcelain.  After a
    388 short learning period, you will be able to perform most of your daily
    389 version control tasks faster than you would on the command line.  You
    390 will likely also start using features that seemed too daunting in the
    391 past.
    392 
    393    Magit fully embraces Git.  It exposes many advanced features using a
    394 simple but flexible interface instead of only wrapping the trivial ones
    395 like many GUI clients do.  Of course Magit supports logging, cloning,
    396 pushing, and other commands that usually don’t fail in spectacular ways;
    397 but it also supports tasks that often cannot be completed in a single
    398 step.  Magit fully supports tasks such as merging, rebasing,
    399 cherry-picking, reverting, and blaming by not only providing a command
    400 to initiate these tasks but also by displaying context sensitive
    401 information along the way and providing commands that are useful for
    402 resolving conflicts and resuming the sequence after doing so.
    403 
    404    Magit wraps and in many cases improves upon at least the following
    405 Git porcelain commands: ‘add’, ‘am’, ‘bisect’, ‘blame’, ‘branch’,
    406 ‘checkout’, ‘cherry’, ‘cherry-pick’, ‘clean’, ‘clone’, ‘commit’,
    407 ‘config’, ‘describe’, ‘diff’, ‘fetch’, ‘format-patch’, ‘init’, ‘log’,
    408 ‘merge’, ‘merge-tree’, ‘mv’, ‘notes’, ‘pull’, ‘rebase’, ‘reflog’,
    409 ‘remote’, ‘request-pull’, ‘reset’, ‘revert’, ‘rm’, ‘show’, ‘stash’,
    410 ‘submodule’, ‘subtree’, ‘tag’, and ‘worktree.’ Many more Magit porcelain
    411 commands are implemented on top of Git plumbing commands.
    412 
    413 
    414 File: magit.info,  Node: Installation,  Next: Getting Started,  Prev: Introduction,  Up: Top
    415 
    416 2 Installation
    417 **************
    418 
    419 Magit can be installed using Emacs’ package manager or manually from its
    420 development repository.
    421 
    422 * Menu:
    423 
    424 * Installing from Melpa::
    425 * Installing from the Git Repository::
    426 * Post-Installation Tasks::
    427 
    428 
    429 File: magit.info,  Node: Installing from Melpa,  Next: Installing from the Git Repository,  Up: Installation
    430 
    431 2.1 Installing from Melpa
    432 =========================
    433 
    434 Magit is available from Melpa and Melpa-Stable.  If you haven’t used
    435 Emacs’ package manager before, then it is high time you familiarize
    436 yourself with it by reading the documentation in the Emacs manual, see
    437 *note (emacs)Packages::.  Then add one of the archives to
    438 ‘package-archives’:
    439 
    440    • To use Melpa:
    441 
    442      (require 'package)
    443      (add-to-list 'package-archives
    444                   '("melpa" . "https://melpa.org/packages/") t)
    445 
    446    • To use Melpa-Stable:
    447 
    448      (require 'package)
    449      (add-to-list 'package-archives
    450                   '("melpa-stable" . "https://stable.melpa.org/packages/") t)
    451 
    452    Once you have added your preferred archive, you need to update the
    453 local package list using:
    454 
    455      M-x package-refresh-contents RET
    456 
    457    Once you have done that, you can install Magit and its dependencies
    458 using:
    459 
    460      M-x package-install RET magit RET
    461 
    462    Now see *note Post-Installation Tasks::.
    463 
    464 
    465 File: magit.info,  Node: Installing from the Git Repository,  Next: Post-Installation Tasks,  Prev: Installing from Melpa,  Up: Installation
    466 
    467 2.2 Installing from the Git Repository
    468 ======================================
    469 
    470 Magit depends on the ‘compat’, ‘dash’, ‘transient’ and ‘with-editor’
    471 libraries which are available from Melpa and Melpa-Stable.  Install them
    472 using ‘M-x package-install RET <package> RET’.  Of course you may also
    473 install them manually from their repository.
    474 
    475    Then clone the Magit repository:
    476 
    477      $ git clone https://github.com/magit/magit.git ~/.emacs.d/site-lisp/magit
    478      $ cd ~/.emacs.d/site-lisp/magit
    479 
    480    Then compile the libraries and generate the info manuals:
    481 
    482      $ make
    483 
    484    If you haven’t installed ‘compat’, ‘dash’, ‘transient’ and
    485 ‘with-editor’ from Melpa or at ‘/path/to/magit/../<package>’, then you
    486 have to tell ‘make’ where to find them.  To do so create the file
    487 ‘/path/to/magit/config.mk’ with the following content before running
    488 ‘make’:
    489 
    490      LOAD_PATH  = -L ~/.emacs.d/site-lisp/magit/lisp
    491      LOAD_PATH += -L ~/.emacs.d/site-lisp/dash
    492      LOAD_PATH += -L ~/.emacs.d/site-lisp/transient/lisp
    493      LOAD_PATH += -L ~/.emacs.d/site-lisp/with-editor/lisp
    494      LOAD_PATH += -L ~/.emacs.d/site-lisp/compat
    495 
    496    Finally add this to your init file:
    497 
    498      (add-to-list 'load-path "~/.emacs.d/site-lisp/magit/lisp")
    499      (require 'magit)
    500 
    501      (with-eval-after-load 'info
    502        (info-initialize)
    503        (add-to-list 'Info-directory-list
    504                     "~/.emacs.d/site-lisp/magit/Documentation/"))
    505 
    506    Of course if you installed the dependencies manually as well, then
    507 you have to tell Emacs about them too, by prefixing the above with:
    508 
    509      (add-to-list 'load-path "~/.emacs.d/site-lisp/dash")
    510      (add-to-list 'load-path "~/.emacs.d/site-lisp/transient/lisp")
    511      (add-to-list 'load-path "~/.emacs.d/site-lisp/with-editor")
    512 
    513    Note that you have to add the ‘lisp’ subdirectory to the ‘load-path’,
    514 not the top-level of the repository, and that elements of ‘load-path’
    515 should not end with a slash, while those of ‘Info-directory-list’
    516 should.
    517 
    518    Instead of requiring the feature ‘magit’, you could load just the
    519 autoload definitions, by loading the file ‘magit-autoloads.el’.
    520 
    521      (load "/path/to/magit/lisp/magit-autoloads")
    522 
    523    Instead of running Magit directly from the repository by adding that
    524 to the ‘load-path’, you might want to instead install it in some other
    525 directory using ‘sudo make install’ and setting ‘load-path’ accordingly.
    526 
    527    To update Magit use:
    528 
    529      $ git pull
    530      $ make
    531 
    532    At times it might be necessary to run ‘make clean all’ instead.
    533 
    534    To view all available targets use ‘make help’.
    535 
    536    Now see *note Post-Installation Tasks::.
    537 
    538 
    539 File: magit.info,  Node: Post-Installation Tasks,  Prev: Installing from the Git Repository,  Up: Installation
    540 
    541 2.3 Post-Installation Tasks
    542 ===========================
    543 
    544 After installing Magit you should verify that you are indeed using the
    545 Magit, Git, and Emacs releases you think you are using.  It’s best to
    546 restart Emacs before doing so, to make sure you are not using an
    547 outdated value for ‘load-path’.
    548 
    549      M-x magit-version RET
    550 
    551    should display something like
    552 
    553      Magit 2.8.0, Git 2.10.2, Emacs 25.1.1, gnu/linux
    554 
    555    Then you might also want to read about options that many users likely
    556 want to customize.  See *note Essential Settings::.
    557 
    558    To be able to follow cross references to Git manpages found in this
    559 manual, you might also have to manually install the ‘gitman’ info
    560 manual, or advice ‘Info-follow-nearest-node’ to instead open the actual
    561 manpage.  See *note How to install the gitman info manual?::.
    562 
    563    If you are completely new to Magit then see *note Getting Started::.
    564 
    565    If you run into problems, then please see the *note FAQ::.  Also see
    566 the *note Debugging Tools::.
    567 
    568    And last but not least please consider making a donation, to ensure
    569 that I can keep working on Magit.  See <https://magit.vc/donations>.
    570 for various donation options.
    571 
    572 
    573 File: magit.info,  Node: Getting Started,  Next: Interface Concepts,  Prev: Installation,  Up: Top
    574 
    575 3 Getting Started
    576 *****************
    577 
    578 This short tutorial describes the most essential features that many
    579 Magitians use on a daily basis.  It only scratches the surface but
    580 should be enough to get you started.
    581 
    582    IMPORTANT: It is safest if you clone some repository just for this
    583 tutorial.  Alternatively you can use an existing local repository, but
    584 if you do that, then you should commit all uncommitted changes before
    585 proceeding.
    586 
    587    Type ‘C-x g’ to display information about the current Git repository
    588 in a dedicated buffer, called the status buffer.
    589 
    590    Most Magit commands are commonly invoked from the status buffer.  It
    591 can be considered the primary interface for interacting with Git using
    592 Magit.  Many other Magit buffers may exist at a given time, but they are
    593 often created from this buffer.
    594 
    595    Depending on what state your repository is in, this buffer may
    596 contain sections titled "Staged changes", "Unstaged changes", "Unmerged
    597 into origin/master", "Unpushed to origin/master", and many others.
    598 
    599    Since we are starting from a safe state, which you can easily return
    600 to (by doing a ‘git reset --hard PRE-MAGIT-STATE’), there currently are
    601 no staged or unstaged changes.  Edit some files and save the changes.
    602 Then go back to the status buffer, while at the same time refreshing it,
    603 by typing ‘C-x g’.  (When the status buffer, or any Magit buffer for
    604 that matter, is the current buffer, then you can also use just ‘g’ to
    605 refresh it).
    606 
    607    Move between sections using ‘p’ and ‘n’.  Note that the bodies of
    608 some sections are hidden.  Type ‘TAB’ to expand or collapse the section
    609 at point.  You can also use ‘C-tab’ to cycle the visibility of the
    610 current section and its children.  Move to a file section inside the
    611 section named "Unstaged changes" and type ‘s’ to stage the changes you
    612 have made to that file.  That file now appears under "Staged changes".
    613 
    614    Magit can stage and unstage individual hunks, not just complete
    615 files.  Move to the file you have just staged, expand it using ‘TAB’,
    616 move to one of the hunks using ‘n’, and unstage just that by typing ‘u’.
    617 Note how the staging (‘s’) and unstaging (‘u’) commands operate on the
    618 change at point.  Many other commands behave the same way.
    619 
    620    You can also un-/stage just part of a hunk.  Inside the body of a
    621 hunk section (move there using ‘C-n’), set the mark using ‘C-SPC’ and
    622 move down until some added and/or removed lines fall inside the region
    623 but not all of them.  Again type ‘s’ to stage.
    624 
    625    It is also possible to un-/stage multiple files at once.  Move to a
    626 file section, type ‘C-SPC’, move to the next file using ‘n’, and then
    627 ‘s’ to stage both files.  Note that both the mark and point have to be
    628 on the headings of sibling sections for this to work.  If the region
    629 looks like it does in other buffers, then it doesn’t select Magit
    630 sections that can be acted on as a unit.
    631 
    632    And then of course you want to commit your changes.  Type ‘c’.  This
    633 shows the available commit commands and arguments in a buffer at the
    634 bottom of the frame.  Each command and argument is prefixed with the key
    635 that invokes/sets it.  Do not worry about this for now.  We want to
    636 create a "normal" commit, which is done by typing ‘c’ again.
    637 
    638    Now two new buffers appear.  One is for writing the commit message,
    639 the other shows a diff with the changes that you are about to commit.
    640 Write a message and then type ‘C-c C-c’ to actually create the commit.
    641 
    642    You probably don’t want to push the commit you just created because
    643 you just committed some random changes, but if that is not the case you
    644 could push it by typing ‘P’ to show all the available push commands and
    645 arguments and then ‘p’ to push to a branch with the same name as the
    646 local branch onto the remote configured as the push-remote.  (If the
    647 push-remote is not configured yet, then you would first be prompted for
    648 the remote to push to.)
    649 
    650    So far we have mentioned the commit and push menu commands.  These
    651 are probably among the menus you will be using the most, but many others
    652 exist.  To show a menu that lists all other menus (as well as the
    653 various apply commands and some other essential commands), type ‘h’.
    654 Try a few.  (Such menus are also called "transient prefix commands" or
    655 just "transients".)
    656 
    657    The key bindings in that menu correspond to the bindings in Magit
    658 buffers, including but not limited to the status buffer.  So you could
    659 type ‘h d’ to bring up the diff menu, but once you remember that "d"
    660 stands for "diff", you would usually do so by just typing ‘d’.
    661 
    662    This "prefix of prefixes" is useful even once you have memorized all
    663 the bindings, as it can provide easy access to Magit commands from
    664 non-Magit buffers.  So, by default, it is globally bound to ‘C-x M-g’.
    665 
    666    A similar menu featuring (for the most part) commands that act on
    667 just the file being visited in the current buffer, is globally bound to
    668 ‘C-c M-g’.  That binding can also be used in buffers, which do not visit
    669 a file, but then only a subset of the commands is available.
    670 
    671    The global key bindings mentioned in the previous two paragraphs are
    672 quite inconvenient.  We recommend using ‘C-c g’ and ‘C-c f’ instead, but
    673 cannot use those key sequences by default because they are strictly
    674 reserved for bindings added by the user.  See *note Global Bindings::,
    675 if you want to explicitly opt-in to the recommended key bindings.
    676 
    677    Magit also provides context menus and other mouse commands, see *note
    678 Mouse Support::.
    679 
    680    It is not necessary that you do so now, but if you stick with Magit,
    681 then it is highly recommended that you read the next section too.
    682 
    683 
    684 File: magit.info,  Node: Interface Concepts,  Next: Inspecting,  Prev: Getting Started,  Up: Top
    685 
    686 4 Interface Concepts
    687 ********************
    688 
    689 * Menu:
    690 
    691 * Modes and Buffers::
    692 * Sections::
    693 * Transient Commands::
    694 * Transient Arguments and Buffer Variables::
    695 * Completion, Confirmation and the Selection: Completion Confirmation and the Selection.
    696 * Mouse Support::
    697 * Running Git::
    698 
    699 
    700 File: magit.info,  Node: Modes and Buffers,  Next: Sections,  Up: Interface Concepts
    701 
    702 4.1 Modes and Buffers
    703 =====================
    704 
    705 Magit provides several major-modes.  For each of these modes there
    706 usually exists only one buffer per repository.  Separate modes and thus
    707 buffers exist for commits, diffs, logs, and some other things.
    708 
    709    Besides these special purpose buffers, there also exists an overview
    710 buffer, called the *status buffer*.  It’s usually from this buffer that
    711 the user invokes Git commands, or creates or visits other buffers.
    712 
    713    In this manual we often speak about "Magit buffers".  By that we mean
    714 buffers whose major-modes derive from ‘magit-mode’.
    715 
    716 ‘M-x magit-toggle-buffer-lock’
    717      This command locks the current buffer to its value or if the buffer
    718      is already locked, then it unlocks it.
    719 
    720      Locking a buffer to its value prevents it from being reused to
    721      display another value.  The name of a locked buffer contains its
    722      value, which allows telling it apart from other locked buffers and
    723      the unlocked buffer.
    724 
    725      Not all Magit buffers can be locked to their values; for example,
    726      it wouldn’t make sense to lock a status buffer.
    727 
    728      There can only be a single unlocked buffer using a certain
    729      major-mode per repository.  So when a buffer is being unlocked and
    730      another unlocked buffer already exists for that mode and
    731      repository, then the former buffer is instead deleted and the
    732      latter is displayed in its place.
    733 
    734 * Menu:
    735 
    736 * Switching Buffers::
    737 * Naming Buffers::
    738 * Quitting Windows::
    739 * Automatic Refreshing of Magit Buffers::
    740 * Automatic Saving of File-Visiting Buffers::
    741 * Automatic Reverting of File-Visiting Buffers::
    742 
    743 
    744 File: magit.info,  Node: Switching Buffers,  Next: Naming Buffers,  Up: Modes and Buffers
    745 
    746 4.1.1 Switching Buffers
    747 -----------------------
    748 
    749  -- Function: magit-display-buffer buffer &optional display-function
    750      This function is a wrapper around ‘display-buffer’ and is used to
    751      display any Magit buffer.  It displays BUFFER in some window and,
    752      unlike ‘display-buffer’, also selects that window, provided
    753      ‘magit-display-buffer-noselect’ is ‘nil’.  It also runs the hooks
    754      mentioned below.
    755 
    756      If optional DISPLAY-FUNCTION is non-nil, then that is used to
    757      display the buffer.  Usually that is ‘nil’ and the function
    758      specified by ‘magit-display-buffer-function’ is used.
    759 
    760  -- Variable: magit-display-buffer-noselect
    761      When this is non-nil, then ‘magit-display-buffer’ only displays the
    762      buffer but forgoes also selecting the window.  This variable should
    763      not be set globally, it is only intended to be let-bound, by code
    764      that automatically updates "the other window".  This is used for
    765      example when the revision buffer is updated when you move inside
    766      the log buffer.
    767 
    768  -- User Option: magit-display-buffer-function
    769      The function specified here is called by ‘magit-display-buffer’
    770      with one argument, a buffer, to actually display that buffer.  This
    771      function should call ‘display-buffer’ with that buffer as first and
    772      a list of display actions as second argument.
    773 
    774      Magit provides several functions, listed below, that are suitable
    775      values for this option.  If you want to use different rules, then a
    776      good way of doing that is to start with a copy of one of these
    777      functions and then adjust it to your needs.
    778 
    779      Instead of using a wrapper around ‘display-buffer’, that function
    780      itself can be used here, in which case the display actions have to
    781      be specified by adding them to ‘display-buffer-alist’ instead.
    782 
    783      To learn about display actions, see *note (elisp)Choosing Window::.
    784 
    785  -- Function: magit-display-buffer-traditional buffer
    786      This function is the current default value of the option
    787      ‘magit-display-buffer-function’.  Before that option and this
    788      function were added, the behavior was hard-coded in many places all
    789      over the code base but now all the rules are contained in this one
    790      function (except for the "noselect" special case mentioned above).
    791 
    792  -- Function: magit-display-buffer-same-window-except-diff-v1
    793      This function displays most buffers in the currently selected
    794      window.  If a buffer’s mode derives from ‘magit-diff-mode’ or
    795      ‘magit-process-mode’, it is displayed in another window.
    796 
    797  -- Function: magit-display-buffer-fullframe-status-v1
    798      This function fills the entire frame when displaying a status
    799      buffer.  Otherwise, it behaves like
    800      ‘magit-display-buffer-traditional’.
    801 
    802  -- Function: magit-display-buffer-fullframe-status-topleft-v1
    803      This function fills the entire frame when displaying a status
    804      buffer.  It behaves like ‘magit-display-buffer-fullframe-status-v1’
    805      except that it displays buffers that derive from ‘magit-diff-mode’
    806      or ‘magit-process-mode’ to the top or left of the current buffer
    807      rather than to the bottom or right.  As a result, Magit buffers
    808      tend to pop up on the same side as they would if
    809      ‘magit-display-buffer-traditional’ were in use.
    810 
    811  -- Function: magit-display-buffer-fullcolumn-most-v1
    812      This function displays most buffers so that they fill the entire
    813      height of the frame.  However, the buffer is displayed in another
    814      window if (1) the buffer’s mode derives from ‘magit-process-mode’,
    815      or (2) the buffer’s mode derives from ‘magit-diff-mode’, provided
    816      that the mode of the current buffer derives from ‘magit-log-mode’
    817      or ‘magit-cherry-mode’.
    818 
    819  -- User Option: magit-pre-display-buffer-hook
    820      This hook is run by ‘magit-display-buffer’ before displaying the
    821      buffer.
    822 
    823  -- Function: magit-save-window-configuration
    824      This function saves the current window configuration.  Later when
    825      the buffer is buried, it may be restored by
    826      ‘magit-restore-window-configuration’.
    827 
    828  -- User Option: magit-post-display-buffer-hook
    829      This hook is run by ‘magit-display-buffer’ after displaying the
    830      buffer.
    831 
    832  -- Function: magit-maybe-set-dedicated
    833      This function remembers if a new window had to be created to
    834      display the buffer, or whether an existing window was reused.  This
    835      information is later used by ‘magit-mode-quit-window’, to determine
    836      whether the window should be deleted when its last Magit buffer is
    837      buried.
    838 
    839 
    840 File: magit.info,  Node: Naming Buffers,  Next: Quitting Windows,  Prev: Switching Buffers,  Up: Modes and Buffers
    841 
    842 4.1.2 Naming Buffers
    843 --------------------
    844 
    845  -- User Option: magit-generate-buffer-name-function
    846      The function used to generate the names of Magit buffers.
    847 
    848      Such a function should take the options
    849      ‘magit-uniquify-buffer-names’ as well as ‘magit-buffer-name-format’
    850      into account.  If it doesn’t, then should be clearly stated in the
    851      doc-string.  And if it supports %-sequences beyond those mentioned
    852      in the doc-string of the option ‘magit-buffer-name-format’, then
    853      its own doc-string should describe the additions.
    854 
    855  -- Function: magit-generate-buffer-name-default-function mode
    856      This function returns a buffer name suitable for a buffer whose
    857      major-mode is MODE and which shows information about the repository
    858      in which ‘default-directory’ is located.
    859 
    860      This function uses ‘magit-buffer-name-format’ and supporting all of
    861      the %-sequences mentioned the documentation of that option.  It
    862      also respects the option ‘magit-uniquify-buffer-names’.
    863 
    864  -- User Option: magit-buffer-name-format
    865      The format string used to name Magit buffers.
    866 
    867      At least the following %-sequences are supported:
    868 
    869         • ‘%m’
    870 
    871           The name of the major-mode, but with the ‘-mode’ suffix
    872           removed.
    873 
    874         • ‘%M’
    875 
    876           Like ‘%m’ but abbreviate ‘magit-status-mode’ as ‘magit’.
    877 
    878         • ‘%v’
    879 
    880           The value the buffer is locked to, in parentheses, or an empty
    881           string if the buffer is not locked to a value.
    882 
    883         • ‘%V’
    884 
    885           Like ‘%v’, but the string is prefixed with a space, unless it
    886           is an empty string.
    887 
    888         • ‘%t’
    889 
    890           The top-level directory of the working tree of the repository,
    891           or if ‘magit-uniquify-buffer-names’ is non-nil an abbreviation
    892           of that.
    893 
    894         • ‘%x’
    895 
    896           If ‘magit-uniquify-buffer-names’ is nil "*", otherwise the
    897           empty string.  Due to limitations of the ‘uniquify’ package,
    898           buffer names must end with the path.
    899 
    900      The value should always contain ‘%m’ or ‘%M’, ‘%v’ or ‘%V’, and
    901      ‘%t’.  If ‘magit-uniquify-buffer-names’ is non-nil, then the value
    902      must end with ‘%t’ or ‘%t%x’.  See issue #2841.
    903 
    904  -- User Option: magit-uniquify-buffer-names
    905      This option controls whether the names of Magit buffers are
    906      uniquified.  If the names are not being uniquified, then they
    907      contain the full path of the top-level of the working tree of the
    908      corresponding repository.  If they are being uniquified, then they
    909      end with the basename of the top-level, or if that would conflict
    910      with the name used for other buffers, then the names of all these
    911      buffers are adjusted until they no longer conflict.
    912 
    913      This is done using the ‘uniquify’ package; customize its options to
    914      control how buffer names are uniquified.
    915 
    916 
    917 File: magit.info,  Node: Quitting Windows,  Next: Automatic Refreshing of Magit Buffers,  Prev: Naming Buffers,  Up: Modes and Buffers
    918 
    919 4.1.3 Quitting Windows
    920 ----------------------
    921 
    922 ‘q’ (‘magit-mode-bury-buffer’)
    923      This command buries or kills the current Magit buffer.  The
    924      function specified by option ‘magit-bury-buffer-function’ is used
    925      to bury the buffer when called without a prefix argument or to kill
    926      it when called with a single prefix argument.
    927 
    928      When called with two or more prefix arguments then it always kills
    929      all Magit buffers, associated with the current project, including
    930      the current buffer.
    931 
    932  -- User Option: magit-bury-buffer-function
    933      The function used to actually bury or kill the current buffer.
    934 
    935      ‘magit-mode-bury-buffer’ calls this function with one argument.  If
    936      the argument is non-nil, then the function has to kill the current
    937      buffer.  Otherwise it has to bury it alive.  The default value
    938      currently is ‘magit-mode-quit-window’.
    939 
    940  -- Function: magit-restore-window-configuration kill-buffer
    941      Bury or kill the current buffer using ‘quit-window’, which is
    942      called with KILL-BUFFER as first and the selected window as second
    943      argument.
    944 
    945      Then restore the window configuration that existed right before the
    946      current buffer was displayed in the selected frame.  Unfortunately
    947      that also means that point gets adjusted in all the buffers, which
    948      are being displayed in the selected frame.
    949 
    950  -- Function: magit-mode-quit-window kill-buffer
    951      Bury or kill the current buffer using ‘quit-window’, which is
    952      called with KILL-BUFFER as first and the selected window as second
    953      argument.
    954 
    955      Then, if the window was originally created to display a Magit
    956      buffer and the buried buffer was the last remaining Magit buffer
    957      that was ever displayed in the window, then that is deleted.
    958 
    959 
    960 File: magit.info,  Node: Automatic Refreshing of Magit Buffers,  Next: Automatic Saving of File-Visiting Buffers,  Prev: Quitting Windows,  Up: Modes and Buffers
    961 
    962 4.1.4 Automatic Refreshing of Magit Buffers
    963 -------------------------------------------
    964 
    965 After running a command which may change the state of the current
    966 repository, the current Magit buffer and the corresponding status buffer
    967 are refreshed.  The status buffer can be automatically refreshed
    968 whenever a buffer is saved to a file inside the respective repository by
    969 adding a hook, like so:
    970 
    971      (with-eval-after-load 'magit-mode
    972        (add-hook 'after-save-hook 'magit-after-save-refresh-status t))
    973 
    974    Automatically refreshing Magit buffers ensures that the displayed
    975 information is up-to-date most of the time but can lead to a noticeable
    976 delay in big repositories.  Other Magit buffers are not refreshed to
    977 keep the delay to a minimum and also because doing so can sometimes be
    978 undesirable.
    979 
    980    Buffers can also be refreshed explicitly, which is useful in buffers
    981 that weren’t current during the last refresh and after changes were made
    982 to the repository outside of Magit.
    983 
    984 ‘g’ (‘magit-refresh’)
    985      This command refreshes the current buffer if its major mode derives
    986      from ‘magit-mode’ as well as the corresponding status buffer.
    987 
    988      If the option ‘magit-revert-buffers’ calls for it, then it also
    989      reverts all unmodified buffers that visit files being tracked in
    990      the current repository.
    991 
    992 ‘G’ (‘magit-refresh-all’)
    993      This command refreshes all Magit buffers belonging to the current
    994      repository and also reverts all unmodified buffers that visit files
    995      being tracked in the current repository.
    996 
    997      The file-visiting buffers are always reverted, even if
    998      ‘magit-revert-buffers’ is nil.
    999 
   1000  -- User Option: magit-refresh-buffer-hook
   1001      This hook is run in each Magit buffer that was refreshed during the
   1002      current refresh - normally the current buffer and the status
   1003      buffer.
   1004 
   1005  -- User Option: magit-refresh-status-buffer
   1006      When this option is non-nil, then the status buffer is
   1007      automatically refreshed after running git for side-effects, in
   1008      addition to the current Magit buffer, which is always refreshed
   1009      automatically.
   1010 
   1011      Only set this to nil after exhausting all other options to improve
   1012      performance.
   1013 
   1014  -- Function: magit-after-save-refresh-status
   1015      This function is intended to be added to ‘after-save-hook’.  After
   1016      doing that the corresponding status buffer is refreshed whenever a
   1017      buffer is saved to a file inside a repository.
   1018 
   1019      Note that refreshing a Magit buffer is done by re-creating its
   1020      contents from scratch, which can be slow in large repositories.  If
   1021      you are not satisfied with Magit’s performance, then you should
   1022      obviously not add this function to that hook.
   1023 
   1024 
   1025 File: magit.info,  Node: Automatic Saving of File-Visiting Buffers,  Next: Automatic Reverting of File-Visiting Buffers,  Prev: Automatic Refreshing of Magit Buffers,  Up: Modes and Buffers
   1026 
   1027 4.1.5 Automatic Saving of File-Visiting Buffers
   1028 -----------------------------------------------
   1029 
   1030 File-visiting buffers are by default saved at certain points in time.
   1031 This doesn’t guarantee that Magit buffers are always up-to-date, but,
   1032 provided one only edits files by editing them in Emacs and uses only
   1033 Magit to interact with Git, one can be fairly confident.  When in doubt
   1034 or after outside changes, type ‘g’ (‘magit-refresh’) to save and refresh
   1035 explicitly.
   1036 
   1037  -- User Option: magit-save-repository-buffers
   1038      This option controls whether file-visiting buffers are saved before
   1039      certain events.
   1040 
   1041      If this is non-nil then all modified file-visiting buffers
   1042      belonging to the current repository may be saved before running
   1043      commands, before creating new Magit buffers, and before explicitly
   1044      refreshing such buffers.  If this is ‘dontask’ then this is done
   1045      without user intervention.  If it is ‘t’ then the user has to
   1046      confirm each save.
   1047 
   1048 
   1049 File: magit.info,  Node: Automatic Reverting of File-Visiting Buffers,  Prev: Automatic Saving of File-Visiting Buffers,  Up: Modes and Buffers
   1050 
   1051 4.1.6 Automatic Reverting of File-Visiting Buffers
   1052 --------------------------------------------------
   1053 
   1054 By default Magit automatically reverts buffers that are visiting files
   1055 that are being tracked in a Git repository, after they have changed on
   1056 disk.  When using Magit one often changes files on disk by running Git,
   1057 i.e., "outside Emacs", making this a rather important feature.
   1058 
   1059    For example, if you discard a change in the status buffer, then that
   1060 is done by running ‘git apply --reverse ...’, and Emacs considers the
   1061 file to have "changed on disk".  If Magit did not automatically revert
   1062 the buffer, then you would have to type ‘M-x revert-buffer RET RET’ in
   1063 the visiting buffer before you could continue making changes.
   1064 
   1065  -- User Option: magit-auto-revert-mode
   1066      When this mode is enabled, then buffers that visit tracked files
   1067      are automatically reverted after the visited files change on disk.
   1068 
   1069  -- User Option: global-auto-revert-mode
   1070      When this mode is enabled, then any file-visiting buffer is
   1071      automatically reverted after the visited file changes on disk.
   1072 
   1073      If you like buffers that visit tracked files to be automatically
   1074      reverted, then you might also like any buffer to be reverted, not
   1075      just those visiting tracked files.  If that is the case, then
   1076      enable this mode _instead of_ ‘magit-auto-revert-mode’.
   1077 
   1078  -- User Option: magit-auto-revert-immediately
   1079      This option controls whether Magit reverts buffers immediately.
   1080 
   1081      If this is non-nil and either ‘global-auto-revert-mode’ or
   1082      ‘magit-auto-revert-mode’ is enabled, then Magit immediately reverts
   1083      buffers by explicitly calling ‘auto-revert-buffers’ after running
   1084      Git for side-effects.
   1085 
   1086      If ‘auto-revert-use-notify’ is non-nil (and file notifications are
   1087      actually supported), then ‘magit-auto-revert-immediately’ does not
   1088      have to be non-nil, because the reverts happen immediately anyway.
   1089 
   1090      If ‘magit-auto-revert-immediately’ and ‘auto-revert-use-notify’ are
   1091      both ‘nil’, then reverts happen after ‘auto-revert-interval’
   1092      seconds of user inactivity.  That is not desirable.
   1093 
   1094  -- User Option: auto-revert-use-notify
   1095      This option controls whether file notification functions should be
   1096      used.  Note that this variable unfortunately defaults to ‘t’ even
   1097      on systems on which file notifications cannot be used.
   1098 
   1099  -- User Option: magit-auto-revert-tracked-only
   1100      This option controls whether ‘magit-auto-revert-mode’ only reverts
   1101      tracked files or all files that are located inside Git
   1102      repositories, including untracked files and files located inside
   1103      Git’s control directory.
   1104 
   1105  -- User Option: auto-revert-mode
   1106      The global mode ‘magit-auto-revert-mode’ works by turning on this
   1107      local mode in the appropriate buffers (but
   1108      ‘global-auto-revert-mode’ is implemented differently).  You can
   1109      also turn it on or off manually, which might be necessary if Magit
   1110      does not notice that a previously untracked file now is being
   1111      tracked or vice-versa.
   1112 
   1113  -- User Option: auto-revert-stop-on-user-input
   1114      This option controls whether the arrival of user input suspends the
   1115      automatic reverts for ‘auto-revert-interval’ seconds.
   1116 
   1117  -- User Option: auto-revert-interval
   1118      This option controls how many seconds Emacs waits for before
   1119      resuming suspended reverts.
   1120 
   1121  -- User Option: auto-revert-buffer-list-filter
   1122      This option specifies an additional filter used by
   1123      ‘auto-revert-buffers’ to determine whether a buffer should be
   1124      reverted or not.
   1125 
   1126      This option is provided by Magit, which also advises
   1127      ‘auto-revert-buffers’ to respect it.  Magit users who do not turn
   1128      on the local mode ‘auto-revert-mode’ themselves, are best served by
   1129      setting the value to ‘magit-auto-revert-repository-buffer-p’.
   1130 
   1131      However the default is nil, so as not to disturb users who do use
   1132      the local mode directly.  If you experience delays when running
   1133      Magit commands, then you should consider using one of the
   1134      predicates provided by Magit - especially if you also use Tramp.
   1135 
   1136      Users who do turn on ‘auto-revert-mode’ in buffers in which Magit
   1137      doesn’t do that for them, should likely not use any filter.  Users
   1138      who turn on ‘global-auto-revert-mode’, do not have to worry about
   1139      this option, because it is disregarded if the global mode is
   1140      enabled.
   1141 
   1142  -- User Option: auto-revert-verbose
   1143      This option controls whether Emacs reports when a buffer has been
   1144      reverted.
   1145 
   1146    The options with the ‘auto-revert-’ prefix are located in the Custom
   1147 group named ‘auto-revert’.  The other, Magit-specific, options are
   1148 located in the ‘magit’ group.
   1149 
   1150 * Menu:
   1151 
   1152 * Risk of Reverting Automatically::
   1153 
   1154 
   1155 File: magit.info,  Node: Risk of Reverting Automatically,  Up: Automatic Reverting of File-Visiting Buffers
   1156 
   1157 Risk of Reverting Automatically
   1158 ...............................
   1159 
   1160 For the vast majority of users, automatically reverting file-visiting
   1161 buffers after they have changed on disk is harmless.
   1162 
   1163    If a buffer is modified (i.e., it contains changes that haven’t been
   1164 saved yet), then Emacs will refuse to automatically revert it.  If you
   1165 save a previously modified buffer, then that results in what is seen by
   1166 Git as an uncommitted change.  Git will then refuse to carry out any
   1167 commands that would cause these changes to be lost.  In other words, if
   1168 there is anything that could be lost, then either Git or Emacs will
   1169 refuse to discard the changes.
   1170 
   1171    However, if you use file-visiting buffers as a sort of ad hoc
   1172 "staging area", then the automatic reverts could potentially cause data
   1173 loss.  So far I have heard from only one user who uses such a workflow.
   1174 
   1175    An example: You visit some file in a buffer, edit it, and save the
   1176 changes.  Then, outside of Emacs (or at least not using Magit or by
   1177 saving the buffer) you change the file on disk again.  At this point the
   1178 buffer is the only place where the intermediate version still exists.
   1179 You have saved the changes to disk, but that has since been overwritten.
   1180 Meanwhile Emacs considers the buffer to be unmodified (because you have
   1181 not made any changes to it since you last saved it to the visited file)
   1182 and therefore would not object to it being automatically reverted.  At
   1183 this point an Auto-Revert mode would kick in.  It would check whether
   1184 the buffer is modified and since that is not the case it would revert
   1185 it.  The intermediate version would be lost.  (Actually you could still
   1186 get it back using the ‘undo’ command.)
   1187 
   1188    If your workflow depends on Emacs preserving the intermediate version
   1189 in the buffer, then you have to disable all Auto-Revert modes.  But
   1190 please consider that such a workflow would be dangerous even without
   1191 using an Auto-Revert mode, and should therefore be avoided.  If Emacs
   1192 crashes or if you quit Emacs by mistake, then you would also lose the
   1193 buffer content.  There would be no autosave file still containing the
   1194 intermediate version (because that was deleted when you saved the
   1195 buffer) and you would not be asked whether you want to save the buffer
   1196 (because it isn’t modified).
   1197 
   1198 
   1199 File: magit.info,  Node: Sections,  Next: Transient Commands,  Prev: Modes and Buffers,  Up: Interface Concepts
   1200 
   1201 4.2 Sections
   1202 ============
   1203 
   1204 Magit buffers are organized into nested sections, which can be collapsed
   1205 and expanded, similar to how sections are handled in Org mode.  Each
   1206 section also has a type, and some sections also have a value.  For each
   1207 section type there can also be a local keymap, shared by all sections of
   1208 that type.
   1209 
   1210    Taking advantage of the section value and type, many commands operate
   1211 on the current section, or when the region is active and selects
   1212 sections of the same type, all of the selected sections.  Commands that
   1213 only make sense for a particular section type (as opposed to just
   1214 behaving differently depending on the type) are usually bound in section
   1215 type keymaps.
   1216 
   1217 * Menu:
   1218 
   1219 * Section Movement::
   1220 * Section Visibility::
   1221 * Section Hooks::
   1222 * Section Types and Values::
   1223 * Section Options::
   1224 
   1225 
   1226 File: magit.info,  Node: Section Movement,  Next: Section Visibility,  Up: Sections
   1227 
   1228 4.2.1 Section Movement
   1229 ----------------------
   1230 
   1231 To move within a section use the usual keys (‘C-p’, ‘C-n’, ‘C-b’, ‘C-f’
   1232 etc), whose global bindings are not shadowed.  To move to another
   1233 section use the following commands.
   1234 
   1235 ‘p’ (‘magit-section-backward’)
   1236      When not at the beginning of a section, then move to the beginning
   1237      of the current section.  At the beginning of a section, instead
   1238      move to the beginning of the previous visible section.
   1239 
   1240 ‘n’ (‘magit-section-forward’)
   1241      Move to the beginning of the next visible section.
   1242 
   1243 ‘M-p’ (‘magit-section-backward-siblings’)
   1244      Move to the beginning of the previous sibling section.  If there is
   1245      no previous sibling section, then move to the parent section
   1246      instead.
   1247 
   1248 ‘M-n’ (‘magit-section-forward-siblings’)
   1249      Move to the beginning of the next sibling section.  If there is no
   1250      next sibling section, then move to the parent section instead.
   1251 
   1252 ‘^’ (‘magit-section-up’)
   1253      Move to the beginning of the parent of the current section.
   1254 
   1255    The above commands all call the hook ‘magit-section-movement-hook’.
   1256 Any of the functions listed below can be used as members of this hook.
   1257 
   1258    You might want to remove some of the functions that Magit adds using
   1259 ‘add-hook’.  In doing so you have to make sure you do not attempt to
   1260 remove function that haven’t even been added yet, for example:
   1261 
   1262      (with-eval-after-load 'magit-diff
   1263        (remove-hook 'magit-section-movement-hook
   1264                     'magit-hunk-set-window-start))
   1265 
   1266  -- Variable: magit-section-movement-hook
   1267      This hook is run by all of the above movement commands, after
   1268      arriving at the destination.
   1269 
   1270  -- Function: magit-hunk-set-window-start
   1271      This hook function ensures that the beginning of the current
   1272      section is visible, provided it is a ‘hunk’ section.  Otherwise, it
   1273      does nothing.
   1274 
   1275      Loading ‘magit-diff’ adds this function to the hook.
   1276 
   1277  -- Function: magit-section-set-window-start
   1278      This hook function ensures that the beginning of the current
   1279      section is visible, regardless of the section’s type.  If you add
   1280      this to ‘magit-section-movement-hook’, then you must remove the
   1281      hunk-only variant in turn.
   1282 
   1283  -- Function: magit-log-maybe-show-more-commits
   1284      This hook function only has an effect in log buffers, and ‘point’
   1285      is on the "show more" section.  If that is the case, then it
   1286      doubles the number of commits that are being shown.
   1287 
   1288      Loading ‘magit-log’ adds this function to the hook.
   1289 
   1290  -- Function: magit-log-maybe-update-revision-buffer
   1291      When moving inside a log buffer, then this function updates the
   1292      revision buffer, provided it is already being displayed in another
   1293      window of the same frame.
   1294 
   1295      Loading ‘magit-log’ adds this function to the hook.
   1296 
   1297  -- Function: magit-log-maybe-update-blob-buffer
   1298      When moving inside a log buffer and another window of the same
   1299      frame displays a blob buffer, then this function instead displays
   1300      the blob buffer for the commit at point in that window.
   1301 
   1302  -- Function: magit-status-maybe-update-revision-buffer
   1303      When moving inside a status buffer, then this function updates the
   1304      revision buffer, provided it is already being displayed in another
   1305      window of the same frame.
   1306 
   1307  -- Function: magit-status-maybe-update-stash-buffer
   1308      When moving inside a status buffer, then this function updates the
   1309      stash buffer, provided it is already being displayed in another
   1310      window of the same frame.
   1311 
   1312  -- Function: magit-status-maybe-update-blob-buffer
   1313      When moving inside a status buffer and another window of the same
   1314      frame displays a blob buffer, then this function instead displays
   1315      the blob buffer for the commit at point in that window.
   1316 
   1317  -- Function: magit-stashes-maybe-update-stash-buffer
   1318      When moving inside a buffer listing stashes, then this function
   1319      updates the stash buffer, provided it is already being displayed in
   1320      another window of the same frame.
   1321 
   1322  -- User Option: magit-update-other-window-delay
   1323      Delay before automatically updating the other window.
   1324 
   1325      When moving around in certain buffers, then certain other buffers,
   1326      which are being displayed in another window, may optionally be
   1327      updated to display information about the section at point.
   1328 
   1329      When holding down a key to move by more than just one section, then
   1330      that would update that buffer for each section on the way.  To
   1331      prevent that, updating the revision buffer is delayed, and this
   1332      option controls for how long.  For optimal experience you might
   1333      have to adjust this delay and/or the keyboard repeat rate and delay
   1334      of your graphical environment or operating system.
   1335 
   1336 
   1337 File: magit.info,  Node: Section Visibility,  Next: Section Hooks,  Prev: Section Movement,  Up: Sections
   1338 
   1339 4.2.2 Section Visibility
   1340 ------------------------
   1341 
   1342 Magit provides many commands for changing the visibility of sections,
   1343 but all you need to get started are the next two.
   1344 
   1345 ‘<TAB>’ (‘magit-section-toggle’)
   1346      Toggle the visibility of the body of the current section.
   1347 
   1348 ‘C-c <TAB>’ (‘magit-section-cycle’)
   1349 ‘C-<tab>’ (‘magit-section-cycle’)
   1350      Cycle the visibility of current section and its children.
   1351 
   1352      If this command is invoked using ‘C-<tab>’ and that is globally
   1353      bound to ‘tab-next’, then this command pivots to behave like that
   1354      command, and you must instead use ‘C-c TAB’ to cycle section
   1355      visibility.
   1356 
   1357      If you would like to keep using ‘C-<tab>’ to cycle section
   1358      visibility but also want to use ‘tab-bar-mode’, then you have to
   1359      prevent that mode from using this key and instead bind another key
   1360      to ‘tab-next’.  Because ‘tab-bar-mode’ does not use a mode map but
   1361      instead manipulates the global map, this involves advising
   1362      ‘tab-bar--define-keys’.
   1363 
   1364 ‘M-<tab>’ (‘magit-section-cycle-diffs’)
   1365      Cycle the visibility of diff-related sections in the current
   1366      buffer.
   1367 
   1368 ‘S-<tab>’ (‘magit-section-cycle-global’)
   1369      Cycle the visibility of all sections in the current buffer.
   1370 
   1371 ‘1’ (‘magit-section-show-level-1’)
   1372 ‘2’ (‘magit-section-show-level-2’)
   1373 ‘3’ (‘magit-section-show-level-3’)
   1374 ‘4’ (‘magit-section-show-level-4’)
   1375      Show sections surrounding the current section up to level N.
   1376 
   1377 ‘M-1’ (‘magit-section-show-level-1-all’)
   1378 ‘M-2’ (‘magit-section-show-level-2-all’)
   1379 ‘M-3’ (‘magit-section-show-level-3-all’)
   1380 ‘M-4’ (‘magit-section-show-level-4-all’)
   1381      Show all sections up to level N.
   1382 
   1383    Some functions, which are used to implement the above commands, are
   1384 also exposed as commands themselves.  By default no keys are bound to
   1385 these commands, as they are generally perceived to be much less useful.
   1386 But your mileage may vary.
   1387 
   1388  -- Command: magit-section-show
   1389      Show the body of the current section.
   1390 
   1391  -- Command: magit-section-hide
   1392      Hide the body of the current section.
   1393 
   1394  -- Command: magit-section-show-headings
   1395      Recursively show headings of children of the current section.  Only
   1396      show the headings.  Previously shown text-only bodies are hidden.
   1397 
   1398  -- Command: magit-section-show-children
   1399      Recursively show the bodies of children of the current section.
   1400      With a prefix argument show children down to the level of the
   1401      current section, and hide deeper children.
   1402 
   1403  -- Command: magit-section-hide-children
   1404      Recursively hide the bodies of children of the current section.
   1405 
   1406  -- Command: magit-section-toggle-children
   1407      Toggle visibility of bodies of children of the current section.
   1408 
   1409    When a buffer is first created then some sections are shown expanded
   1410 while others are not.  This is hard coded.  When a buffer is refreshed
   1411 then the previous visibility is preserved.  The initial visibility of
   1412 certain sections can also be overwritten using the hook
   1413 ‘magit-section-set-visibility-hook’.
   1414 
   1415  -- User Option: magit-section-initial-visibility-alist
   1416      This options can be used to override the initial visibility of
   1417      sections.  In the future it will also be used to define the
   1418      defaults, but currently a section’s default is still hardcoded.
   1419 
   1420      The value is an alist.  Each element maps a section type or lineage
   1421      to the initial visibility state for such sections.  The state has
   1422      to be one of ‘show’ or ‘hide’, or a function that returns one of
   1423      these symbols.  A function is called with the section as the only
   1424      argument.
   1425 
   1426      Use the command ‘magit-describe-section-briefly’ to determine a
   1427      section’s lineage or type.  The vector in the output is the section
   1428      lineage and the type is the first element of that vector.
   1429      Wildcards can be used, see ‘magit-section-match’.
   1430 
   1431  -- User Option: magit-section-cache-visibility
   1432      This option controls for which sections the previous visibility
   1433      state should be restored if a section disappears and later appears
   1434      again.  The value is a boolean or a list of section types.  If t,
   1435      then the visibility of all sections is cached.  Otherwise this is
   1436      only done for sections whose type matches one of the listed types.
   1437 
   1438      This requires that the function ‘magit-section-cached-visibility’
   1439      is a member of ‘magit-section-set-visibility-hook’.
   1440 
   1441  -- Variable: magit-section-set-visibility-hook
   1442      This hook is run when first creating a buffer and also when
   1443      refreshing an existing buffer, and is used to determine the
   1444      visibility of the section currently being inserted.
   1445 
   1446      Each function is called with one argument, the section being
   1447      inserted.  It should return ‘hide’ or ‘show’, or to leave the
   1448      visibility undefined ‘nil’.  If no function decides on the
   1449      visibility and the buffer is being refreshed, then the visibility
   1450      is preserved; or if the buffer is being created, then the hard
   1451      coded default is used.
   1452 
   1453      Usually this should only be used to set the initial visibility but
   1454      not during refreshes.  If ‘magit-insert-section--oldroot’ is
   1455      non-nil, then the buffer is being refreshed and these functions
   1456      should immediately return ‘nil’.
   1457 
   1458  -- User Option: magit-section-visibility-indicator
   1459      This option controls whether and how to indicate that a section can
   1460      be expanded/collapsed.
   1461 
   1462      If nil, then no visibility indicators are shown.  Otherwise the
   1463      value has to have one of these two forms:
   1464 
   1465         • ‘(EXPANDABLE-BITMAP . COLLAPSIBLE-BITMAP)’
   1466 
   1467           Both values have to be variables whose values are fringe
   1468           bitmaps.  In this case every section that can be expanded or
   1469           collapsed gets an indicator in the left fringe.
   1470 
   1471           To provide extra padding around the indicator, set
   1472           ‘left-fringe-width’ in ‘magit-mode-hook’, e.g.:
   1473 
   1474                (add-hook 'magit-mode-hook (lambda ()
   1475                                             (setq left-fringe-width 20)))
   1476 
   1477         • ‘(STRING . BOOLEAN)’
   1478 
   1479           In this case STRING (usually an ellipsis) is shown at the end
   1480           of the heading of every collapsed section.  Expanded sections
   1481           get no indicator.  The cdr controls whether the appearance of
   1482           these ellipsis take section highlighting into account.  Doing
   1483           so might potentially have an impact on performance, while not
   1484           doing so is kinda ugly.
   1485 
   1486 
   1487 File: magit.info,  Node: Section Hooks,  Next: Section Types and Values,  Prev: Section Visibility,  Up: Sections
   1488 
   1489 4.2.3 Section Hooks
   1490 -------------------
   1491 
   1492 Which sections are inserted into certain buffers is controlled with
   1493 hooks.  This includes the status and the refs buffers.  For other
   1494 buffers, e.g., log and diff buffers, this is not possible.  The command
   1495 ‘magit-describe-section’ can be used to see which hook (if any) was
   1496 responsible for inserting the section at point.
   1497 
   1498    For buffers whose sections can be customized by the user, a hook
   1499 variable called ‘magit-TYPE-sections-hook’ exists.  This hook should be
   1500 changed using ‘magit-add-section-hook’.  Avoid using ‘add-hooks’ or the
   1501 Custom interface.
   1502 
   1503    The various available section hook variables are described later in
   1504 this manual along with the appropriate "section inserter functions".
   1505 
   1506  -- Function: magit-add-section-hook hook function &optional at append
   1507           local
   1508      Add the function FUNCTION to the value of section hook HOOK.
   1509 
   1510      Add FUNCTION at the beginning of the hook list unless optional
   1511      APPEND is non-nil, in which case FUNCTION is added at the end.  If
   1512      FUNCTION already is a member then move it to the new location.
   1513 
   1514      If optional AT is non-nil and a member of the hook list, then add
   1515      FUNCTION next to that instead.  Add before or after AT, or replace
   1516      AT with FUNCTION depending on APPEND.  If APPEND is the symbol
   1517      ‘replace’, then replace AT with FUNCTION.  For any other non-nil
   1518      value place FUNCTION right after AT.  If nil, then place FUNCTION
   1519      right before AT.  If FUNCTION already is a member of the list but
   1520      AT is not, then leave FUNCTION where ever it already is.
   1521 
   1522      If optional LOCAL is non-nil, then modify the hook’s buffer-local
   1523      value rather than its global value.  This makes the hook local by
   1524      copying the default value.  That copy is then modified.
   1525 
   1526      HOOK should be a symbol.  If HOOK is void, it is first set to nil.
   1527      HOOK’s value must not be a single hook function.  FUNCTION should
   1528      be a function that takes no arguments and inserts one or multiple
   1529      sections at point, moving point forward.  FUNCTION may choose not
   1530      to insert its section(s), when doing so would not make sense.  It
   1531      should not be abused for other side-effects.
   1532 
   1533    To remove a function from a section hook, use ‘remove-hook’.
   1534 
   1535 
   1536 File: magit.info,  Node: Section Types and Values,  Next: Section Options,  Prev: Section Hooks,  Up: Sections
   1537 
   1538 4.2.4 Section Types and Values
   1539 ------------------------------
   1540 
   1541 Each section has a type, for example ‘hunk’, ‘file’, and ‘commit’.
   1542 Instances of certain section types also have a value.  The value of a
   1543 section of type ‘file’, for example, is a file name.
   1544 
   1545    Users usually do not have to worry about a section’s type and value,
   1546 but knowing them can be handy at times.
   1547 
   1548 ‘H’ (‘magit-describe-section’)
   1549      This command shows information about the section at point in a
   1550      separate buffer.
   1551 
   1552  -- Command: magit-describe-section-briefly
   1553      This command shows information about the section at point in the
   1554      echo area, as ‘#<magit-section VALUE [TYPE PARENT-TYPE...]
   1555      BEGINNING-END>’.
   1556 
   1557    Many commands behave differently depending on the type of the section
   1558 at point and/or somehow consume the value of that section.  But that is
   1559 only one of the reasons why the same key may do something different,
   1560 depending on what section is current.
   1561 
   1562    Additionally for each section type a keymap *might* be defined, named
   1563 ‘magit-TYPE-section-map’.  That keymap is used as text property keymap
   1564 of all text belonging to any section of the respective type.  If such a
   1565 map does not exist for a certain type, then you can define it yourself,
   1566 and it will automatically be used.
   1567 
   1568 
   1569 File: magit.info,  Node: Section Options,  Prev: Section Types and Values,  Up: Sections
   1570 
   1571 4.2.5 Section Options
   1572 ---------------------
   1573 
   1574 This section describes options that have an effect on more than just a
   1575 certain type of sections.  As you can see there are not many of those.
   1576 
   1577  -- User Option: magit-section-show-child-count
   1578      Whether to append the number of children to section headings.  This
   1579      only affects sections that could benefit from this information.
   1580 
   1581 
   1582 File: magit.info,  Node: Transient Commands,  Next: Transient Arguments and Buffer Variables,  Prev: Sections,  Up: Interface Concepts
   1583 
   1584 4.3 Transient Commands
   1585 ======================
   1586 
   1587 Many Magit commands are implemented as *transient* commands.  First the
   1588 user invokes a *prefix* command, which causes its *infix* arguments and
   1589 *suffix* commands to be displayed in the echo area.  The user then
   1590 optionally sets some infix arguments and finally invokes one of the
   1591 suffix commands.
   1592 
   1593    This is implemented in the library ‘transient’.  Earlier Magit
   1594 releases used the package ‘magit-popup’ and even earlier versions
   1595 library ‘magit-key-mode’.
   1596 
   1597    Transient is documented in *note (transient)Top::.
   1598 
   1599 ‘C-x M-g’ (‘magit-dispatch’)
   1600 ‘C-c g’ (‘magit-dispatch’)
   1601      This transient prefix command binds most of Magit’s other prefix
   1602      commands as suffix commands and displays them in a temporary buffer
   1603      until one of them is invoked.  Invoking such a sub-prefix causes
   1604      the suffixes of that command to be bound and displayed instead of
   1605      those of ‘magit-dispatch’.
   1606 
   1607      This command is also, or especially, useful outside Magit buffers,
   1608      so Magit by default binds it to ‘C-c M-g’ in the global keymap.
   1609      ‘C-c g’ would be a better binding, but we cannot use that by
   1610      default, because that key sequence is reserved for the user.  See
   1611      *note Global Bindings:: to learn more default and recommended key
   1612      bindings.
   1613 
   1614 
   1615 File: magit.info,  Node: Transient Arguments and Buffer Variables,  Next: Completion Confirmation and the Selection,  Prev: Transient Commands,  Up: Interface Concepts
   1616 
   1617 4.4 Transient Arguments and Buffer Variables
   1618 ============================================
   1619 
   1620 The infix arguments of many of Magit’s transient prefix commands cease
   1621 to have an effect once the ‘git’ command that is called with those
   1622 arguments has returned.  Commands that create a commit are a good
   1623 example for this.  If the user changes the arguments, then that only
   1624 affects the next invocation of a suffix command.  If the same transient
   1625 prefix command is later invoked again, then the arguments are initially
   1626 reset to the default value.  This default value can be set for the
   1627 current Emacs session or saved permanently, see *note (transient)Saving
   1628 Values::.  It is also possible to cycle through previously used sets of
   1629 arguments using ‘C-M-p’ and ‘C-M-n’, see *note (transient)Using
   1630 History::.
   1631 
   1632    However the infix arguments of many other transient commands continue
   1633 to have an effect even after the ‘git’ command that was called with
   1634 those arguments has returned.  The most important commands like this are
   1635 those that display a diff or log in a dedicated buffer.  Their arguments
   1636 obviously continue to have an effect for as long as the respective diff
   1637 or log is being displayed.  Furthermore the used arguments are stored in
   1638 buffer-local variables for future reference.
   1639 
   1640    For commands in the second group it isn’t always desirable to reset
   1641 their arguments to the global value when the transient prefix command is
   1642 invoked again.
   1643 
   1644    As mentioned above, it is possible to cycle through previously used
   1645 sets of arguments while a transient popup is visible.  That means that
   1646 we could always reset the infix arguments to the default because the set
   1647 of arguments that is active in the existing buffer is only a few ‘C-M-p’
   1648 away.  Magit can be configured to behave like that, but because I expect
   1649 that most users would not find that very convenient, it is not the
   1650 default.
   1651 
   1652    Also note that it is possible to change the diff and log arguments
   1653 used in the current buffer (including the status buffer, which contains
   1654 both diff and log sections) using the respective "refresh" transient
   1655 prefix commands on ‘D’ and ‘L’.  (‘d’ and ‘l’ on the other hand are
   1656 intended to change *what* diff or log is being displayed.  It is
   1657 possible to also change *how* the diff or log is being displayed at the
   1658 same time, but if you only want to do the latter, then you should use
   1659 the refresh variants.)  Because these secondary diff and log transient
   1660 prefixes are about *changing* the arguments used in the current buffer,
   1661 they *always* start out with the set of arguments that are currently in
   1662 effect in that buffer.
   1663 
   1664    Some commands are usually invoked directly even though they can also
   1665 be invoked as the suffix of a transient prefix command.  Most
   1666 prominently ‘magit-show-commit’ is usually invoked by typing ‘RET’ while
   1667 point is on a commit in a log, but it can also be invoked from the
   1668 ‘magit-diff’ transient prefix.
   1669 
   1670    When such a command is invoked directly, then it is important to
   1671 reuse the arguments as specified by the respective buffer-local values,
   1672 instead of using the default arguments.  Imagine you press ‘RET’ in a
   1673 log to display the commit at point in a different buffer and then use
   1674 ‘D’ to change how the diff is displayed in that buffer.  And then you
   1675 press ‘RET’ on another commit to show that instead and the diff
   1676 arguments are reset to the default.  Not cool; so Magit does not do that
   1677 by default.
   1678 
   1679  -- User Option: magit-prefix-use-buffer-arguments
   1680      This option controls whether the infix arguments initially shown in
   1681      certain transient prefix commands are based on the arguments that
   1682      are currently in effect in the buffer that their suffixes update.
   1683 
   1684      The ‘magit-diff’ and ‘magit-log’ transient prefix commands are
   1685      affected by this option.
   1686 
   1687  -- User Option: magit-direct-use-buffer-arguments
   1688      This option controls whether certain commands, when invoked
   1689      directly (i.e., not as the suffix of a transient prefix command),
   1690      use the arguments that are currently active in the buffer that they
   1691      are about to update.  The alternative is to use the default value
   1692      for these arguments, which might change the arguments that are used
   1693      in the buffer.
   1694 
   1695 Valid values for both of the above options are:
   1696 
   1697    • ‘always’: Always use the set of arguments that is currently active
   1698      in the respective buffer, provided that buffer exists of course.
   1699    • ‘selected’ or ‘t’: Use the set of arguments from the respective
   1700      buffer, but only if it is displayed in a window of the current
   1701      frame.  This is the default for both variables.
   1702    • ‘current’: Use the set of arguments from the respective buffer, but
   1703      only if it is the current buffer.
   1704    • ‘never’: Never use the set of arguments from the respective buffer.
   1705 
   1706 I am afraid it gets more complicated still:
   1707 
   1708    • The global diff and log arguments are set for each supported mode
   1709      individually.  The diff arguments for example have different values
   1710      in ‘magit-diff-mode’, ‘magit-revision-mode’,
   1711      ‘magit-merge-preview-mode’ and ‘magit-status-mode’ buffers.
   1712      Setting or saving the value for one mode does not change the value
   1713      for other modes.  The history however is shared.
   1714 
   1715    • When ‘magit-show-commit’ is invoked directly from a log buffer,
   1716      then the file filter is picked up from that buffer, not from the
   1717      revision buffer or the mode’s global diff arguments.
   1718 
   1719    • Even though they are suffixes of the diff prefix
   1720      ‘magit-show-commit’ and ‘magit-stash-show’ do not use the diff
   1721      buffer used by the diff commands, instead they use the dedicated
   1722      revision and stash buffers.
   1723 
   1724      At the time you invoke the diff prefix it is unknown to Magit which
   1725      of the suffix commands you are going to invoke.  While not certain,
   1726      more often than not users invoke one of the commands that use the
   1727      diff buffer, so the initial infix arguments are those used in that
   1728      buffer.  However if you invoke one of these commands directly, then
   1729      Magit knows that it should use the arguments from the revision
   1730      resp.  stash buffer.
   1731 
   1732    • The log prefix also features reflog commands, but these commands do
   1733      not use the log arguments.
   1734 
   1735    • If ‘magit-show-refs’ is invoked from a ‘magit-refs-mode’ buffer,
   1736      then it acts as a refresh prefix and therefore unconditionally uses
   1737      the buffer’s arguments as initial arguments.  If it is invoked
   1738      elsewhere with a prefix argument, then it acts as regular prefix
   1739      and therefore respects ‘magit-prefix-use-buffer-arguments’.  If it
   1740      is invoked elsewhere without a prefix argument, then it acts as a
   1741      direct command and therefore respects
   1742      ‘magit-direct-use-buffer-arguments’.
   1743 
   1744 
   1745 File: magit.info,  Node: Completion Confirmation and the Selection,  Next: Mouse Support,  Prev: Transient Arguments and Buffer Variables,  Up: Interface Concepts
   1746 
   1747 4.5 Completion, Confirmation and the Selection
   1748 ==============================================
   1749 
   1750 * Menu:
   1751 
   1752 * Action Confirmation::
   1753 * Completion and Confirmation::
   1754 * The Selection::
   1755 * The hunk-internal region::
   1756 * Support for Completion Frameworks::
   1757 * Additional Completion Options::
   1758 
   1759 
   1760 File: magit.info,  Node: Action Confirmation,  Next: Completion and Confirmation,  Up: Completion Confirmation and the Selection
   1761 
   1762 4.5.1 Action Confirmation
   1763 -------------------------
   1764 
   1765 By default many actions that could potentially lead to data loss have to
   1766 be confirmed.  This includes many very common actions, so this can
   1767 quickly become annoying.  Many of these actions can be undone and if you
   1768 have thought about how to undo certain mistakes, then it should be safe
   1769 to disable confirmation for the respective actions.
   1770 
   1771    The option ‘magit-no-confirm’ can be used to tell Magit to perform
   1772 certain actions without the user having to confirm them.  Note that
   1773 while this option can only be used to disable confirmation for a
   1774 specific set of actions, the next section explains another way of
   1775 telling Magit to ask fewer questions.
   1776 
   1777  -- User Option: magit-no-confirm
   1778      The value of this option is a list of symbols, representing actions
   1779      that do not have to be confirmed by the user before being carried
   1780      out.
   1781 
   1782      By default many potentially dangerous commands ask the user for
   1783      confirmation.  Each of the below symbols stands for an action
   1784      which, when invoked unintentionally or without being fully aware of
   1785      the consequences, could lead to tears.  In many cases there are
   1786      several commands that perform variations of a certain action, so we
   1787      don’t use the command names but more generic symbols.
   1788 
   1789         • Applying changes:
   1790 
   1791              • ‘discard’ Discarding one or more changes (i.e., hunks or
   1792                the complete diff for a file) loses that change,
   1793                obviously.
   1794 
   1795              • ‘reverse’ Reverting one or more changes can usually be
   1796                undone by reverting the reversion.
   1797 
   1798              • ‘stage-all-changes’, ‘unstage-all-changes’ When there are
   1799                both staged and unstaged changes, then un-/staging
   1800                everything would destroy that distinction.  Of course
   1801                that also applies when un-/staging a single change, but
   1802                then less is lost and one does that so often that having
   1803                to confirm every time would be unacceptable.
   1804 
   1805         • Files:
   1806 
   1807              • ‘delete’ When a file that isn’t yet tracked by Git is
   1808                deleted, then it is completely lost, not just the last
   1809                changes.  Very dangerous.
   1810 
   1811              • ‘trash’ Instead of deleting a file it can also be move to
   1812                the system trash.  Obviously much less dangerous than
   1813                deleting it.
   1814 
   1815                Also see option ‘magit-delete-by-moving-to-trash’.
   1816 
   1817              • ‘resurrect’ A deleted file can easily be resurrected by
   1818                "deleting" the deletion, which is done using the same
   1819                command that was used to delete the same file in the
   1820                first place.
   1821 
   1822              • ‘untrack’ Untracking a file can be undone by tracking it
   1823                again.
   1824 
   1825              • ‘rename’ Renaming a file can easily be undone.
   1826 
   1827         • Sequences:
   1828 
   1829              • ‘reset-bisect’ Aborting (known to Git as "resetting") a
   1830                bisect operation loses all information collected so far.
   1831 
   1832              • ‘abort-cherry-pick’ Aborting a cherry-pick throws away
   1833                all conflict resolutions which have already been carried
   1834                out by the user.
   1835 
   1836              • ‘abort-revert’ Aborting a revert throws away all conflict
   1837                resolutions which have already been carried out by the
   1838                user.
   1839 
   1840              • ‘abort-rebase’ Aborting a rebase throws away all already
   1841                modified commits, but it’s possible to restore those from
   1842                the reflog.
   1843 
   1844              • ‘abort-merge’ Aborting a merge throws away all conflict
   1845                resolutions which have already been carried out by the
   1846                user.
   1847 
   1848              • ‘merge-dirty’ Merging with a dirty worktree can make it
   1849                hard to go back to the state before the merge was
   1850                initiated.
   1851 
   1852         • References:
   1853 
   1854              • ‘delete-unmerged-branch’ Once a branch has been deleted,
   1855                it can only be restored using low-level recovery tools
   1856                provided by Git.  And even then the reflog is gone.  The
   1857                user always has to confirm the deletion of a branch by
   1858                accepting the default choice (or selecting another
   1859                branch), but when a branch has not been merged yet, also
   1860                make sure the user is aware of that.
   1861 
   1862              • ‘delete-pr-remote’ When deleting a branch that was
   1863                created from a pull-request and if no other branches
   1864                still exist on that remote, then ‘magit-branch-delete’
   1865                offers to delete the remote as well.  This should be safe
   1866                because it only happens if no other refs exist in the
   1867                remotes namespace, and you can recreate the remote if
   1868                necessary.
   1869 
   1870              • ‘drop-stashes’ Dropping a stash is dangerous because Git
   1871                stores stashes in the reflog.  Once a stash is removed,
   1872                there is no going back without using low-level recovery
   1873                tools provided by Git.  When a single stash is dropped,
   1874                then the user always has to confirm by accepting the
   1875                default (or selecting another).  This action only
   1876                concerns the deletion of multiple stashes at once.
   1877 
   1878         • Publishing:
   1879 
   1880              • ‘set-and-push’ When pushing to the upstream or the
   1881                push-remote and that isn’t actually configured yet, then
   1882                the user can first set the target.  If s/he confirms the
   1883                default too quickly, then s/he might end up pushing to
   1884                the wrong branch and if the remote repository is
   1885                configured to disallow fixing such mistakes, then that
   1886                can be quite embarrassing and annoying.
   1887 
   1888         • Edit published history:
   1889 
   1890           Without adding these symbols here, you will be warned before
   1891           editing commits that have already been pushed to one of the
   1892           branches listed in ‘magit-published-branches’.
   1893 
   1894              • ‘amend-published’ Affects most commands that amend to
   1895                "HEAD".
   1896 
   1897              • ‘rebase-published’ Affects commands that perform
   1898                interactive rebases.  This includes commands from the
   1899                commit transient that modify a commit other than "HEAD",
   1900                namely the various fixup and squash variants.
   1901 
   1902              • ‘edit-published’ Affects the commands
   1903                ‘magit-edit-line-commit’ and
   1904                ‘magit-diff-edit-hunk-commit’.  These two commands make
   1905                it quite easy to accidentally edit a published commit, so
   1906                you should think twice before configuring them not to ask
   1907                for confirmation.
   1908 
   1909           To disable confirmation completely, add all three symbols here
   1910           or set ‘magit-published-branches’ to ‘nil’.
   1911 
   1912         • Various:
   1913 
   1914              • ‘stash-apply-3way’ When a stash cannot be applied using
   1915                ‘git stash apply’, then Magit uses ‘git apply’ instead,
   1916                possibly using the ‘--3way’ argument, which isn’t always
   1917                perfectly safe.  See also ‘magit-stash-apply’.
   1918 
   1919              • ‘kill-process’ There seldom is a reason to kill a
   1920                process.
   1921 
   1922         • Global settings:
   1923 
   1924           Instead of adding all of the above symbols to the value of
   1925           this option, you can also set it to the atom ‘t’, which has
   1926           the same effect as adding all of the above symbols.  Doing
   1927           that most certainly is a bad idea, especially because other
   1928           symbols might be added in the future.  So even if you don’t
   1929           want to be asked for confirmation for any of these actions,
   1930           you are still better of adding all of the respective symbols
   1931           individually.
   1932 
   1933           When ‘magit-wip-before-change-mode’ is enabled, then the
   1934           following actions can be undone fairly easily: ‘discard’,
   1935           ‘reverse’, ‘stage-all-changes’, and ‘unstage-all-changes’.  If
   1936           and only if this mode is enabled, then ‘safe-with-wip’ has the
   1937           same effect as adding all of these symbols individually.
   1938 
   1939 
   1940 File: magit.info,  Node: Completion and Confirmation,  Next: The Selection,  Prev: Action Confirmation,  Up: Completion Confirmation and the Selection
   1941 
   1942 4.5.2 Completion and Confirmation
   1943 ---------------------------------
   1944 
   1945 Many Magit commands ask the user to select from a list of possible
   1946 things to act on, while offering the most likely choice as the default.
   1947 For many of these commands the default is the thing at point, provided
   1948 that it actually is a valid thing to act on.  For many commands that act
   1949 on a branch, the current branch serves as the default if there is no
   1950 branch at point.
   1951 
   1952    These commands combine asking for confirmation and asking for a
   1953 target to act on into a single action.  The user can confirm the default
   1954 target using ‘RET’ or abort using ‘C-g’.  This is similar to a
   1955 ‘y-or-n-p’ prompt, but the keys to confirm or abort differ.
   1956 
   1957    At the same time the user is also given the opportunity to select
   1958 another target, which is useful because for some commands and/or in some
   1959 situations you might want to select the action before selecting the
   1960 target by moving to it.
   1961 
   1962    However you might find that for some commands you always want to use
   1963 the default target, if any, or even that you want the command to act on
   1964 the default without requiring any confirmation at all.  The option
   1965 ‘magit-dwim-selection’ can be used to configure certain commands to that
   1966 effect.
   1967 
   1968    Note that when the region is active then many commands act on the
   1969 things that are selected using a mechanism based on the region, in many
   1970 cases after asking for confirmation.  This region-based mechanism is
   1971 called the "selection" and is described in detail in the next section.
   1972 When a selection exists that is valid for the invoked command, then that
   1973 command never offers to act on something else, and whether it asks for
   1974 confirmation is not controlled by this option.
   1975 
   1976    Also note that Magit asks for confirmation of certain actions that
   1977 are not coupled with completion (or the selection).  Such dialogs are
   1978 also not affected by this option and are described in the previous
   1979 section.
   1980 
   1981  -- User Option: magit-dwim-selection
   1982    This option can be used to tell certain commands to use the thing at
   1983 point instead of asking the user to select a candidate to act on, with
   1984 or without confirmation.
   1985 
   1986    The value has the form ‘((COMMAND nil|PROMPT DEFAULT)...)’.
   1987 
   1988    • COMMAND is the command that should not prompt for a choice.  To
   1989      have an effect, the command has to use the function
   1990      ‘magit-completing-read’ or a utility function which in turn uses
   1991      that function.
   1992 
   1993    • If the command uses ‘magit-completing-read’ multiple times, then
   1994      PROMPT can be used to only affect one of these uses.  PROMPT, if
   1995      non-nil, is a regular expression that is used to match against the
   1996      PROMPT argument passed to ‘magit-completing-read’.
   1997 
   1998    • DEFAULT specifies how to use the default.  If it is ‘t’, then the
   1999      DEFAULT argument passed to ‘magit-completing-read’ is used without
   2000      confirmation.  If it is ‘ask’, then the user is given a chance to
   2001      abort.  DEFAULT can also be ‘nil’, in which case the entry has no
   2002      effect.
   2003 
   2004 
   2005 File: magit.info,  Node: The Selection,  Next: The hunk-internal region,  Prev: Completion and Confirmation,  Up: Completion Confirmation and the Selection
   2006 
   2007 4.5.3 The Selection
   2008 -------------------
   2009 
   2010 If the region is active, then many Magit commands act on the things that
   2011 are selected using a mechanism based on the region instead of one single
   2012 thing.  When the region is not active, then these commands act on the
   2013 thing at point or read a single thing to act on.  This is described in
   2014 the previous section — this section only covers how multiple things are
   2015 selected, how that is visualized, and how certain commands behave when
   2016 that is the case.
   2017 
   2018    Magit’s mechanism for selecting multiple things, or rather sections
   2019 that represent these things, is based on the Emacs region, but the area
   2020 that Magit considers to be selected is typically larger than the region
   2021 and additional restrictions apply.
   2022 
   2023    Magit makes a distinction between a region that qualifies as forming
   2024 a valid Magit selection and a region that does not.  If the region does
   2025 not qualify, then it is displayed as it is in other Emacs buffers.  If
   2026 the region does qualify as a Magit selection, then the selection is
   2027 always visualized, while the region itself is only visualized if it
   2028 begins and ends on the same line.
   2029 
   2030    For a region to qualify as a Magit selection, it must begin in the
   2031 heading of one section and end in the heading of a sibling section.
   2032 Note that if the end of the region is at the very beginning of section
   2033 heading (i.e., at the very beginning of a line) then that section is
   2034 considered to be *inside* the selection.
   2035 
   2036    This is not consistent with how the region is normally treated in
   2037 Emacs — if the region ends at the beginning of a line, then that line is
   2038 outside the region.  Due to how Magit visualizes the selection, it
   2039 should be obvious that this difference exists.
   2040 
   2041    Not every command acts on every valid selection.  Some commands do
   2042 not even consider the location of point, others may act on the section
   2043 at point but not support acting on the selection, and even commands that
   2044 do support the selection of course only do so if it selects things that
   2045 they can act on.
   2046 
   2047    This is the main reason why the selection must include the section at
   2048 point.  Even if a selection exists, the invoked command may disregard
   2049 it, in which case it may act on the current section only.  It is much
   2050 safer to only act on the current section but not the other selected
   2051 sections than it is to act on the current section *instead* of the
   2052 selected sections.  The latter would be much more surprising and if the
   2053 current section always is part of the selection, then that cannot
   2054 happen.
   2055 
   2056  -- Variable: magit-keep-region-overlay
   2057      This variable controls whether the region is visualized as usual
   2058      even when a valid Magit selection or a hunk-internal region exists.
   2059      See the doc-string for more information.
   2060 
   2061 
   2062 File: magit.info,  Node: The hunk-internal region,  Next: Support for Completion Frameworks,  Prev: The Selection,  Up: Completion Confirmation and the Selection
   2063 
   2064 4.5.4 The hunk-internal region
   2065 ------------------------------
   2066 
   2067 Somewhat related to the Magit selection described in the previous
   2068 section is the hunk-internal region.
   2069 
   2070    Like the selection, the hunk-internal region is based on the Emacs
   2071 region but causes that region to not be visualized as it would in other
   2072 Emacs buffers, and includes the line on which the region ends even if it
   2073 ends at the very beginning of that line.
   2074 
   2075    Unlike the selection, which is based on a region that must begin in
   2076 the heading of one section and ends in the section of a sibling section,
   2077 the hunk-internal region must begin inside the *body* of a hunk section
   2078 and end in the body of the *same* section.
   2079 
   2080    The hunk-internal region is honored by "apply" commands, which can,
   2081 among other targets, act on a hunk.  If the hunk-internal region is
   2082 active, then such commands act only on the marked part of the hunk
   2083 instead of on the complete hunk.
   2084 
   2085 
   2086 File: magit.info,  Node: Support for Completion Frameworks,  Next: Additional Completion Options,  Prev: The hunk-internal region,  Up: Completion Confirmation and the Selection
   2087 
   2088 4.5.5 Support for Completion Frameworks
   2089 ---------------------------------------
   2090 
   2091 The built-in option ‘completing-read-function’ specifies the low-level
   2092 function used by ‘completing-read’ to ask a user to select from a list
   2093 of choices.  Its default value is ‘completing-read-default’.
   2094 Alternative completion frameworks typically activate themselves by
   2095 substituting their own implementation.
   2096 
   2097    Mostly for historic reasons Magit provides a similar option named
   2098 ‘magit-completing-read-function’, which only controls the low-level
   2099 function used by ‘magit-completing-read’.  This option also makes it
   2100 possible to use a different completing mechanism for Magit than for the
   2101 rest of Emacs, but doing that is not recommend.
   2102 
   2103    You most likely don’t have to customize the magit-specific option to
   2104 use an alternative completion framework.  For example, if you enable
   2105 ‘ivy-mode’, then Magit will respect that, and if you enable ‘helm-mode’,
   2106 then you are done too.
   2107 
   2108    However if you want to use Ido, then ‘ido-mode’ won’t do the trick.
   2109 You will also have to install the ‘ido-completing-read+’ package and use
   2110 ‘magit-ido-completing-read’ as ‘magit-completing-read-function’.
   2111 
   2112  -- User Option: magit-completing-read-function
   2113      The value of this variable is the low-level function used to
   2114      perform completion by code that uses ‘magit-completing-read’ (as
   2115      opposed to the built-in ‘completing-read’).
   2116 
   2117      The default value, ‘magit-builtin-completing-read’, is suitable for
   2118      the standard completion mechanism, ‘ivy-mode’, and ‘helm-mode’ at
   2119      least.
   2120 
   2121      The built-in ‘completing-read’ and ‘completing-read-default’ are
   2122      *not* suitable to be used here.  ‘magit-builtin-completing-read’
   2123      performs some additional work, and any function used in its place
   2124      has to do the same.
   2125 
   2126  -- Function: magit-builtin-completing-read prompt choices &optional
   2127           predicate require-match initial-input hist def
   2128      This function performs completion using the built-in
   2129      ‘completing-read’ and does some additional magit-specific work.
   2130 
   2131  -- Function: magit-ido-completing-read prompt choices &optional
   2132           predicate require-match initial-input hist def
   2133      This function performs completion using ‘ido-completing-read+’ from
   2134      the package by the same name (which you have to explicitly install)
   2135      and does some additional magit-specific work.
   2136 
   2137      We have to use ‘ido-completing-read+’ instead of the
   2138      ‘ido-completing-read’ that comes with Ido itself, because the
   2139      latter, while intended as a drop-in replacement, cannot serve that
   2140      purpose because it violates too many of the implicit conventions.
   2141 
   2142  -- Function: magit-completing-read prompt choices &optional predicate
   2143           require-match initial-input hist def fallback
   2144      This is the function that Magit commands use when they need the
   2145      user to select a single thing to act on.  The arguments have the
   2146      same meaning as for ‘completing-read’, except for FALLBACK, which
   2147      is unique to this function and is described below.
   2148 
   2149      Instead of asking the user to choose from a list of possible
   2150      candidates, this function may just return the default specified by
   2151      DEF, with or without requiring user confirmation.  Whether that is
   2152      the case depends on PROMPT, ‘this-command’ and
   2153      ‘magit-dwim-selection’.  See the documentation of the latter for
   2154      more information.
   2155 
   2156      If it does read a value in the minibuffer, then this function acts
   2157      similar to ‘completing-read’, except for the following:
   2158 
   2159         • COLLECTION must be a list of choices.  A function is not
   2160           supported.
   2161 
   2162         • If REQUIRE-MATCH is ‘nil’ and the user exits without a choice,
   2163           then ‘nil’ is returned instead of an empty string.
   2164 
   2165         • If REQUIRE-MATCH is non-nil and the users exits without a
   2166           choice, an user-error is raised.
   2167 
   2168         • FALLBACK specifies a secondary default that is only used if
   2169           the primary default DEF is ‘nil’.  The secondary default is
   2170           not subject to ‘magit-dwim-selection’ — if DEF is ‘nil’ but
   2171           FALLBACK is not, then this function always asks the user to
   2172           choose a candidate, just as if both defaults were ‘nil’.
   2173 
   2174         • ‘format-prompt’ is called on PROMPT and DEF (or FALLBACK if
   2175           DEF is ‘nil’).  This appends ": " to the prompt and may also
   2176           add the default to the prompt, using the format specified by
   2177           ‘minibuffer-default-prompt-format’ and depending on
   2178           ‘magit-completing-read-default-prompt-predicate’.
   2179 
   2180 
   2181 File: magit.info,  Node: Additional Completion Options,  Prev: Support for Completion Frameworks,  Up: Completion Confirmation and the Selection
   2182 
   2183 4.5.6 Additional Completion Options
   2184 -----------------------------------
   2185 
   2186  -- User Option: magit-list-refs-sortby
   2187      For many commands that read a ref or refs from the user, the value
   2188      of this option can be used to control the order of the refs.  Valid
   2189      values include any key accepted by the ‘--sort’ flag of ‘git
   2190      for-each-ref’.  By default, refs are sorted alphabetically by their
   2191      full name (e.g., "refs/heads/master").
   2192 
   2193 
   2194 File: magit.info,  Node: Mouse Support,  Next: Running Git,  Prev: Completion Confirmation and the Selection,  Up: Interface Concepts
   2195 
   2196 4.6 Mouse Support
   2197 =================
   2198 
   2199 Double clicking on a section heading toggles the visibility of its body,
   2200 if any.  Likewise clicking in the left fringe toggles the visibility of
   2201 the appropriate section.
   2202 
   2203    A context menu is provided but has to be enabled explicitly.  In
   2204 Emacs 28 and greater, enable the global mode ‘context-menu-mode’.  If
   2205 you use an older Emacs release, set
   2206 ‘magit-section-show-context-menu-for-emacs<28’.
   2207 
   2208 
   2209 File: magit.info,  Node: Running Git,  Prev: Mouse Support,  Up: Interface Concepts
   2210 
   2211 4.7 Running Git
   2212 ===============
   2213 
   2214 * Menu:
   2215 
   2216 * Viewing Git Output::
   2217 * Git Process Status::
   2218 * Running Git Manually::
   2219 * Git Executable::
   2220 * Global Git Arguments::
   2221 
   2222 
   2223 File: magit.info,  Node: Viewing Git Output,  Next: Git Process Status,  Up: Running Git
   2224 
   2225 4.7.1 Viewing Git Output
   2226 ------------------------
   2227 
   2228 Magit runs Git either for side-effects (e.g., when pushing) or to get
   2229 some value (e.g., the name of the current branch).
   2230 
   2231    When Git is run for side-effects, the process output is logged in a
   2232 per-repository log buffer, which can be consulted using the
   2233 ‘magit-process’ command when things don’t go as expected.
   2234 
   2235    The output/errors for up to ‘magit-process-log-max’ Git commands are
   2236 retained.
   2237 
   2238 ‘$’ (‘magit-process’)
   2239      This commands displays the process buffer for the current
   2240      repository.
   2241 
   2242    Inside that buffer, the usual key bindings for navigating and showing
   2243 sections are available.  There is one additional command.
   2244 
   2245 ‘k’ (‘magit-process-kill’)
   2246      This command kills the process represented by the section at point.
   2247 
   2248  -- Variable: magit-git-debug
   2249      This option controls whether additional reporting of git errors is
   2250      enabled.
   2251 
   2252      Magit basically calls git for one of these two reasons: for
   2253      side-effects or to do something with its standard output.
   2254 
   2255      When git is run for side-effects then its output, including error
   2256      messages, go into the process buffer which is shown when using ‘$’.
   2257 
   2258      When git’s output is consumed in some way, then it would be too
   2259      expensive to also insert it into this buffer, but when this option
   2260      is non-nil and git returns with a non-zero exit status, then at
   2261      least its standard error is inserted into this buffer.
   2262 
   2263      This is only intended for debugging purposes.  Do not enable this
   2264      permanently, that would negatively affect performance.
   2265 
   2266      This is only intended for debugging purposes.  Do not enable this
   2267      permanently, that would negatively affect performance.  Also note
   2268      that just because git exits with a non-zero exit status and prints
   2269      an error message that usually doesn’t mean that it is an error as
   2270      far as Magit is concerned, which is another reason we usually hide
   2271      these error messages.  Whether some error message is relevant in
   2272      the context of some unexpected behavior has to be judged on a case
   2273      by case basis.
   2274 
   2275      The command ‘magit-toggle-git-debug’ changes the value of this
   2276      variable.
   2277 
   2278  -- Variable: magit-process-extreme-logging
   2279      This option controls whether ‘magit-process-file’ logs to the
   2280      ‘*Messages*’ buffer.
   2281 
   2282      Only intended for temporary use when you try to figure out how
   2283      Magit uses Git behind the scene.  Output that normally goes to the
   2284      magit-process buffer continues to go there.  Not all output goes to
   2285      either of these two buffers.
   2286 
   2287 
   2288 File: magit.info,  Node: Git Process Status,  Next: Running Git Manually,  Prev: Viewing Git Output,  Up: Running Git
   2289 
   2290 4.7.2 Git Process Status
   2291 ------------------------
   2292 
   2293 When a Git process is running for side-effects, Magit displays an
   2294 indicator in the mode line, using the ‘magit-mode-line-process’ face.
   2295 
   2296    If the Git process exits successfully, the process indicator is
   2297 removed from the mode line immediately.
   2298 
   2299    In the case of a Git error, the process indicator is not removed, but
   2300 is instead highlighted with the ‘magit-mode-line-process-error’ face,
   2301 and the error details from the process buffer are provided as a tooltip
   2302 for mouse users.  This error indicator persists in the mode line until
   2303 the next magit buffer refresh.
   2304 
   2305    If you do not wish process errors to be indicated in the mode line,
   2306 customize the ‘magit-process-display-mode-line-error’ user option.
   2307 
   2308    Process errors are additionally indicated at the top of the status
   2309 buffer.
   2310 
   2311 
   2312 File: magit.info,  Node: Running Git Manually,  Next: Git Executable,  Prev: Git Process Status,  Up: Running Git
   2313 
   2314 4.7.3 Running Git Manually
   2315 --------------------------
   2316 
   2317 While Magit provides many Emacs commands to interact with Git, it does
   2318 not cover everything.  In those cases your existing Git knowledge will
   2319 come in handy.  Magit provides some commands for running arbitrary Git
   2320 commands by typing them into the minibuffer, instead of having to switch
   2321 to a shell.
   2322 
   2323 ‘!’ (‘magit-run’)
   2324      This transient prefix command binds the following suffix commands
   2325      and displays them in a temporary buffer until a suffix is invoked.
   2326 
   2327 ‘! !’ (‘magit-git-command-topdir’)
   2328      This command reads a command from the user and executes it in the
   2329      top-level directory of the current working tree.
   2330 
   2331      The string "git " is used as initial input when prompting the user
   2332      for the command.  It can be removed to run another command.
   2333 
   2334 ‘:’ (‘magit-git-command’)
   2335 ‘! p’
   2336      This command reads a command from the user and executes it in
   2337      ‘default-directory’.  With a prefix argument the command is
   2338      executed in the top-level directory of the current working tree
   2339      instead.
   2340 
   2341      The string "git " is used as initial input when prompting the user
   2342      for the command.  It can be removed to run another command.
   2343 
   2344 ‘! s’ (‘magit-shell-command-topdir’)
   2345      This command reads a command from the user and executes it in the
   2346      top-level directory of the current working tree.
   2347 
   2348 ‘! S’ (‘magit-shell-command’)
   2349      This command reads a command from the user and executes it in
   2350      ‘default-directory’.  With a prefix argument the command is
   2351      executed in the top-level directory of the current working tree
   2352      instead.
   2353 
   2354  -- User Option: magit-shell-command-verbose-prompt
   2355      Whether the prompt, used by the above commands when reading a shell
   2356      command, shows the directory in which it will be run.
   2357 
   2358    These suffix commands start external gui tools.
   2359 
   2360 ‘! k’ (‘magit-run-gitk’)
   2361      This command runs ‘gitk’ in the current repository.
   2362 
   2363 ‘! a’ (‘magit-run-gitk-all’)
   2364      This command runs ‘gitk --all’ in the current repository.
   2365 
   2366 ‘! b’ (‘magit-run-gitk-branches’)
   2367      This command runs ‘gitk --branches’ in the current repository.
   2368 
   2369 ‘! g’ (‘magit-run-git-gui’)
   2370      This command runs ‘git gui’ in the current repository.
   2371 
   2372 ‘! m’ (‘magit-git-mergetool’)
   2373      This command runs ‘git mergetool --gui’ in the current repository.
   2374 
   2375      With a prefix argument this acts as a transient prefix command,
   2376      allowing the user to select the mergetool and change some settings.
   2377 
   2378 
   2379 File: magit.info,  Node: Git Executable,  Next: Global Git Arguments,  Prev: Running Git Manually,  Up: Running Git
   2380 
   2381 4.7.4 Git Executable
   2382 --------------------
   2383 
   2384 When Magit calls Git, then it may do so using the absolute path to the
   2385 ‘git’ executable, or using just its name.
   2386 
   2387    When running ‘git’ locally and the ‘system-type’ is ‘windows-nt’ (any
   2388 Windows version) or ‘darwin’ (macOS) then ‘magit-git-executable’ is set
   2389 to an absolute path when Magit is loaded.
   2390 
   2391    On Windows it is necessary to use an absolute path because Git comes
   2392 with several wrapper scripts for the actual ‘git’ binary, which are also
   2393 placed on ‘$PATH’, and using one of these wrappers instead of the binary
   2394 would degrade performance horribly.  For some macOS users using just the
   2395 name of the executable also performs horribly, so we avoid doing that on
   2396 that platform as well.  On other platforms, using just the name seems to
   2397 work just fine.
   2398 
   2399    Using an absolute path when running ‘git’ on a remote machine over
   2400 Tramp, would be problematic to use an absolute path that is suitable on
   2401 the local machine, so a separate option is used to control the name or
   2402 path that is used on remote machines.
   2403 
   2404  -- User Option: magit-git-executable
   2405      The ‘git’ executable used by Magit on the local host.  This should
   2406      be either the absolute path to the executable, or the string "git"
   2407      to let Emacs find the executable itself, using the standard
   2408      mechanism for doing such things.
   2409 
   2410  -- User Option: magit-remote-git-executable
   2411      The ‘git’ executable used by Magit on remote machines over Tramp.
   2412      Normally this should be just the string "git".  Consider
   2413      customizing ‘tramp-remote-path’ instead of this option.
   2414 
   2415    If Emacs is unable to find the correct executable, then you can work
   2416 around that by explicitly setting the value of one of these two options.
   2417 Doing that should be considered a kludge; it is better to make sure that
   2418 the order in ‘exec-path’ or ‘tramp-remote-path’ is correct.
   2419 
   2420    Note that ‘exec-path’ is set based on the value of the ‘PATH’
   2421 environment variable that is in effect when Emacs is started.  If you
   2422 set ‘PATH’ in your shell’s init files, then that only has an effect on
   2423 Emacs if you start it from that shell (because the environment of a
   2424 process is only passed to its child processes, not to arbitrary other
   2425 processes).  If that is not how you start Emacs, then the
   2426 ‘exec-path-from-shell’ package can help; though honestly I consider that
   2427 a kludge too.
   2428 
   2429    The command ‘magit-debug-git-executable’ can be useful to find out
   2430 where Emacs is searching for ‘git’.
   2431 
   2432 ‘M-x magit-debug-git-executable’
   2433      This command displays a buffer with information about
   2434      ‘magit-git-executable’ and ‘magit-remote-git-executable’.
   2435 
   2436 ‘M-x magit-version’
   2437      This command shows the currently used versions of Magit, Git, and
   2438      Emacs in the echo area.  Non-interactively this just returns the
   2439      Magit version.
   2440 
   2441 
   2442 File: magit.info,  Node: Global Git Arguments,  Prev: Git Executable,  Up: Running Git
   2443 
   2444 4.7.5 Global Git Arguments
   2445 --------------------------
   2446 
   2447  -- User Option: magit-git-global-arguments
   2448      The arguments set here are used every time the git executable is
   2449      run as a subprocess.  They are placed right after the executable
   2450      itself and before the git command - as in ‘git HERE... COMMAND
   2451      REST’.  For valid arguments see *note (gitman)git::.
   2452 
   2453      Be careful what you add here, especially if you are using Tramp to
   2454      connect to servers with ancient Git versions.  Never remove
   2455      anything that is part of the default value, unless you really know
   2456      what you are doing.  And think very hard before adding something;
   2457      it will be used every time Magit runs Git for any purpose.
   2458 
   2459 
   2460 File: magit.info,  Node: Inspecting,  Next: Manipulating,  Prev: Interface Concepts,  Up: Top
   2461 
   2462 5 Inspecting
   2463 ************
   2464 
   2465 The functionality provided by Magit can be roughly divided into three
   2466 groups: inspecting existing data, manipulating existing data or adding
   2467 new data, and transferring data.  Of course that is a rather crude
   2468 distinction that often falls short, but it’s more useful than no
   2469 distinction at all.  This section is concerned with inspecting data, the
   2470 next two with manipulating and transferring it.  Then follows a section
   2471 about miscellaneous functionality, which cannot easily be fit into this
   2472 distinction.
   2473 
   2474    Of course other distinctions make sense too, e.g., Git’s distinction
   2475 between porcelain and plumbing commands, which for the most part is
   2476 equivalent to Emacs’ distinction between interactive commands and
   2477 non-interactive functions.  All of the sections mentioned before are
   2478 mainly concerned with the porcelain – Magit’s plumbing layer is
   2479 described later.
   2480 
   2481 * Menu:
   2482 
   2483 * Status Buffer::
   2484 * Repository List::
   2485 * Logging::
   2486 * Diffing::
   2487 * Ediffing::
   2488 * References Buffer::
   2489 * Bisecting::
   2490 * Visiting Files and Blobs::
   2491 * Blaming::
   2492 
   2493 
   2494 File: magit.info,  Node: Status Buffer,  Next: Repository List,  Up: Inspecting
   2495 
   2496 5.1 Status Buffer
   2497 =================
   2498 
   2499 While other Magit buffers contain, e.g., one particular diff or one
   2500 particular log, the status buffer contains the diffs for staged and
   2501 unstaged changes, logs for unpushed and unpulled commits, lists of
   2502 stashes and untracked files, and information related to the current
   2503 branch.
   2504 
   2505    During certain incomplete operations – for example when a merge
   2506 resulted in a conflict – additional information is displayed that helps
   2507 proceeding with or aborting the operation.
   2508 
   2509    The command ‘magit-status’ displays the status buffer belonging to
   2510 the current repository in another window.  This command is used so often
   2511 that it should be bound globally.  We recommend using ‘C-x g’:
   2512 
   2513      (global-set-key (kbd "C-x g") 'magit-status)
   2514 
   2515 ‘C-x g’ (‘magit-status’)
   2516      When invoked from within an existing Git repository, then this
   2517      command shows the status of that repository in a buffer.
   2518 
   2519      If the current directory isn’t located within a Git repository,
   2520      then this command prompts for an existing repository or an
   2521      arbitrary directory, depending on the option
   2522      ‘magit-repository-directories’, and the status for the selected
   2523      repository is shown instead.
   2524 
   2525         • If that option specifies any existing repositories, then the
   2526           user is asked to select one of them.
   2527 
   2528         • Otherwise the user is asked to select an arbitrary directory
   2529           using regular file-name completion.  If the selected directory
   2530           is the top-level directory of an existing working tree, then
   2531           the status buffer for that is shown.
   2532 
   2533         • Otherwise the user is offered to initialize the selected
   2534           directory as a new repository.  After creating the repository
   2535           its status buffer is shown.
   2536 
   2537      These fallback behaviors can also be forced using one or more
   2538      prefix arguments:
   2539 
   2540         • With two prefix arguments (or more precisely a numeric prefix
   2541           value of 16 or greater) an arbitrary directory is read, which
   2542           is then acted on as described above.  The same could be
   2543           accomplished using the command ‘magit-init’.
   2544 
   2545         • With a single prefix argument an existing repository is read
   2546           from the user, or if no repository can be found based on the
   2547           value of ‘magit-repository-directories’, then the behavior is
   2548           the same as with two prefix arguments.
   2549 
   2550  -- User Option: magit-repository-directories
   2551      List of directories that are Git repositories or contain Git
   2552      repositories.
   2553 
   2554      Each element has the form ‘(DIRECTORY . DEPTH)’.  DIRECTORY has to
   2555      be a directory or a directory file-name, a string.  DEPTH, an
   2556      integer, specifies the maximum depth to look for Git repositories.
   2557      If it is 0, then only add DIRECTORY itself.
   2558 
   2559      This option controls which repositories are being listed by
   2560      ‘magit-list-repositories’.  It also affects ‘magit-status’ (which
   2561      see) in potentially surprising ways (see above).
   2562 
   2563  -- Command: magit-status-quick
   2564      This command is an alternative to ‘magit-status’ that usually
   2565      avoids refreshing the status buffer.
   2566 
   2567      If the status buffer of the current Git repository exists but isn’t
   2568      being displayed in the selected frame, then it is displayed without
   2569      being refreshed.
   2570 
   2571      If the status buffer is being displayed in the selected frame, then
   2572      this command refreshes it.
   2573 
   2574      Prefix arguments have the same meaning as for ‘magit-status’, and
   2575      additionally cause the buffer to be refresh.
   2576 
   2577      To use this command add this to your init file:
   2578 
   2579           (global-set-key (kbd "C-x g") 'magit-status-quick).
   2580 
   2581      If you do that and then for once want to redisplay the buffer and
   2582      also immediately refresh it, then type ‘C-x g’ followed by ‘g’.
   2583 
   2584      A possible alternative command is
   2585      ‘magit-display-repository-buffer’.  It supports displaying any
   2586      existing Magit buffer that belongs to the current repository; not
   2587      just the status buffer.
   2588 
   2589  -- Command: ido-enter-magit-status
   2590      From an Ido prompt used to open a file, instead drop into
   2591      ‘magit-status’.  This is similar to ‘ido-magic-delete-char’, which,
   2592      despite its name, usually causes a Dired buffer to be created.
   2593 
   2594      To make this command available, use something like:
   2595 
   2596           (add-hook 'ido-setup-hook
   2597                     (lambda ()
   2598                       (define-key ido-completion-map
   2599                         (kbd \"C-x g\") 'ido-enter-magit-status)))
   2600 
   2601      Starting with Emacs 25.1 the Ido keymaps are defined just once
   2602      instead of every time Ido is invoked, so now you can modify it like
   2603      pretty much every other keymap:
   2604 
   2605           (define-key ido-common-completion-map
   2606             (kbd \"C-x g\") 'ido-enter-magit-status)
   2607 
   2608 * Menu:
   2609 
   2610 * Status Sections::
   2611 * Status Header Sections::
   2612 * Status Module Sections::
   2613 * Status Options::
   2614 
   2615 
   2616 File: magit.info,  Node: Status Sections,  Next: Status Header Sections,  Up: Status Buffer
   2617 
   2618 5.1.1 Status Sections
   2619 ---------------------
   2620 
   2621 The contents of status buffers is controlled using the hook
   2622 ‘magit-status-sections-hook’.  See *note Section Hooks:: to learn about
   2623 such hooks and how to customize them.
   2624 
   2625  -- User Option: magit-status-sections-hook
   2626      Hook run to insert sections into a status buffer.
   2627 
   2628    The first function on that hook by default is
   2629 ‘magit-insert-status-headers’; it is described in the next section.  By
   2630 default the following functions are also members of that hook:
   2631 
   2632  -- Function: magit-insert-merge-log
   2633      Insert section for the on-going merge.  Display the heads that are
   2634      being merged.  If no merge is in progress, do nothing.
   2635 
   2636  -- Function: magit-insert-rebase-sequence
   2637      Insert section for the on-going rebase sequence.  If no such
   2638      sequence is in progress, do nothing.
   2639 
   2640  -- Function: magit-insert-am-sequence
   2641      Insert section for the on-going patch applying sequence.  If no
   2642      such sequence is in progress, do nothing.
   2643 
   2644  -- Function: magit-insert-sequencer-sequence
   2645      Insert section for the on-going cherry-pick or revert sequence.  If
   2646      no such sequence is in progress, do nothing.
   2647 
   2648  -- Function: magit-insert-bisect-output
   2649      While bisecting, insert section with output from ‘git bisect’.
   2650 
   2651  -- Function: magit-insert-bisect-rest
   2652      While bisecting, insert section visualizing the bisect state.
   2653 
   2654  -- Function: magit-insert-bisect-log
   2655      While bisecting, insert section logging bisect progress.
   2656 
   2657  -- Function: magit-insert-untracked-files
   2658      Maybe insert a list or tree of untracked files.
   2659 
   2660      Do so depending on the value of ‘status.showUntrackedFiles’.  Note
   2661      that even if the value is ‘all’, Magit still initially only shows
   2662      directories.  But the directory sections can then be expanded using
   2663      ‘TAB’.
   2664 
   2665  -- Function: magit-insert-unstaged-changes
   2666      Insert section showing unstaged changes.
   2667 
   2668  -- Function: magit-insert-staged-changes
   2669      Insert section showing staged changes.
   2670 
   2671  -- Function: magit-insert-stashes &optional ref heading
   2672      Insert the ‘stashes’ section showing reflog for "refs/stash".  If
   2673      optional REF is non-nil show reflog for that instead.  If optional
   2674      HEADING is non-nil use that as section heading instead of
   2675      "Stashes:".
   2676 
   2677  -- Function: magit-insert-unpulled-from-upstream
   2678      Insert section showing commits that haven’t been pulled from the
   2679      upstream branch yet.
   2680 
   2681  -- Function: magit-insert-unpulled-from-pushremote
   2682      Insert section showing commits that haven’t been pulled from the
   2683      push-remote branch yet.
   2684 
   2685  -- Function: magit-insert-unpushed-to-upstream
   2686      Insert section showing commits that haven’t been pushed to the
   2687      upstream yet.
   2688 
   2689  -- Function: magit-insert-unpushed-to-pushremote
   2690      Insert section showing commits that haven’t been pushed to the
   2691      push-remote yet.
   2692 
   2693    The following functions can also be added to the above hook:
   2694 
   2695  -- Function: magit-insert-tracked-files
   2696      Insert a tree of tracked files.
   2697 
   2698  -- Function: magit-insert-ignored-files
   2699      Insert a tree of ignored files.  Its possible to limit the logs in
   2700      the current buffer to a certain directory using ‘D = f <DIRECTORY>
   2701      RET g’.  If you do that, then that that also affects this command.
   2702 
   2703      The log filter can be used to limit to multiple files.  In that
   2704      case this function only respects the first of the files and only if
   2705      it is a directory.
   2706 
   2707  -- Function: magit-insert-skip-worktree-files
   2708      Insert a tree of skip-worktree files.  If the first element of
   2709      ‘magit-buffer-diff-files’ is a directory, then limit the list to
   2710      files below that.  The value of that variable can be set using ‘D
   2711      -- DIRECTORY RET g’.
   2712 
   2713  -- Function: magit-insert-assumed-unchanged-files
   2714      Insert a tree of files that are assumed to be unchanged.  If the
   2715      first element of ‘magit-buffer-diff-files’ is a directory, then
   2716      limit the list to files below that.  The value of that variable can
   2717      be set using ‘D -- DIRECTORY RET g’.
   2718 
   2719  -- Function: magit-insert-unpulled-or-recent-commits
   2720      Insert section showing unpulled or recent commits.  If an upstream
   2721      is configured for the current branch and it is ahead of the current
   2722      branch, then show the missing commits.  Otherwise, show the last
   2723      ‘magit-log-section-commit-count’ commits.
   2724 
   2725  -- Function: magit-insert-recent-commits
   2726      Insert section showing the last ‘magit-log-section-commit-count’
   2727      commits.
   2728 
   2729  -- User Option: magit-log-section-commit-count
   2730      How many recent commits ‘magit-insert-recent-commits’ and
   2731      ‘magit-insert-unpulled-or-recent-commits’ (provided there are no
   2732      unpulled commits) show.
   2733 
   2734  -- Function: magit-insert-unpulled-cherries
   2735      Insert section showing unpulled commits.  Like
   2736      ‘magit-insert-unpulled-commits’ but prefix each commit that has not
   2737      been applied yet (i.e., a commit with a patch-id not shared with
   2738      any local commit) with "+", and all others with "-".
   2739 
   2740  -- Function: magit-insert-unpushed-cherries
   2741      Insert section showing unpushed commits.  Like
   2742      ‘magit-insert-unpushed-commits’ but prefix each commit which has
   2743      not been applied to upstream yet (i.e., a commit with a patch-id
   2744      not shared with any upstream commit) with "+" and all others with
   2745      "-".
   2746 
   2747    See *note References Buffer:: for some more section inserters, which
   2748 could be used here.
   2749 
   2750 
   2751 File: magit.info,  Node: Status Header Sections,  Next: Status Module Sections,  Prev: Status Sections,  Up: Status Buffer
   2752 
   2753 5.1.2 Status Header Sections
   2754 ----------------------------
   2755 
   2756 The contents of status buffers is controlled using the hook
   2757 ‘magit-status-sections-hook’ (see *note Status Sections::).
   2758 
   2759    By default ‘magit-insert-status-headers’ is the first member of that
   2760 hook variable.
   2761 
   2762  -- Function: magit-insert-status-headers
   2763      Insert headers sections appropriate for ‘magit-status-mode’
   2764      buffers.  The sections are inserted by running the functions on the
   2765      hook ‘magit-status-headers-hook’.
   2766 
   2767  -- User Option: magit-status-headers-hook
   2768      Hook run to insert headers sections into the status buffer.
   2769 
   2770      This hook is run by ‘magit-insert-status-headers’, which in turn
   2771      has to be a member of ‘magit-status-sections-hook’ to be used at
   2772      all.
   2773 
   2774    By default the following functions are members of the above hook:
   2775 
   2776  -- Function: magit-insert-error-header
   2777      Insert a header line showing the message about the Git error that
   2778      just occurred.
   2779 
   2780      This function is only aware of the last error that occur when Git
   2781      was run for side-effects.  If, for example, an error occurs while
   2782      generating a diff, then that error won’t be inserted.  Refreshing
   2783      the status buffer causes this section to disappear again.
   2784 
   2785  -- Function: magit-insert-diff-filter-header
   2786      Insert a header line showing the effective diff filters.
   2787 
   2788  -- Function: magit-insert-head-branch-header
   2789      Insert a header line about the current branch or detached ‘HEAD’.
   2790 
   2791  -- Function: magit-insert-upstream-branch-header
   2792      Insert a header line about the branch that is usually pulled into
   2793      the current branch.
   2794 
   2795  -- Function: magit-insert-push-branch-header
   2796      Insert a header line about the branch that the current branch is
   2797      usually pushed to.
   2798 
   2799  -- Function: magit-insert-tags-header
   2800      Insert a header line about the current and/or next tag, along with
   2801      the number of commits between the tag and ‘HEAD’.
   2802 
   2803    The following functions can also be added to the above hook:
   2804 
   2805  -- Function: magit-insert-repo-header
   2806      Insert a header line showing the path to the repository top-level.
   2807 
   2808  -- Function: magit-insert-remote-header
   2809      Insert a header line about the remote of the current branch.
   2810 
   2811      If no remote is configured for the current branch, then fall back
   2812      showing the "origin" remote, or if that does not exist the first
   2813      remote in alphabetic order.
   2814 
   2815  -- Function: magit-insert-user-header
   2816      Insert a header line about the current user.
   2817 
   2818 
   2819 File: magit.info,  Node: Status Module Sections,  Next: Status Options,  Prev: Status Header Sections,  Up: Status Buffer
   2820 
   2821 5.1.3 Status Module Sections
   2822 ----------------------------
   2823 
   2824 The contents of status buffers is controlled using the hook
   2825 ‘magit-status-sections-hook’ (see *note Status Sections::).
   2826 
   2827    By default ‘magit-insert-modules’ is _not_ a member of that hook
   2828 variable.
   2829 
   2830  -- Function: magit-insert-modules
   2831      Insert submodule sections.
   2832 
   2833      Hook ‘magit-module-sections-hook’ controls which module sections
   2834      are inserted, and option ‘magit-module-sections-nested’ controls
   2835      whether they are wrapped in an additional section.
   2836 
   2837  -- User Option: magit-module-sections-hook
   2838      Hook run by ‘magit-insert-modules’.
   2839 
   2840  -- User Option: magit-module-sections-nested
   2841      This option controls whether ‘magit-insert-modules’ wraps inserted
   2842      sections in an additional section.
   2843 
   2844      If this is non-nil, then only a single top-level section is
   2845      inserted.  If it is nil, then all sections listed in
   2846      ‘magit-module-sections-hook’ become top-level sections.
   2847 
   2848  -- Function: magit-insert-modules-overview
   2849      Insert sections for all submodules.  For each section insert the
   2850      path, the branch, and the output of ‘git describe --tags’, or,
   2851      failing that, the abbreviated HEAD commit hash.
   2852 
   2853      Press ‘RET’ on such a submodule section to show its own status
   2854      buffer.  Press ‘RET’ on the "Modules" section to display a list of
   2855      submodules in a separate buffer.  This shows additional information
   2856      not displayed in the super-repository’s status buffer.
   2857 
   2858  -- Function: magit-insert-modules-unpulled-from-upstream
   2859      Insert sections for modules that haven’t been pulled from the
   2860      upstream yet.  These sections can be expanded to show the
   2861      respective commits.
   2862 
   2863  -- Function: magit-insert-modules-unpulled-from-pushremote
   2864      Insert sections for modules that haven’t been pulled from the
   2865      push-remote yet.  These sections can be expanded to show the
   2866      respective commits.
   2867 
   2868  -- Function: magit-insert-modules-unpushed-to-upstream
   2869      Insert sections for modules that haven’t been pushed to the
   2870      upstream yet.  These sections can be expanded to show the
   2871      respective commits.
   2872 
   2873  -- Function: magit-insert-modules-unpushed-to-pushremote
   2874      Insert sections for modules that haven’t been pushed to the
   2875      push-remote yet.  These sections can be expanded to show the
   2876      respective commits.
   2877 
   2878 
   2879 File: magit.info,  Node: Status Options,  Prev: Status Module Sections,  Up: Status Buffer
   2880 
   2881 5.1.4 Status Options
   2882 --------------------
   2883 
   2884  -- User Option: magit-status-margin
   2885      This option specifies whether the margin is initially shown in
   2886      Magit-Status mode buffers and how it is formatted.
   2887 
   2888      The value has the form ‘(INIT STYLE WIDTH AUTHOR AUTHOR-WIDTH)’.
   2889 
   2890         • If INIT is non-nil, then the margin is shown initially.
   2891         • STYLE controls how to format the author or committer date.  It
   2892           can be one of ‘age’ (to show the age of the commit),
   2893           ‘age-abbreviated’ (to abbreviate the time unit to a
   2894           character), or a string (suitable for ‘format-time-string’) to
   2895           show the actual date.  Option
   2896           ‘magit-log-margin-show-committer-date’ controls which date is
   2897           being displayed.
   2898         • WIDTH controls the width of the margin.  This exists for
   2899           forward compatibility and currently the value should not be
   2900           changed.
   2901         • AUTHOR controls whether the name of the author is also shown
   2902           by default.
   2903         • AUTHOR-WIDTH has to be an integer.  When the name of the
   2904           author is shown, then this specifies how much space is used to
   2905           do so.
   2906 
   2907    Also see the proceeding section for more options concerning status
   2908 buffers.
   2909 
   2910 
   2911 File: magit.info,  Node: Repository List,  Next: Logging,  Prev: Status Buffer,  Up: Inspecting
   2912 
   2913 5.2 Repository List
   2914 ===================
   2915 
   2916  -- Command: magit-list-repositories
   2917      This command displays a list of repositories in a separate buffer.
   2918 
   2919      The option ‘magit-repository-directories’ controls which
   2920      repositories are displayed.
   2921 
   2922  -- User Option: magit-repolist-columns
   2923      This option controls what columns are displayed by the command
   2924      ‘magit-list-repositories’ and how they are displayed.
   2925 
   2926      Each element has the form ‘(HEADER WIDTH FORMAT PROPS)’.
   2927 
   2928      HEADER is the string displayed in the header.  WIDTH is the width
   2929      of the column.  FORMAT is a function that is called with one
   2930      argument, the repository identification (usually its basename), and
   2931      with ‘default-directory’ bound to the toplevel of its working tree.
   2932      It has to return a string to be inserted or nil.  PROPS is an alist
   2933      that supports the keys ‘:right-align’, ‘:pad-right’ and ‘:sort’.
   2934 
   2935      The ‘:sort’ function has a weird interface described in the
   2936      docstring of ‘tabulated-list--get-sort’.  Alternatively ‘<’ and
   2937      ‘magit-repolist-version<’ can be used as those functions are
   2938      automatically replaced with functions that satisfy the interface.
   2939      Set ‘:sort’ to ‘nil’ to inhibit sorting; if unspecified, then the
   2940      column is sortable using the default sorter.
   2941 
   2942      You may wish to display a range of numeric columns using just one
   2943      character per column and without any padding between columns, in
   2944      which case you should use an appropriate HEADER, set WIDTH to 1,
   2945      and set ‘:pad-right’ to 9.  ‘+’ is substituted for numbers higher
   2946      than 9.
   2947 
   2948 The following functions can be added to the above option:
   2949 
   2950  -- Function: magit-repolist-column-ident
   2951      This function inserts the identification of the repository.
   2952      Usually this is just its basename.
   2953 
   2954  -- Function: magit-repolist-column-path
   2955      This function inserts the absolute path of the repository.
   2956 
   2957  -- Function: magit-repolist-column-version
   2958      This function inserts a description of the repository’s ‘HEAD’
   2959      revision.
   2960 
   2961  -- Function: magit-repolist-column-branch
   2962      This function inserts the name of the current branch.
   2963 
   2964  -- Function: magit-repolist-column-upstream
   2965      This function inserts the name of the upstream branch of the
   2966      current branch.
   2967 
   2968  -- Function: magit-repolist-column-branches
   2969      This function inserts the number of branches.
   2970 
   2971  -- Function: magit-repolist-column-stashes
   2972      This function inserts the number of stashes.
   2973 
   2974  -- Function: magit-repolist-column-flag
   2975      This function inserts a flag as specified by
   2976      ‘magit-repolist-column-flag-alist’.
   2977 
   2978      By default this indicates whether there are uncommitted changes.
   2979 
   2980         • ‘N’ if there is at least one untracked file.
   2981         • ‘U’ if there is at least one unstaged file.
   2982         • ‘S’ if there is at least one staged file.
   2983 
   2984      Only the first one of these that applies is shown.
   2985 
   2986  -- Function: magit-repolist-column-flags
   2987      This functions insert all flags as specified by
   2988      ‘magit-repolist-column-flag-alist’.
   2989 
   2990      This is an alternative to function ‘magit-repolist-column-flag’,
   2991      which only lists the first one found.
   2992 
   2993  -- Function: magit-repolist-column-unpulled-from-upstream
   2994      This function inserts the number of upstream commits not in the
   2995      current branch.
   2996 
   2997  -- Function: magit-repolist-column-unpulled-from-pushremote
   2998      This function inserts the number of commits in the push branch but
   2999      not the current branch.
   3000 
   3001  -- Function: magit-repolist-column-unpushed-to-upstream
   3002      This function inserts the number of commits in the current branch
   3003      but not its upstream.
   3004 
   3005  -- Function: magit-repolist-column-unpushed-to-pushremote
   3006      This function inserts the number of commits in the current branch
   3007      but not its push branch.
   3008 
   3009 The following commands are available in repolist buffers:
   3010 
   3011 ‘<RET>’ (‘magit-repolist-status’)
   3012      This command shows the status for the repository at point.
   3013 
   3014 ‘m’ (‘magit-repolist-mark’)
   3015      This command marks the repository at point.
   3016 
   3017 ‘u’ (‘magit-repolist-unmark’)
   3018      This command unmarks the repository at point.
   3019 
   3020 ‘f’ (‘magit-repolist-fetch’)
   3021      This command fetches all marked repositories.  If no repositories
   3022      are marked, then it offers to fetch all displayed repositories.
   3023 
   3024 ‘5’ (‘magit-repolist-find-file-other-frame’)
   3025      This command reads a relative file-name (without completion) and
   3026      opens the respective file in each marked repository in a new frame.
   3027      If no repositories are marked, then it offers to do this for all
   3028      displayed repositories.
   3029 
   3030 
   3031 File: magit.info,  Node: Logging,  Next: Diffing,  Prev: Repository List,  Up: Inspecting
   3032 
   3033 5.3 Logging
   3034 ===========
   3035 
   3036 The status buffer contains logs for the unpushed and unpulled commits,
   3037 but that obviously isn’t enough.  The transient prefix command
   3038 ‘magit-log’, on ‘l’, features several suffix commands, which show a
   3039 specific log in a separate log buffer.
   3040 
   3041    Like other transient prefix commands, ‘magit-log’ also features
   3042 several infix arguments that can be changed before invoking one of the
   3043 suffix commands.  However, in the case of the log transient, these
   3044 arguments may be taken from those currently in use in the current
   3045 repository’s log buffer, depending on the value of
   3046 ‘magit-prefix-use-buffer-arguments’ (see *note Transient Arguments and
   3047 Buffer Variables::).
   3048 
   3049    For information about the various arguments, see *note
   3050 (gitman)git-log::.
   3051 
   3052    The switch ‘++order=VALUE’ is converted to one of
   3053 ‘--author-date-order’, ‘--date-order’, or ‘--topo-order’ before being
   3054 passed to ‘git log’.
   3055 
   3056    The log transient also features several reflog commands.  See *note
   3057 Reflog::.
   3058 
   3059 ‘l’ (‘magit-log’)
   3060      This transient prefix command binds the following suffix commands
   3061      along with the appropriate infix arguments and displays them in a
   3062      temporary buffer until a suffix is invoked.
   3063 
   3064 ‘l l’ (‘magit-log-current’)
   3065      Show log for the current branch.  When ‘HEAD’ is detached or with a
   3066      prefix argument, show log for one or more revs read from the
   3067      minibuffer.
   3068 
   3069 ‘l h’ (‘magit-log-head’)
   3070      Show log for ‘HEAD’.
   3071 
   3072 ‘l u’ (‘magit-log-related’)
   3073      Show log for the current branch, its upstream and its push target.
   3074      When the upstream is a local branch, then also show its own
   3075      upstream.  When ‘HEAD’ is detached, then show log for that, the
   3076      previously checked out branch and its upstream and push-target.
   3077 
   3078 ‘l o’ (‘magit-log-other’)
   3079      Show log for one or more revs read from the minibuffer.  The user
   3080      can input any revision or revisions separated by a space, or even
   3081      ranges, but only branches, tags, and a representation of the commit
   3082      at point are available as completion candidates.
   3083 
   3084 ‘l L’ (‘magit-log-branches’)
   3085      Show log for all local branches and ‘HEAD’.
   3086 
   3087 ‘l b’ (‘magit-log-all-branches’)
   3088      Show log for all local and remote branches and ‘HEAD’.
   3089 
   3090 ‘l a’ (‘magit-log-all’)
   3091      Show log for all references and ‘HEAD’.
   3092 
   3093    Two additional commands that show the log for the file or blob that
   3094 is being visited in the current buffer exists, see *note Commands for
   3095 Buffers Visiting Files::.  The command ‘magit-cherry’ also shows a log,
   3096 see *note Cherries::.
   3097 
   3098 * Menu:
   3099 
   3100 * Refreshing Logs::
   3101 * Log Buffer::
   3102 * Log Margin::
   3103 * Select from Log::
   3104 * Reflog::
   3105 * Cherries::
   3106 
   3107 
   3108 File: magit.info,  Node: Refreshing Logs,  Next: Log Buffer,  Up: Logging
   3109 
   3110 5.3.1 Refreshing Logs
   3111 ---------------------
   3112 
   3113 The transient prefix command ‘magit-log-refresh’, on ‘L’, can be used to
   3114 change the log arguments used in the current buffer, without changing
   3115 which log is shown.  This works in dedicated log buffers, but also in
   3116 the status buffer.
   3117 
   3118 ‘L’ (‘magit-log-refresh’)
   3119      This transient prefix command binds the following suffix commands
   3120      along with the appropriate infix arguments and displays them in a
   3121      temporary buffer until a suffix is invoked.
   3122 
   3123 ‘L g’ (‘magit-log-refresh’)
   3124      This suffix command sets the local log arguments for the current
   3125      buffer.
   3126 
   3127 ‘L s’ (‘magit-log-set-default-arguments’)
   3128      This suffix command sets the default log arguments for buffers of
   3129      the same type as that of the current buffer.  Other existing
   3130      buffers of the same type are not affected because their local
   3131      values have already been initialized.
   3132 
   3133 ‘L w’ (‘magit-log-save-default-arguments’)
   3134      This suffix command sets the default log arguments for buffers of
   3135      the same type as that of the current buffer, and saves the value
   3136      for future sessions.  Other existing buffers of the same type are
   3137      not affected because their local values have already been
   3138      initialized.
   3139 
   3140 ‘L L’ (‘magit-toggle-margin’)
   3141      Show or hide the margin.
   3142 
   3143 
   3144 File: magit.info,  Node: Log Buffer,  Next: Log Margin,  Prev: Refreshing Logs,  Up: Logging
   3145 
   3146 5.3.2 Log Buffer
   3147 ----------------
   3148 
   3149 ‘L’ (‘magit-log-refresh’)
   3150      This transient prefix command binds the following suffix commands
   3151      along with the appropriate infix arguments and displays them in a
   3152      temporary buffer until a suffix is invoked.
   3153 
   3154      See *note Refreshing Logs::.
   3155 
   3156 ‘q’ (‘magit-log-bury-buffer’)
   3157      Bury the current buffer or the revision buffer in the same frame.
   3158      Like ‘magit-mode-bury-buffer’ (which see) but with a negative
   3159      prefix argument instead bury the revision buffer, provided it is
   3160      displayed in the current frame.
   3161 
   3162 ‘C-c C-b’ (‘magit-go-backward’)
   3163      Move backward in current buffer’s history.
   3164 
   3165 ‘C-c C-f’ (‘magit-go-forward’)
   3166      Move forward in current buffer’s history.
   3167 
   3168 ‘C-c C-n’ (‘magit-log-move-to-parent’)
   3169      Move to a parent of the current commit.  By default, this is the
   3170      first parent, but a numeric prefix can be used to specify another
   3171      parent.
   3172 
   3173 ‘j’ (‘magit-log-move-to-revision’)
   3174      Read a revision and move to it in current log buffer.
   3175 
   3176      If the chosen reference or revision isn’t being displayed in the
   3177      current log buffer, then inform the user about that and do nothing
   3178      else.
   3179 
   3180      If invoked outside any log buffer, then display the log buffer of
   3181      the current repository first; creating it if necessary.
   3182 
   3183 ‘<SPC>’ (‘magit-diff-show-or-scroll-up’)
   3184      Update the commit or diff buffer for the thing at point.
   3185 
   3186      Either show the commit or stash at point in the appropriate buffer,
   3187      or if that buffer is already being displayed in the current frame
   3188      and contains information about that commit or stash, then instead
   3189      scroll the buffer up.  If there is no commit or stash at point,
   3190      then prompt for a commit.
   3191 
   3192 ‘<DEL>’ (‘magit-diff-show-or-scroll-down’)
   3193      Update the commit or diff buffer for the thing at point.
   3194 
   3195      Either show the commit or stash at point in the appropriate buffer,
   3196      or if that buffer is already being displayed in the current frame
   3197      and contains information about that commit or stash, then instead
   3198      scroll the buffer down.  If there is no commit or stash at point,
   3199      then prompt for a commit.
   3200 
   3201 ‘=’ (‘magit-log-toggle-commit-limit’)
   3202      Toggle the number of commits the current log buffer is limited to.
   3203      If the number of commits is currently limited, then remove that
   3204      limit.  Otherwise set it to 256.
   3205 
   3206 ‘+’ (‘magit-log-double-commit-limit’)
   3207      Double the number of commits the current log buffer is limited to.
   3208 
   3209 ‘-’ (‘magit-log-half-commit-limit’)
   3210      Half the number of commits the current log buffer is limited to.
   3211 
   3212  -- User Option: magit-log-auto-more
   3213      Insert more log entries automatically when moving past the last
   3214      entry.  Only considered when moving past the last entry with
   3215      ‘magit-goto-*-section’ commands.
   3216 
   3217  -- User Option: magit-log-show-refname-after-summary
   3218      Whether to show the refnames after the commit summaries.  This is
   3219      useful if you use really long branch names.
   3220 
   3221  -- User Option: magit-log-show-color-graph-limit
   3222      When showing more commits than specified by this option, then the
   3223      ‘--color’ argument, if specified, is silently dropped.  This is
   3224      necessary because the ‘ansi-color’ library, which is used to turn
   3225      control sequences into faces, is just too slow.
   3226 
   3227  -- User Option: magit-log-show-signatures-limit
   3228      When showing more commits than specified by this option, then the
   3229      ‘--show-signature’ argument, if specified, is silently dropped.
   3230      This is necessary because checking the signature of a large number
   3231      of commits is just too slow.
   3232 
   3233    Magit displays references in logs a bit differently from how Git does
   3234 it.
   3235 
   3236    Local branches are blue and remote branches are green.  Of course
   3237 that depends on the used theme, as do the colors used for other types of
   3238 references.  The current branch has a box around it, as do remote
   3239 branches that are their respective remote’s ‘HEAD’ branch.
   3240 
   3241    If a local branch and its push-target point at the same commit, then
   3242 their names are combined to preserve space and to make that relationship
   3243 visible.  For example:
   3244 
   3245      origin/feature
   3246      [green][blue-]
   3247 
   3248      instead of
   3249 
   3250      feature origin/feature
   3251      [blue-] [green-------]
   3252 
   3253    Also note that while the transient features the ‘--show-signature’
   3254 argument, that won’t actually be used when enabled, because Magit
   3255 defaults to use just one line per commit.  Instead the commit colorized
   3256 to indicate the validity of the signed commit object, using the faces
   3257 named ‘magit-signature-*’ (which see).
   3258 
   3259    For a description of ‘magit-log-margin’ see *note Log Margin::.
   3260 
   3261 
   3262 File: magit.info,  Node: Log Margin,  Next: Select from Log,  Prev: Log Buffer,  Up: Logging
   3263 
   3264 5.3.3 Log Margin
   3265 ----------------
   3266 
   3267 In buffers which show one or more logs, it is possible to show
   3268 additional information about each commit in the margin.  The options
   3269 used to configure the margin are named ‘magit-INFIX-margin’, where INFIX
   3270 is the same as in the respective major-mode ‘magit-INFIX-mode’.  In
   3271 regular log buffers that would be ‘magit-log-margin’.
   3272 
   3273  -- User Option: magit-log-margin
   3274      This option specifies whether the margin is initially shown in
   3275      Magit-Log mode buffers and how it is formatted.
   3276 
   3277      The value has the form ‘(INIT STYLE WIDTH AUTHOR AUTHOR-WIDTH)’.
   3278 
   3279         • If INIT is non-nil, then the margin is shown initially.
   3280         • STYLE controls how to format the author or committer date.  It
   3281           can be one of ‘age’ (to show the age of the commit),
   3282           ‘age-abbreviated’ (to abbreviate the time unit to a
   3283           character), or a string (suitable for ‘format-time-string’) to
   3284           show the actual date.  Option
   3285           ‘magit-log-margin-show-committer-date’ controls which date is
   3286           being displayed.
   3287         • WIDTH controls the width of the margin.  This exists for
   3288           forward compatibility and currently the value should not be
   3289           changed.
   3290         • AUTHOR controls whether the name of the author is also shown
   3291           by default.
   3292         • AUTHOR-WIDTH has to be an integer.  When the name of the
   3293           author is shown, then this specifies how much space is used to
   3294           do so.
   3295 
   3296    You can change the STYLE and AUTHOR-WIDTH of all ‘magit-INFIX-margin’
   3297 options to the same values by customizing ‘magit-log-margin’ *before*
   3298 ‘magit’ is loaded.  If you do that, then the respective values for the
   3299 other options will default to what you have set for that variable.
   3300 Likewise if you set INIT in ‘magit-log-margin’ to ‘nil’, then that is
   3301 used in the default of all other options.  But setting it to ‘t’, i.e.
   3302 re-enforcing the default for that option, does not carry to other
   3303 options.
   3304 
   3305  -- User Option: magit-log-margin-show-committer-date
   3306      This option specifies whether to show the committer date in the
   3307      margin.  This option only controls whether the committer date is
   3308      displayed instead of the author date.  Whether some date is
   3309      displayed in the margin and whether the margin is displayed at all
   3310      is controlled by other options.
   3311 
   3312 ‘L’ (‘magit-margin-settings’)
   3313      This transient prefix command binds the following suffix commands,
   3314      each of which changes the appearance of the margin in some way.
   3315 
   3316    In some buffers that support the margin, ‘L’ is instead bound to
   3317 ‘magit-log-refresh’, but that transient features the same commands, and
   3318 then some other unrelated commands.
   3319 
   3320 ‘L L’ (‘magit-toggle-margin’)
   3321      This command shows or hides the margin.
   3322 
   3323 ‘L l’ (‘magit-cycle-margin-style’)
   3324      This command cycles the style used for the margin.
   3325 
   3326 ‘L d’ (‘magit-toggle-margin-details’)
   3327      This command shows or hides details in the margin.
   3328 
   3329 
   3330 File: magit.info,  Node: Select from Log,  Next: Reflog,  Prev: Log Margin,  Up: Logging
   3331 
   3332 5.3.4 Select from Log
   3333 ---------------------
   3334 
   3335 When the user has to select a recent commit that is reachable from
   3336 ‘HEAD’, using regular completion would be inconvenient (because most
   3337 humans cannot remember hashes or "HEAD~5", at least not without double
   3338 checking).  Instead a log buffer is used to select the commit, which has
   3339 the advantage that commits are presented in order and with the commit
   3340 message.
   3341 
   3342    Such selection logs are used when selecting the beginning of a rebase
   3343 and when selecting the commit to be squashed into.
   3344 
   3345    In addition to the key bindings available in all log buffers, the
   3346 following additional key bindings are available in selection log
   3347 buffers:
   3348 
   3349 ‘C-c C-c’ (‘magit-log-select-pick’)
   3350      Select the commit at point and act on it.  Call
   3351      ‘magit-log-select-pick-function’ with the selected commit as
   3352      argument.
   3353 
   3354 ‘C-c C-k’ (‘magit-log-select-quit’)
   3355      Abort selecting a commit, don’t act on any commit.
   3356 
   3357  -- User Option: magit-log-select-margin
   3358      This option specifies whether the margin is initially shown in
   3359      Magit-Log-Select mode buffers and how it is formatted.
   3360 
   3361      The value has the form ‘(INIT STYLE WIDTH AUTHOR AUTHOR-WIDTH)’.
   3362 
   3363         • If INIT is non-nil, then the margin is shown initially.
   3364         • STYLE controls how to format the author or committer date.  It
   3365           can be one of ‘age’ (to show the age of the commit),
   3366           ‘age-abbreviated’ (to abbreviate the time unit to a
   3367           character), or a string (suitable for ‘format-time-string’) to
   3368           show the actual date.  Option
   3369           ‘magit-log-margin-show-committer-date’ controls which date is
   3370           being displayed.
   3371         • WIDTH controls the width of the margin.  This exists for
   3372           forward compatibility and currently the value should not be
   3373           changed.
   3374         • AUTHOR controls whether the name of the author is also shown
   3375           by default.
   3376         • AUTHOR-WIDTH has to be an integer.  When the name of the
   3377           author is shown, then this specifies how much space is used to
   3378           do so.
   3379 
   3380 
   3381 File: magit.info,  Node: Reflog,  Next: Cherries,  Prev: Select from Log,  Up: Logging
   3382 
   3383 5.3.5 Reflog
   3384 ------------
   3385 
   3386 Also see *note (gitman)git-reflog::.
   3387 
   3388    These reflog commands are available from the log transient.  See
   3389 *note Logging::.
   3390 
   3391 ‘l r’ (‘magit-reflog-current’)
   3392      Display the reflog of the current branch.
   3393 
   3394 ‘l O’ (‘magit-reflog-other’)
   3395      Display the reflog of a branch or another ref.
   3396 
   3397 ‘l H’ (‘magit-reflog-head’)
   3398      Display the ‘HEAD’ reflog.
   3399 
   3400  -- User Option: magit-reflog-margin
   3401      This option specifies whether the margin is initially shown in
   3402      Magit-Reflog mode buffers and how it is formatted.
   3403 
   3404      The value has the form ‘(INIT STYLE WIDTH AUTHOR AUTHOR-WIDTH)’.
   3405 
   3406         • If INIT is non-nil, then the margin is shown initially.
   3407         • STYLE controls how to format the author or committer date.  It
   3408           can be one of ‘age’ (to show the age of the commit),
   3409           ‘age-abbreviated’ (to abbreviate the time unit to a
   3410           character), or a string (suitable for ‘format-time-string’) to
   3411           show the actual date.  Option
   3412           ‘magit-log-margin-show-committer-date’ controls which date is
   3413           being displayed.
   3414         • WIDTH controls the width of the margin.  This exists for
   3415           forward compatibility and currently the value should not be
   3416           changed.
   3417         • AUTHOR controls whether the name of the author is also shown
   3418           by default.
   3419         • AUTHOR-WIDTH has to be an integer.  When the name of the
   3420           author is shown, then this specifies how much space is used to
   3421           do so.
   3422 
   3423 
   3424 File: magit.info,  Node: Cherries,  Prev: Reflog,  Up: Logging
   3425 
   3426 5.3.6 Cherries
   3427 --------------
   3428 
   3429 Cherries are commits that haven’t been applied upstream (yet), and are
   3430 usually visualized using a log.  Each commit is prefixed with ‘-’ if it
   3431 has an equivalent in the upstream and ‘+’ if it does not, i.e., if it is
   3432 a cherry.
   3433 
   3434    The command ‘magit-cherry’ shows cherries for a single branch, but
   3435 the references buffer (see *note References Buffer::) can show cherries
   3436 for multiple "upstreams" at once.
   3437 
   3438    Also see *note (gitman)git-reflog::.
   3439 
   3440 ‘Y’ (‘magit-cherry’)
   3441      Show commits that are in a certain branch but that have not been
   3442      merged in the upstream branch.
   3443 
   3444  -- User Option: magit-cherry-margin
   3445      This option specifies whether the margin is initially shown in
   3446      Magit-Cherry mode buffers and how it is formatted.
   3447 
   3448      The value has the form ‘(INIT STYLE WIDTH AUTHOR AUTHOR-WIDTH)’.
   3449 
   3450         • If INIT is non-nil, then the margin is shown initially.
   3451         • STYLE controls how to format the author or committer date.  It
   3452           can be one of ‘age’ (to show the age of the commit),
   3453           ‘age-abbreviated’ (to abbreviate the time unit to a
   3454           character), or a string (suitable for ‘format-time-string’) to
   3455           show the actual date.  Option
   3456           ‘magit-log-margin-show-committer-date’ controls which date is
   3457           being displayed.
   3458         • WIDTH controls the width of the margin.  This exists for
   3459           forward compatibility and currently the value should not be
   3460           changed.
   3461         • AUTHOR controls whether the name of the author is also shown
   3462           by default.
   3463         • AUTHOR-WIDTH has to be an integer.  When the name of the
   3464           author is shown, then this specifies how much space is used to
   3465           do so.
   3466 
   3467 
   3468 File: magit.info,  Node: Diffing,  Next: Ediffing,  Prev: Logging,  Up: Inspecting
   3469 
   3470 5.4 Diffing
   3471 ===========
   3472 
   3473 The status buffer contains diffs for the staged and unstaged commits,
   3474 but that obviously isn’t enough.  The transient prefix command
   3475 ‘magit-diff’, on ‘d’, features several suffix commands, which show a
   3476 specific diff in a separate diff buffer.
   3477 
   3478    Like other transient prefix commands, ‘magit-diff’ also features
   3479 several infix arguments that can be changed before invoking one of the
   3480 suffix commands.  However, in the case of the diff transient, these
   3481 arguments may be taken from those currently in use in the current
   3482 repository’s diff buffer, depending on the value of
   3483 ‘magit-prefix-use-buffer-arguments’ (see *note Transient Arguments and
   3484 Buffer Variables::).
   3485 
   3486    Also see *note (gitman)git-diff::.
   3487 
   3488 ‘d’ (‘magit-diff’)
   3489      This transient prefix command binds the following suffix commands
   3490      along with the appropriate infix arguments and displays them in a
   3491      temporary buffer until a suffix is invoked.
   3492 
   3493 ‘d d’ (‘magit-diff-dwim’)
   3494      Show changes for the thing at point.
   3495 
   3496 ‘d r’ (‘magit-diff-range’)
   3497      Show differences between two commits.
   3498 
   3499      RANGE should be a range (A..B or A...B) but can also be a single
   3500      commit.  If one side of the range is omitted, then it defaults to
   3501      ‘HEAD’.  If just a commit is given, then changes in the working
   3502      tree relative to that commit are shown.
   3503 
   3504      If the region is active, use the revisions on the first and last
   3505      line of the region.  With a prefix argument, instead of diffing the
   3506      revisions, choose a revision to view changes along, starting at the
   3507      common ancestor of both revisions (i.e., use a "..." range).
   3508 
   3509 ‘d w’ (‘magit-diff-working-tree’)
   3510      Show changes between the current working tree and the ‘HEAD’
   3511      commit.  With a prefix argument show changes between the working
   3512      tree and a commit read from the minibuffer.
   3513 
   3514 ‘d s’ (‘magit-diff-staged’)
   3515      Show changes between the index and the ‘HEAD’ commit.  With a
   3516      prefix argument show changes between the index and a commit read
   3517      from the minibuffer.
   3518 
   3519 ‘d u’ (‘magit-diff-unstaged’)
   3520      Show changes between the working tree and the index.
   3521 
   3522 ‘d p’ (‘magit-diff-paths’)
   3523      Show changes between any two files on disk.
   3524 
   3525    All of the above suffix commands update the repository’s diff buffer.
   3526 The diff transient also features two commands which show differences in
   3527 another buffer:
   3528 
   3529 ‘d c’ (‘magit-show-commit’)
   3530      Show the commit at point.  If there is no commit at point or with a
   3531      prefix argument, prompt for a commit.
   3532 
   3533 ‘d t’ (‘magit-stash-show’)
   3534      Show all diffs of a stash in a buffer.
   3535 
   3536    Two additional commands that show the diff for the file or blob that
   3537 is being visited in the current buffer exists, see *note Commands for
   3538 Buffers Visiting Files::.
   3539 
   3540 * Menu:
   3541 
   3542 * Refreshing Diffs::
   3543 * Commands Available in Diffs::
   3544 * Diff Options::
   3545 * Revision Buffer::
   3546 
   3547 
   3548 File: magit.info,  Node: Refreshing Diffs,  Next: Commands Available in Diffs,  Up: Diffing
   3549 
   3550 5.4.1 Refreshing Diffs
   3551 ----------------------
   3552 
   3553 The transient prefix command ‘magit-diff-refresh’, on ‘D’, can be used
   3554 to change the diff arguments used in the current buffer, without
   3555 changing which diff is shown.  This works in dedicated diff buffers, but
   3556 also in the status buffer.
   3557 
   3558    (There is one exception; diff arguments cannot be changed in buffers
   3559 created by ‘magit-merge-preview’ because the underlying Git command does
   3560 not support these arguments.)
   3561 
   3562 ‘D’ (‘magit-diff-refresh’)
   3563      This transient prefix command binds the following suffix commands
   3564      along with the appropriate infix arguments and displays them in a
   3565      temporary buffer until a suffix is invoked.
   3566 
   3567 ‘D g’ (‘magit-diff-refresh’)
   3568      This suffix command sets the local diff arguments for the current
   3569      buffer.
   3570 
   3571 ‘D s’ (‘magit-diff-set-default-arguments’)
   3572      This suffix command sets the default diff arguments for buffers of
   3573      the same type as that of the current buffer.  Other existing
   3574      buffers of the same type are not affected because their local
   3575      values have already been initialized.
   3576 
   3577 ‘D w’ (‘magit-diff-save-default-arguments’)
   3578      This suffix command sets the default diff arguments for buffers of
   3579      the same type as that of the current buffer, and saves the value
   3580      for future sessions.  Other existing buffers of the same type are
   3581      not affected because their local values have already been
   3582      initialized.
   3583 
   3584 ‘D t’ (‘magit-diff-toggle-refine-hunk’)
   3585      This command toggles hunk refinement on or off.
   3586 
   3587 ‘D r’ (‘magit-diff-switch-range-type’)
   3588      This command converts the diff range type from "revA..revB" to
   3589      "revB...revA", or vice versa.
   3590 
   3591 ‘D f’ (‘magit-diff-flip-revs’)
   3592      This command swaps revisions in the diff range from "revA..revB" to
   3593      "revB..revA", or vice versa.
   3594 
   3595 ‘D F’ (‘magit-diff-toggle-file-filter’)
   3596      This command toggles the file restriction of the diffs in the
   3597      current buffer, allowing you to quickly switch between viewing all
   3598      the changes in the commit and the restricted subset.  As a special
   3599      case, when this command is called from a log buffer, it toggles the
   3600      file restriction in the repository’s revision buffer, which is
   3601      useful when you display a revision from a log buffer that is
   3602      restricted to a file or files.
   3603 
   3604    In addition to the above transient, which allows changing any of the
   3605 supported arguments, there also exist some commands that change only a
   3606 particular argument.
   3607 
   3608 ‘-’ (‘magit-diff-less-context’)
   3609      This command decreases the context for diff hunks by COUNT lines.
   3610 
   3611 ‘+’ (‘magit-diff-more-context’)
   3612      This command increases the context for diff hunks by COUNT lines.
   3613 
   3614 ‘0’ (‘magit-diff-default-context’)
   3615      This command resets the context for diff hunks to the default
   3616      height.
   3617 
   3618    The following commands quickly change what diff is being displayed
   3619 without having to using one of the diff transient.
   3620 
   3621 ‘C-c C-d’ (‘magit-diff-while-committing’)
   3622      While committing, this command shows the changes that are about to
   3623      be committed.  While amending, invoking the command again toggles
   3624      between showing just the new changes or all the changes that will
   3625      be committed.
   3626 
   3627      This binding is available in the diff buffer as well as the commit
   3628      message buffer.
   3629 
   3630 ‘C-c C-b’ (‘magit-go-backward’)
   3631      This command moves backward in current buffer’s history.
   3632 
   3633 ‘C-c C-f’ (‘magit-go-forward’)
   3634      This command moves forward in current buffer’s history.
   3635 
   3636 
   3637 File: magit.info,  Node: Commands Available in Diffs,  Next: Diff Options,  Prev: Refreshing Diffs,  Up: Diffing
   3638 
   3639 5.4.2 Commands Available in Diffs
   3640 ---------------------------------
   3641 
   3642 Some commands are only available if point is inside a diff.
   3643 
   3644    ‘magit-diff-visit-file’ and related commands visit the appropriate
   3645 version of the file that the diff at point is about.  Likewise
   3646 ‘magit-diff-visit-worktree-file’ and related commands visit the worktree
   3647 version of the file that the diff at point is about.  See *note Visiting
   3648 Files and Blobs from a Diff:: for more information and the key bindings.
   3649 
   3650 ‘C-c C-t’ (‘magit-diff-trace-definition’)
   3651      This command shows a log for the definition at point.
   3652 
   3653  -- User Option: magit-log-trace-definition-function
   3654      The function specified by this option is used by
   3655      ‘magit-log-trace-definition’ to determine the function at point.
   3656      For major-modes that have special needs, you could set the local
   3657      value using the mode’s hook.
   3658 
   3659 ‘C-c C-e’ (‘magit-diff-edit-hunk-commit’)
   3660      From a hunk, this command edits the respective commit and visits
   3661      the file.
   3662 
   3663      First it visits the file being modified by the hunk at the correct
   3664      location using ‘magit-diff-visit-file’.  This actually visits a
   3665      blob.  When point is on a diff header, not within an individual
   3666      hunk, then this visits the blob the first hunk is about.
   3667 
   3668      Then it invokes ‘magit-edit-line-commit’, which uses an interactive
   3669      rebase to make the commit editable, or if that is not possible
   3670      because the commit is not reachable from ‘HEAD’ by checking out
   3671      that commit directly.  This also causes the actual worktree file to
   3672      be visited.
   3673 
   3674      Neither the blob nor the file buffer are killed when finishing the
   3675      rebase.  If that is undesirable, then it might be better to use
   3676      ‘magit-rebase-edit-commit’ instead of this command.
   3677 
   3678 ‘j’ (‘magit-jump-to-diffstat-or-diff’)
   3679      This command jumps to the diffstat or diff.  When point is on a
   3680      file inside the diffstat section, then jump to the respective diff
   3681      section.  Otherwise, jump to the diffstat section or a child
   3682      thereof.
   3683 
   3684    The next two commands are not specific to Magit-Diff mode (or and
   3685 Magit buffer for that matter), but it might be worth pointing out that
   3686 they are available here too.
   3687 
   3688 ‘<SPC>’ (‘scroll-up’)
   3689      This command scrolls text upward.
   3690 
   3691 ‘<DEL>’ (‘scroll-down’)
   3692      This command scrolls text downward.
   3693 
   3694 
   3695 File: magit.info,  Node: Diff Options,  Next: Revision Buffer,  Prev: Commands Available in Diffs,  Up: Diffing
   3696 
   3697 5.4.3 Diff Options
   3698 ------------------
   3699 
   3700  -- User Option: magit-diff-refine-hunk
   3701      Whether to show word-granularity differences within diff hunks.
   3702 
   3703         • ‘nil’ Never show fine differences.
   3704         • ‘t’ Show fine differences for the current diff hunk only.
   3705         • ‘all’ Show fine differences for all displayed diff hunks.
   3706 
   3707  -- User Option: magit-diff-refine-ignore-whitespace
   3708      Whether to ignore whitespace changes in word-granularity
   3709      differences.
   3710 
   3711  -- User Option: magit-diff-adjust-tab-width
   3712      Whether to adjust the width of tabs in diffs.
   3713 
   3714      Determining the correct width can be expensive if it requires
   3715      opening large and/or many files, so the widths are cached in the
   3716      variable ‘magit-diff--tab-width-cache’.  Set that to nil to
   3717      invalidate the cache.
   3718 
   3719         • ‘nil’ Never adjust tab width.  Use ‘tab-width’s value from the
   3720           Magit buffer itself instead.
   3721 
   3722         • ‘t’ If the corresponding file-visiting buffer exits, then use
   3723           ‘tab-width’’s value from that buffer.  Doing this is cheap, so
   3724           this value is used even if a corresponding cache entry exists.
   3725 
   3726         • ‘always’ If there is no such buffer, then temporarily visit
   3727           the file to determine the value.
   3728 
   3729         • NUMBER Like ‘always’, but don’t visit files larger than NUMBER
   3730           bytes.
   3731 
   3732  -- User Option: magit-diff-paint-whitespace
   3733      Specify where to highlight whitespace errors.
   3734 
   3735      See ‘magit-diff-highlight-trailing’,
   3736      ‘magit-diff-highlight-indentation’.  The symbol ‘t’ means in all
   3737      diffs, ‘status’ means only in the status buffer, and nil means
   3738      nowhere.
   3739 
   3740         • ‘nil’ Never highlight whitespace errors.
   3741         • ‘t’ Highlight whitespace errors everywhere.
   3742         • ‘uncommitted’ Only highlight whitespace errors in diffs
   3743           showing uncommitted changes.  For backward compatibility
   3744           ‘status’ is treated as a synonym.
   3745 
   3746  -- User Option: magit-diff-paint-whitespace-lines
   3747      Specify in what kind of lines to highlight whitespace errors.
   3748 
   3749         • ‘t’ Highlight only in added lines.
   3750         • ‘both’ Highlight in added and removed lines.
   3751         • ‘all’ Highlight in added, removed and context lines.
   3752 
   3753  -- User Option: magit-diff-highlight-trailing
   3754      Whether to highlight whitespace at the end of a line in diffs.
   3755      Used only when ‘magit-diff-paint-whitespace’ is non-nil.
   3756 
   3757  -- User Option: magit-diff-highlight-indentation
   3758      This option controls whether to highlight the indentation in case
   3759      it used the "wrong" indentation style.  Indentation is only
   3760      highlighted if ‘magit-diff-paint-whitespace’ is also non-nil.
   3761 
   3762      The value is an alist of the form ‘((REGEXP . INDENT)...)’.  The
   3763      path to the current repository is matched against each element in
   3764      reverse order.  Therefore if a REGEXP matches, then earlier
   3765      elements are not tried.
   3766 
   3767      If the used INDENT is ‘tabs’, highlight indentation with tabs.  If
   3768      INDENT is an integer, highlight indentation with at least that many
   3769      spaces.  Otherwise, highlight neither.
   3770 
   3771  -- User Option: magit-diff-hide-trailing-cr-characters
   3772      Whether to hide ^M characters at the end of a line in diffs.
   3773 
   3774  -- User Option: magit-diff-highlight-hunk-region-functions
   3775      This option specifies the functions used to highlight the
   3776      hunk-internal region.
   3777 
   3778      ‘magit-diff-highlight-hunk-region-dim-outside’ overlays the outside
   3779      of the hunk internal selection with a face that causes the added
   3780      and removed lines to have the same background color as context
   3781      lines.  This function should not be removed from the value of this
   3782      option.
   3783 
   3784      ‘magit-diff-highlight-hunk-region-using-overlays’ and
   3785      ‘magit-diff-highlight-hunk-region-using-underline’ emphasize the
   3786      region by placing delimiting horizontal lines before and after it.
   3787      Both of these functions have glitches which cannot be fixed due to
   3788      limitations of Emacs’ display engine.  For more information see
   3789      <https://github.com/magit/magit/issues/2758> ff.
   3790 
   3791      Instead of, or in addition to, using delimiting horizontal lines,
   3792      to emphasize the boundaries, you may wish to emphasize the text
   3793      itself, using ‘magit-diff-highlight-hunk-region-using-face’.
   3794 
   3795      In terminal frames it’s not possible to draw lines as the overlay
   3796      and underline variants normally do, so there they fall back to
   3797      calling the face function instead.
   3798 
   3799  -- User Option: magit-diff-unmarked-lines-keep-foreground
   3800      This option controls whether added and removed lines outside the
   3801      hunk-internal region only lose their distinct background color or
   3802      also the foreground color.  Whether the outside of the region is
   3803      dimmed at all depends on
   3804      ‘magit-diff-highlight-hunk-region-functions’.
   3805 
   3806  -- User Option: magit-diff-extra-stat-arguments
   3807      This option specifies additional arguments to be used alongside
   3808      ‘--stat’.
   3809 
   3810      The value is a list of zero or more arguments or a function that
   3811      takes no argument and returns such a list.  These arguments are
   3812      allowed here: ‘--stat-width’, ‘--stat-name-width’,
   3813      ‘--stat-graph-width’ and ‘--compact-summary’.  Also see *note
   3814      (gitman)git-diff::.
   3815 
   3816 
   3817 File: magit.info,  Node: Revision Buffer,  Prev: Diff Options,  Up: Diffing
   3818 
   3819 5.4.4 Revision Buffer
   3820 ---------------------
   3821 
   3822  -- User Option: magit-revision-insert-related-refs
   3823      Whether to show related branches in revision buffers.
   3824 
   3825         • ‘nil’ Don’t show any related branches.
   3826         • ‘t’ Show related local branches.
   3827         • ‘all’ Show related local and remote branches.
   3828         • ‘mixed’ Show all containing branches and local merged
   3829           branches.
   3830 
   3831  -- User Option: magit-revision-show-gravatars
   3832      Whether to show gravatar images in revision buffers.
   3833 
   3834      If ‘nil’, then don’t insert any gravatar images.  If ‘t’, then
   3835      insert both images.  If ‘author’ or ‘committer’, then insert only
   3836      the respective image.
   3837 
   3838      If you have customized the option ‘magit-revision-headers-format’
   3839      and want to insert the images then you might also have to specify
   3840      where to do so.  In that case the value has to be a cons-cell of
   3841      two regular expressions.  The car specifies where to insert the
   3842      author’s image.  The top half of the image is inserted right after
   3843      the matched text, the bottom half on the next line in the same
   3844      column.  The cdr specifies where to insert the committer’s image,
   3845      accordingly.  Either the car or the cdr may be nil."
   3846 
   3847  -- User Option: magit-revision-use-hash-sections
   3848      Whether to turn hashes inside the commit message into sections.
   3849 
   3850      If non-nil, then hashes inside the commit message are turned into
   3851      ‘commit’ sections.  There is a trade off to be made between
   3852      performance and reliability:
   3853 
   3854         • ‘slow’ calls git for every word to be absolutely sure.
   3855         • ‘quick’ skips words less than seven characters long.
   3856         • ‘quicker’ additionally skips words that don’t contain a
   3857           number.
   3858         • ‘quickest’ uses all words that are at least seven characters
   3859           long and which contain at least one number as well as at least
   3860           one letter.
   3861 
   3862      If nil, then no hashes are turned into sections, but you can still
   3863      visit the commit at point using "RET".
   3864 
   3865    The diffs shown in the revision buffer may be automatically
   3866 restricted to a subset of the changed files.  If the revision buffer is
   3867 displayed from a log buffer, the revision buffer will share the same
   3868 file restriction as that log buffer (also see the command
   3869 ‘magit-diff-toggle-file-filter’).
   3870 
   3871  -- User Option: magit-revision-filter-files-on-follow
   3872      Whether showing a commit from a log buffer honors the log’s file
   3873      filter when the log arguments include ‘--follow’.
   3874 
   3875      When this option is nil, displaying a commit from a log ignores the
   3876      log’s file filter if the log arguments include ‘--follow’.  Doing
   3877      so avoids showing an empty diff in revision buffers for commits
   3878      before a rename event.  In such cases, the ‘--patch’ argument of
   3879      the log transient can be used to show the file-restricted diffs
   3880      inline.
   3881 
   3882      Set this option to non-nil to keep the log’s file restriction even
   3883      if ‘--follow’ is present in the log arguments.
   3884 
   3885    If the revision buffer is not displayed from a log buffer, the file
   3886 restriction is determined as usual (see *note Transient Arguments and
   3887 Buffer Variables::).
   3888 
   3889 
   3890 File: magit.info,  Node: Ediffing,  Next: References Buffer,  Prev: Diffing,  Up: Inspecting
   3891 
   3892 5.5 Ediffing
   3893 ============
   3894 
   3895 This section describes how to enter Ediff from Magit buffers.  For
   3896 information on how to use Ediff itself, see *note (ediff)Top::.
   3897 
   3898 ‘e’ (‘magit-ediff-dwim’)
   3899      Compare, stage, or resolve using Ediff.
   3900 
   3901      This command tries to guess what file, and what commit or range the
   3902      user wants to compare, stage, or resolve using Ediff.  It might
   3903      only be able to guess either the file, or range/commit, in which
   3904      case the user is asked about the other.  It might not always guess
   3905      right, in which case the appropriate ‘magit-ediff-*’ command has to
   3906      be used explicitly.  If it cannot read the user’s mind at all, then
   3907      it asks the user for a command to run.
   3908 
   3909 ‘E’ (‘magit-ediff’)
   3910      This transient prefix command binds the following suffix commands
   3911      and displays them in a temporary buffer until a suffix is invoked.
   3912 
   3913 ‘E r’ (‘magit-ediff-compare’)
   3914      Compare two revisions of a file using Ediff.
   3915 
   3916      If the region is active, use the revisions on the first and last
   3917      line of the region.  With a prefix argument, instead of diffing the
   3918      revisions, choose a revision to view changes along, starting at the
   3919      common ancestor of both revisions (i.e., use a "..." range).
   3920 
   3921 ‘E m’ (‘magit-ediff-resolve-rest’)
   3922      This command allows you to resolve outstanding conflicts in the
   3923      file at point using Ediff.  If there is no file at point or if it
   3924      doesn’t have any unmerged changes, then this command prompts for a
   3925      file.
   3926 
   3927      Provided that the value of ‘merge.conflictstyle’ is ‘diff3’, you
   3928      can view the file’s merge-base revision using ‘/’ in the Ediff
   3929      control buffer.
   3930 
   3931      The A, B and Ancestor buffers are constructed from the conflict
   3932      markers in the worktree file.  Because you and/or Git may have
   3933      already resolved some conflicts, that means that these buffers may
   3934      not contain the actual versions from the respective blobs.
   3935 
   3936 ‘E M’ (‘magit-ediff-resolve-all’)
   3937      This command allows you to resolve all conflicts in the file at
   3938      point using Ediff.  If there is no file at point or if it doesn’t
   3939      have any unmerged changes, then this command prompts for a file.
   3940 
   3941      Provided that the value of ‘merge.conflictstyle’ is ‘diff3’, you
   3942      can view the file’s merge-base revision using ‘/’ in the Ediff
   3943      control buffer.
   3944 
   3945      First the file in the worktree is moved aside, appending the suffix
   3946      ‘.ORIG’, so that you could later go back to that version.  Then it
   3947      is reconstructed from the two sides of the conflict and the
   3948      merge-base, if available.
   3949 
   3950      It would be nice if the worktree file were just used as-is, but
   3951      Ediff does not support that.  This means that all conflicts, that
   3952      Git has already resolved, are restored.  On the other hand Ediff
   3953      also tries to resolve conflicts, and in many cases Ediff and Git
   3954      should produce similar results.
   3955 
   3956      However if you have already resolved some conflicts manually, then
   3957      those changes are discarded (though you can recover them from the
   3958      backup file).  In such cases ‘magit-ediff-resolve-rest’ might be
   3959      more suitable.
   3960 
   3961      The advantage that this command has over ‘magit-ediff-resolve-rest’
   3962      is that the A, B and Ancestor buffers correspond to blobs from the
   3963      respective commits, allowing you to inspect a side in context and
   3964      to use Magit commands in these buffers to do so.  Blame and log
   3965      commands are particularly useful here.
   3966 
   3967 ‘E t’ (‘magit-git-mergetool’)
   3968      This command does not actually use Ediff.  While it serves the same
   3969      purpose as ‘magit-ediff-resolve-rest’, it uses ‘git mergetool
   3970      --gui’ to resolve conflicts.
   3971 
   3972      With a prefix argument this acts as a transient prefix command,
   3973      allowing the user to select the mergetool and change some settings.
   3974 
   3975 ‘E s’ (‘magit-ediff-stage’)
   3976      Stage and unstage changes to a file using Ediff, defaulting to the
   3977      file at point.
   3978 
   3979 ‘E u’ (‘magit-ediff-show-unstaged’)
   3980      Show unstaged changes to a file using Ediff.
   3981 
   3982 ‘E i’ (‘magit-ediff-show-staged’)
   3983      Show staged changes to a file using Ediff.
   3984 
   3985 ‘E w’ (‘magit-ediff-show-working-tree’)
   3986      Show changes in a file between ‘HEAD’ and working tree using Ediff.
   3987 
   3988 ‘E c’ (‘magit-ediff-show-commit’)
   3989      Show changes to a file introduced by a commit using Ediff.
   3990 
   3991 ‘E z’ (‘magit-ediff-show-stash’)
   3992      Show changes to a file introduced by a stash using Ediff.
   3993 
   3994  -- User Option: magit-ediff-dwim-resolve-function
   3995      This option controls which function ‘magit-ediff-dwim’ uses to
   3996      resolve conflicts.  One of ‘magit-ediff-resolve-rest’,
   3997      ‘magit-ediff-resolve-all’ or ‘magit-git-mergetool’; which are all
   3998      discussed above.
   3999 
   4000  -- User Option: magit-ediff-dwim-show-on-hunks
   4001      This option controls what command ‘magit-ediff-dwim’ calls when
   4002      point is on uncommitted hunks.  When nil, always run
   4003      ‘magit-ediff-stage’.  Otherwise, use ‘magit-ediff-show-staged’ and
   4004      ‘magit-ediff-show-unstaged’ to show staged and unstaged changes,
   4005      respectively.
   4006 
   4007  -- User Option: magit-ediff-show-stash-with-index
   4008      This option controls whether ‘magit-ediff-show-stash’ includes a
   4009      buffer containing the file’s state in the index at the time the
   4010      stash was created.  This makes it possible to tell which changes in
   4011      the stash were staged.
   4012 
   4013  -- User Option: magit-ediff-quit-hook
   4014      This hook is run after quitting an Ediff session that was created
   4015      using a Magit command.  The hook functions are run inside the Ediff
   4016      control buffer, and should not change the current buffer.
   4017 
   4018      This is similar to ‘ediff-quit-hook’ but takes the needs of Magit
   4019      into account.  The regular ‘ediff-quit-hook’ is ignored by Ediff
   4020      sessions that were created using a Magit command.
   4021 
   4022 
   4023 File: magit.info,  Node: References Buffer,  Next: Bisecting,  Prev: Ediffing,  Up: Inspecting
   4024 
   4025 5.6 References Buffer
   4026 =====================
   4027 
   4028 ‘y’ (‘magit-show-refs’)
   4029      This command lists branches and tags in a dedicated buffer.
   4030 
   4031      However if this command is invoked again from this buffer or if it
   4032      is invoked with a prefix argument, then it acts as a transient
   4033      prefix command, which binds the following suffix commands and some
   4034      infix arguments.
   4035 
   4036    All of the following suffix commands list exactly the same branches
   4037 and tags.  The only difference the optional feature that can be enabled
   4038 by changing the value of ‘magit-refs-show-commit-count’ (see below).
   4039 These commands specify a different branch or commit against which all
   4040 the other references are compared.
   4041 
   4042 ‘y y’ (‘magit-show-refs-head’)
   4043      This command lists branches and tags in a dedicated buffer.  Each
   4044      reference is being compared with ‘HEAD’.
   4045 
   4046 ‘y c’ (‘magit-show-refs-current’)
   4047      This command lists branches and tags in a dedicated buffer.  Each
   4048      reference is being compared with the current branch or ‘HEAD’ if it
   4049      is detached.
   4050 
   4051 ‘y o’ (‘magit-show-refs-other’)
   4052      This command lists branches and tags in a dedicated buffer.  Each
   4053      reference is being compared with a branch read from the user.
   4054 
   4055 ‘y r’ (‘magit-refs-set-show-commit-count’)
   4056      This command changes for which refs the commit count is shown.
   4057 
   4058  -- User Option: magit-refs-show-commit-count
   4059      Whether to show commit counts in Magit-Refs mode buffers.
   4060 
   4061         • ‘all’ Show counts for branches and tags.
   4062         • ‘branch’ Show counts for branches only.
   4063         • ‘nil’ Never show counts.
   4064 
   4065      The default is ‘nil’ because anything else can be very expensive.
   4066 
   4067  -- User Option: magit-refs-pad-commit-counts
   4068      Whether to pad all commit counts on all sides in Magit-Refs mode
   4069      buffers.
   4070 
   4071      If this is nil, then some commit counts are displayed right next to
   4072      one of the branches that appear next to the count, without any
   4073      space in between.  This might look bad if the branch name faces
   4074      look too similar to ‘magit-dimmed’.
   4075 
   4076      If this is non-nil, then spaces are placed on both sides of all
   4077      commit counts.
   4078 
   4079  -- User Option: magit-refs-show-remote-prefix
   4080      Whether to show the remote prefix in lists of remote branches.
   4081 
   4082      Showing the prefix is redundant because the name of the remote is
   4083      already shown in the heading preceding the list of its branches.
   4084 
   4085  -- User Option: magit-refs-primary-column-width
   4086      Width of the primary column in ‘magit-refs-mode’ buffers.  The
   4087      primary column is the column that contains the name of the branch
   4088      that the current row is about.
   4089 
   4090      If this is an integer, then the column is that many columns wide.
   4091      Otherwise it has to be a cons-cell of two integers.  The first
   4092      specifies the minimal width, the second the maximal width.  In that
   4093      case the actual width is determined using the length of the names
   4094      of the shown local branches.  (Remote branches and tags are not
   4095      taken into account when calculating to optimal width.)
   4096 
   4097  -- User Option: magit-refs-focus-column-width
   4098      Width of the focus column in ‘magit-refs-mode’ buffers.
   4099 
   4100      The focus column is the first column, which marks one branch
   4101      (usually the current branch) as the focused branch using ‘*’ or
   4102      ‘@’.  For each other reference, this column optionally shows how
   4103      many commits it is ahead of the focused branch and ‘<’, or if it
   4104      isn’t ahead then the commits it is behind and ‘>’, or if it isn’t
   4105      behind either, then a ‘=’.
   4106 
   4107      This column may also display only ‘*’ or ‘@’ for the focused
   4108      branch, in which case this option is ignored.  Use ‘L v’ to change
   4109      the verbosity of this column.
   4110 
   4111  -- User Option: magit-refs-margin
   4112      This option specifies whether the margin is initially shown in
   4113      Magit-Refs mode buffers and how it is formatted.
   4114 
   4115      The value has the form ‘(INIT STYLE WIDTH AUTHOR AUTHOR-WIDTH)’.
   4116 
   4117         • If INIT is non-nil, then the margin is shown initially.
   4118         • STYLE controls how to format the author or committer date.  It
   4119           can be one of ‘age’ (to show the age of the commit),
   4120           ‘age-abbreviated’ (to abbreviate the time unit to a
   4121           character), or a string (suitable for ‘format-time-string’) to
   4122           show the actual date.  Option
   4123           ‘magit-log-margin-show-committer-date’ controls which date is
   4124           being displayed.
   4125         • WIDTH controls the width of the margin.  This exists for
   4126           forward compatibility and currently the value should not be
   4127           changed.
   4128         • AUTHOR controls whether the name of the author is also shown
   4129           by default.
   4130         • AUTHOR-WIDTH has to be an integer.  When the name of the
   4131           author is shown, then this specifies how much space is used to
   4132           do so.
   4133 
   4134  -- User Option: magit-refs-margin-for-tags
   4135      This option specifies whether to show information about tags in the
   4136      margin.  This is disabled by default because it is slow if there
   4137      are many tags.
   4138 
   4139    The following variables control how individual refs are displayed.
   4140 If you change one of these variables (especially the "%c" part), then
   4141 you should also change the others to keep things aligned.  The following
   4142 %-sequences are supported:
   4143 
   4144    • ‘%a’ Number of commits this ref has over the one we compare to.
   4145    • ‘%b’ Number of commits the ref we compare to has over this one.
   4146    • ‘%c’ Number of commits this ref has over the one we compare to.
   4147      For the ref which all other refs are compared this is instead "@",
   4148      if it is the current branch, or "#" otherwise.
   4149    • ‘%C’ For the ref which all other refs are compared this is "@", if
   4150      it is the current branch, or "#" otherwise.  For all other refs "
   4151      ".
   4152    • ‘%h’ Hash of this ref’s tip.
   4153    • ‘%m’ Commit summary of the tip of this ref.
   4154    • ‘%n’ Name of this ref.
   4155    • ‘%u’ Upstream of this local branch.
   4156    • ‘%U’ Upstream of this local branch and additional local vs.
   4157      upstream information.
   4158 
   4159  -- User Option: magit-refs-filter-alist
   4160      The purpose of this option is to forgo displaying certain refs
   4161      based on their name.  If you want to not display any refs of a
   4162      certain type, then you should remove the appropriate function from
   4163      ‘magit-refs-sections-hook’ instead.
   4164 
   4165      This alist controls which tags and branches are omitted from being
   4166      displayed in ‘magit-refs-mode’ buffers.  If it is ‘nil’, then all
   4167      refs are displayed (subject to ‘magit-refs-sections-hook’).
   4168 
   4169      All keys are tried in order until one matches.  Then its value is
   4170      used and subsequent elements are ignored.  If the value is non-nil,
   4171      then the reference is displayed, otherwise it is not.  If no
   4172      element matches, then the reference is displayed.
   4173 
   4174      A key can either be a regular expression that the refname has to
   4175      match, or a function that takes the refname as only argument and
   4176      returns a boolean.  A remote branch such as "origin/master" is
   4177      displayed as just "master", however for this comparison the former
   4178      is used.
   4179 
   4180 ‘<RET>’ (‘magit-visit-ref’)
   4181      This command visits the reference or revision at point in another
   4182      buffer.  If there is no revision at point or with a prefix argument
   4183      then it prompts for a revision.
   4184 
   4185      This command behaves just like ‘magit-show-commit’ as described
   4186      above, except if point is on a reference in a ‘magit-refs-mode’
   4187      buffer, in which case the behavior may be different, but only if
   4188      you have customized the option ‘magit-visit-ref-behavior’.
   4189 
   4190  -- User Option: magit-visit-ref-behavior
   4191      This option controls how ‘magit-visit-ref’ behaves in
   4192      ‘magit-refs-mode’ buffers.
   4193 
   4194      By default ‘magit-visit-ref’ behaves like ‘magit-show-commit’, in
   4195      all buffers, including ‘magit-refs-mode’ buffers.  When the type of
   4196      the section at point is ‘commit’ then "RET" is bound to
   4197      ‘magit-show-commit’, and when the type is either ‘branch’ or ‘tag’
   4198      then it is bound to ‘magit-visit-ref’.
   4199 
   4200      "RET" is one of Magit’s most essential keys and at least by default
   4201      it should behave consistently across all of Magit, especially
   4202      because users quickly learn that it does something very harmless;
   4203      it shows more information about the thing at point in another
   4204      buffer.
   4205 
   4206      However "RET" used to behave differently in ‘magit-refs-mode’
   4207      buffers, doing surprising things, some of which cannot really be
   4208      described as "visit this thing".  If you’ve grown accustomed this
   4209      behavior, you can restore it by adding one or more of the below
   4210      symbols to the value of this option.  But keep in mind that by
   4211      doing so you don’t only introduce inconsistencies, you also lose
   4212      some functionality and might have to resort to ‘M-x
   4213      magit-show-commit’ to get it back.
   4214 
   4215      ‘magit-visit-ref’ looks for these symbols in the order in which
   4216      they are described here.  If the presence of a symbol applies to
   4217      the current situation, then the symbols that follow do not affect
   4218      the outcome.
   4219 
   4220         • ‘focus-on-ref’
   4221 
   4222           With a prefix argument update the buffer to show commit counts
   4223           and lists of cherry commits relative to the reference at point
   4224           instead of relative to the current buffer or ‘HEAD’.
   4225 
   4226           Instead of adding this symbol, consider pressing "C-u y o
   4227           RET".
   4228 
   4229         • ‘create-branch’
   4230 
   4231           If point is on a remote branch, then create a new local branch
   4232           with the same name, use the remote branch as its upstream, and
   4233           then check out the local branch.
   4234 
   4235           Instead of adding this symbol, consider pressing "b c RET
   4236           RET", like you would do in other buffers.
   4237 
   4238         • ‘checkout-any’
   4239 
   4240           Check out the reference at point.  If that reference is a tag
   4241           or a remote branch, then this results in a detached ‘HEAD’.
   4242 
   4243           Instead of adding this symbol, consider pressing "b b RET",
   4244           like you would do in other buffers.
   4245 
   4246         • ‘checkout-branch’
   4247 
   4248           Check out the local branch at point.
   4249 
   4250           Instead of adding this symbol, consider pressing "b b RET",
   4251           like you would do in other buffers.
   4252 
   4253 * Menu:
   4254 
   4255 * References Sections::
   4256 
   4257 
   4258 File: magit.info,  Node: References Sections,  Up: References Buffer
   4259 
   4260 5.6.1 References Sections
   4261 -------------------------
   4262 
   4263 The contents of references buffers is controlled using the hook
   4264 ‘magit-refs-sections-hook’.  See *note Section Hooks:: to learn about
   4265 such hooks and how to customize them.  All of the below functions are
   4266 members of the default value.  Note that it makes much less sense to
   4267 customize this hook than it does for the respective hook used for the
   4268 status buffer.
   4269 
   4270  -- User Option: magit-refs-sections-hook
   4271      Hook run to insert sections into a references buffer.
   4272 
   4273  -- Function: magit-insert-local-branches
   4274      Insert sections showing all local branches.
   4275 
   4276  -- Function: magit-insert-remote-branches
   4277      Insert sections showing all remote-tracking branches.
   4278 
   4279  -- Function: magit-insert-tags
   4280      Insert sections showing all tags.
   4281 
   4282 
   4283 File: magit.info,  Node: Bisecting,  Next: Visiting Files and Blobs,  Prev: References Buffer,  Up: Inspecting
   4284 
   4285 5.7 Bisecting
   4286 =============
   4287 
   4288 Also see *note (gitman)git-bisect::.
   4289 
   4290 ‘B’ (‘magit-bisect’)
   4291      This transient prefix command binds the following suffix commands
   4292      and displays them in a temporary buffer until a suffix is invoked.
   4293 
   4294    When bisecting is not in progress, then the transient features the
   4295 following suffix commands.
   4296 
   4297 ‘B B’ (‘magit-bisect-start’)
   4298      Start a bisect session.
   4299 
   4300      Bisecting a bug means to find the commit that introduced it.  This
   4301      command starts such a bisect session by asking for a known good
   4302      commit and a known bad commit.  If you’re bisecting a change that
   4303      isn’t a regression, you can select alternate terms that are
   4304      conceptually more fitting than "bad" and "good", but the infix
   4305      arguments to do so are disabled by default.
   4306 
   4307 ‘B s’ (‘magit-bisect-run’)
   4308      Bisect automatically by running commands after each step.
   4309 
   4310    When bisecting in progress, then the transient instead features the
   4311 following suffix commands.
   4312 
   4313 ‘B b’ (‘magit-bisect-bad’)
   4314      Mark the current commit as bad.  Use this after you have asserted
   4315      that the commit does contain the bug in question.
   4316 
   4317 ‘B g’ (‘magit-bisect-good’)
   4318      Mark the current commit as good.  Use this after you have asserted
   4319      that the commit does not contain the bug in question.
   4320 
   4321 ‘B m’ (‘magit-bisect-mark’)
   4322      Mark the current commit with one of the bisect terms.  This command
   4323      provides an alternative to ‘magit-bisect-bad’ and
   4324      ‘magit-bisect-good’ and is useful when using terms other than "bad"
   4325      and "good".  This suffix is disabled by default.
   4326 
   4327 ‘B k’ (‘magit-bisect-skip’)
   4328      Skip the current commit.  Use this if for some reason the current
   4329      commit is not a good one to test.  This command lets Git choose a
   4330      different one.
   4331 
   4332 ‘B r’ (‘magit-bisect-reset’)
   4333      After bisecting, cleanup bisection state and return to original
   4334      ‘HEAD’.
   4335 
   4336    By default the status buffer shows information about the ongoing
   4337 bisect session.
   4338 
   4339  -- User Option: magit-bisect-show-graph
   4340      This option controls whether a graph is displayed for the log of
   4341      commits that still have to be bisected.
   4342 
   4343 
   4344 File: magit.info,  Node: Visiting Files and Blobs,  Next: Blaming,  Prev: Bisecting,  Up: Inspecting
   4345 
   4346 5.8 Visiting Files and Blobs
   4347 ============================
   4348 
   4349 Magit provides several commands that visit a file or blob (the version
   4350 of a file that is stored in a certain commit).  Actually it provides
   4351 several *groups* of such commands and the several *variants* within each
   4352 group.
   4353 
   4354    Also see *note Commands for Buffers Visiting Files::.
   4355 
   4356 * Menu:
   4357 
   4358 * General-Purpose Visit Commands::
   4359 * Visiting Files and Blobs from a Diff::
   4360 
   4361 
   4362 File: magit.info,  Node: General-Purpose Visit Commands,  Next: Visiting Files and Blobs from a Diff,  Up: Visiting Files and Blobs
   4363 
   4364 5.8.1 General-Purpose Visit Commands
   4365 ------------------------------------
   4366 
   4367 These commands can be used anywhere to open any blob.  Currently no keys
   4368 are bound to these commands by default, but that is likely to change.
   4369 
   4370  -- Command: magit-find-file
   4371      This command reads a filename and revision from the user and visits
   4372      the respective blob in a buffer.  The buffer is displayed in the
   4373      selected window.
   4374 
   4375  -- Command: magit-find-file-other-window
   4376      This command reads a filename and revision from the user and visits
   4377      the respective blob in a buffer.  The buffer is displayed in
   4378      another window.
   4379 
   4380  -- Command: magit-find-file-other-frame
   4381      This command reads a filename and revision from the user and visits
   4382      the respective blob in a buffer.  The buffer is displayed in
   4383      another frame.
   4384 
   4385 
   4386 File: magit.info,  Node: Visiting Files and Blobs from a Diff,  Prev: General-Purpose Visit Commands,  Up: Visiting Files and Blobs
   4387 
   4388 5.8.2 Visiting Files and Blobs from a Diff
   4389 ------------------------------------------
   4390 
   4391 These commands can only be used when point is inside a diff.
   4392 
   4393 ‘<RET>’ (‘magit-diff-visit-file’)
   4394      This command visits the appropriate version of the file that the
   4395      diff at point is about.
   4396 
   4397      This commands visits the worktree version of the appropriate file.
   4398      The location of point inside the diff determines which file is
   4399      being visited.  The visited version depends on what changes the
   4400      diff is about.
   4401 
   4402        1. If the diff shows uncommitted changes (i.e., staged or
   4403           unstaged changes), then visit the file in the working tree
   4404           (i.e., the same "real" file that ‘find-file’ would visit.  In
   4405           all other cases visit a "blob" (i.e., the version of a file as
   4406           stored in some commit).
   4407 
   4408        2. If point is on a removed line, then visit the blob for the
   4409           first parent of the commit that removed that line, i.e., the
   4410           last commit where that line still exists.
   4411 
   4412        3. If point is on an added or context line, then visit the blob
   4413           that adds that line, or if the diff shows from more than a
   4414           single commit, then visit the blob from the last of these
   4415           commits.
   4416 
   4417      In the file-visiting buffer this command goes to the line that
   4418      corresponds to the line that point is on in the diff.
   4419 
   4420      The buffer is displayed in the selected window.  With a prefix
   4421      argument the buffer is displayed in another window instead.
   4422 
   4423  -- User Option: magit-diff-visit-previous-blob
   4424      This option controls whether ‘magit-diff-visit-file’ may visit the
   4425      previous blob.  When this is ‘t’ (the default) and point is on a
   4426      removed line in a diff for a committed change, then
   4427      ‘magit-diff-visit-file’ visits the blob from the last revision
   4428      which still had that line.
   4429 
   4430      Currently this is only supported for committed changes, for staged
   4431      and unstaged changes ‘magit-diff-visit-file’ always visits the file
   4432      in the working tree.
   4433 
   4434 ‘C-<return>’ (‘magit-diff-visit-file-worktree’)
   4435      This command visits the worktree version of the appropriate file.
   4436      The location of point inside the diff determines which file is
   4437      being visited.  Unlike ‘magit-diff-visit-file’ it always visits the
   4438      "real" file in the working tree, i.e the "current version" of the
   4439      file.
   4440 
   4441      In the file-visiting buffer this command goes to the line that
   4442      corresponds to the line that point is on in the diff.  Lines that
   4443      were added or removed in the working tree, the index and other
   4444      commits in between are automatically accounted for.
   4445 
   4446      The buffer is displayed in the selected window.  With a prefix
   4447      argument the buffer is displayed in another window instead.
   4448 
   4449    Variants of the above two commands exist that instead visit the file
   4450 in another window or in another frame.  If you prefer such behavior,
   4451 then you may want to change the above key bindings, but note that the
   4452 above commands also use another window when invoked with a prefix
   4453 argument.
   4454 
   4455  -- Command: magit-diff-visit-file-other-window
   4456  -- Command: magit-diff-visit-file-other-frame
   4457  -- Command: magit-diff-visit-worktree-file-other-window
   4458  -- Command: magit-diff-visit-worktree-file-other-frame
   4459 
   4460 
   4461 File: magit.info,  Node: Blaming,  Prev: Visiting Files and Blobs,  Up: Inspecting
   4462 
   4463 5.9 Blaming
   4464 ===========
   4465 
   4466 Also see *note (gitman)git-blame::.
   4467 
   4468    To start blaming, invoke the ‘magit-file-dispatch’ transient prefix
   4469 command.  When using the default key bindings, that can be done by
   4470 pressing ‘C-c M-g’.  When using the recommended bindings, this command
   4471 is instead bound to ‘C-c f’.  Also see *note Global Bindings::.
   4472 
   4473    The blaming suffix commands can be invoked directly from the file
   4474 dispatch transient.  However if you want to set an infix argument, then
   4475 you have to enter the blaming sub-prefix first.
   4476 
   4477 ‘C-c f B’ (‘magit-blame’)
   4478 ‘C-c f b’ (‘magit-blame-addition’)
   4479 ‘C-c f B b’
   4480 ‘C-c f r’ (‘magit-blame-removal’)
   4481 ‘C-c f B r’
   4482 ‘C-c f f’ (‘magit-blame-reverse’)
   4483 ‘C-c f B f’
   4484 ‘C-c f e’ (‘magit-blame-echo’)
   4485 ‘C-c f B e’
   4486 ‘C-c f q’ (‘magit-blame-quit’)
   4487 ‘C-c f B q’
   4488      Each of these commands is documented individually right below,
   4489      alongside their default key bindings.  The bindings shown above are
   4490      the recommended bindings, which you can enable by following the
   4491      instructions in *note Global Bindings::.
   4492 
   4493 ‘C-c M-g B’ (‘magit-blame’)
   4494      This transient prefix command binds the following suffix commands
   4495      along with the appropriate infix arguments and displays them in a
   4496      temporary buffer until a suffix is invoked.
   4497 
   4498    Note that not all of the following suffixes are available at all
   4499 times.  For example if ‘magit-blame-mode’ is not enabled, then the
   4500 command whose purpose is to turn off that mode would not be of any use
   4501 and therefore isn’t available.
   4502 
   4503 ‘C-c M-g b’ (‘magit-blame-addition’)
   4504 ‘C-c M-g B b’
   4505      This command augments each line or chunk of lines in the current
   4506      file-visiting or blob-visiting buffer with information about what
   4507      commits last touched these lines.
   4508 
   4509      If the buffer visits a revision of that file, then history up to
   4510      that revision is considered.  Otherwise, the file’s full history is
   4511      considered, including uncommitted changes.
   4512 
   4513      If Magit-Blame mode is already turned on in the current buffer then
   4514      blaming is done recursively, by visiting REVISION:FILE (using
   4515      ‘magit-find-file’), where REVISION is a parent of the revision that
   4516      added the current line or chunk of lines.
   4517 
   4518 ‘C-c M-g r’ (‘magit-blame-removal’)
   4519 ‘C-c M-g B r’
   4520      This command augments each line or chunk of lines in the current
   4521      blob-visiting buffer with information about the revision that
   4522      removes it.  It cannot be used in file-visiting buffers.
   4523 
   4524      Like ‘magit-blame-addition’, this command can be used recursively.
   4525 
   4526 ‘C-c M-g f’ (‘magit-blame-reverse’)
   4527 ‘C-c M-g B f’
   4528      This command augments each line or chunk of lines in the current
   4529      file-visiting or blob-visiting buffer with information about the
   4530      last revision in which a line still existed.
   4531 
   4532      Like ‘magit-blame-addition’, this command can be used recursively.
   4533 
   4534 ‘C-c M-g e’ (‘magit-blame-echo’)
   4535 ‘C-c M-g B e’
   4536      This command is like ‘magit-blame-addition’ except that it doesn’t
   4537      turn on ‘read-only-mode’ and that it initially uses the
   4538      visualization style specified by option ‘magit-blame-echo-style’.
   4539 
   4540    The following key bindings are available when Magit-Blame mode is
   4541 enabled and Read-Only mode is not enabled.  These commands are also
   4542 available in other buffers; here only the behavior is described that is
   4543 relevant in file-visiting buffers that are being blamed.
   4544 
   4545 ‘C-c M-g q’ (‘magit-blame-quit’)
   4546 ‘C-c M-g B q’
   4547      This command turns off Magit-Blame mode.  If the buffer was created
   4548      during a recursive blame, then it also kills the buffer.
   4549 
   4550 ‘<RET>’ (‘magit-show-commit’)
   4551      This command shows the commit that last touched the line at point.
   4552 
   4553 ‘<SPC>’ (‘magit-diff-show-or-scroll-up’)
   4554      This command updates the commit buffer.
   4555 
   4556      This either shows the commit that last touched the line at point in
   4557      the appropriate buffer, or if that buffer is already being
   4558      displayed in the current frame and if that buffer contains
   4559      information about that commit, then the buffer is scrolled up
   4560      instead.
   4561 
   4562 ‘<DEL>’ (‘magit-diff-show-or-scroll-down’)
   4563      This command updates the commit buffer.
   4564 
   4565      This either shows the commit that last touched the line at point in
   4566      the appropriate buffer, or if that buffer is already being
   4567      displayed in the current frame and if that buffer contains
   4568      information about that commit, then the buffer is scrolled down
   4569      instead.
   4570 
   4571    The following key bindings are available when both Magit-Blame mode
   4572 and Read-Only mode are enabled.
   4573 
   4574 ‘b’ (‘magit-blame’)
   4575      See above.
   4576 
   4577 ‘n’ (‘magit-blame-next-chunk’)
   4578      This command moves to the next chunk.
   4579 
   4580 ‘N’ (‘magit-blame-next-chunk-same-commit’)
   4581      This command moves to the next chunk from the same commit.
   4582 
   4583 ‘p’ (‘magit-blame-previous-chunk’)
   4584      This command moves to the previous chunk.
   4585 
   4586 ‘P’ (‘magit-blame-previous-chunk-same-commit’)
   4587      This command moves to the previous chunk from the same commit.
   4588 
   4589 ‘q’ (‘magit-blame-quit’)
   4590      This command turns off Magit-Blame mode.  If the buffer was created
   4591      during a recursive blame, then it also kills the buffer.
   4592 
   4593 ‘M-w’ (‘magit-blame-copy-hash’)
   4594      This command saves the hash of the current chunk’s commit to the
   4595      kill ring.
   4596 
   4597      When the region is active, the command saves the region’s content
   4598      instead of the hash, like ‘kill-ring-save’ would.
   4599 
   4600 ‘c’ (‘magit-blame-cycle-style’)
   4601      This command changes how blame information is visualized in the
   4602      current buffer by cycling through the styles specified using the
   4603      option ‘magit-blame-styles’.
   4604 
   4605    Blaming is also controlled using the following options.
   4606 
   4607  -- User Option: magit-blame-styles
   4608      This option defines a list of styles used to visualize blame
   4609      information.  For now see its doc-string to learn more.
   4610 
   4611  -- User Option: magit-blame-echo-style
   4612      This option specifies the blame visualization style used by the
   4613      command ‘magit-blame-echo’.  This must be a symbol that is used as
   4614      the identifier for one of the styles defined in
   4615      ‘magit-blame-styles’.
   4616 
   4617  -- User Option: magit-blame-time-format
   4618      This option specifies the format string used to display times when
   4619      showing blame information.
   4620 
   4621  -- User Option: magit-blame-read-only
   4622      This option controls whether blaming a buffer also makes
   4623      temporarily read-only.
   4624 
   4625  -- User Option: magit-blame-disable-modes
   4626      This option lists incompatible minor-modes that should be disabled
   4627      temporarily when a buffer contains blame information.  They are
   4628      enabled again when the buffer no longer shows blame information.
   4629 
   4630  -- User Option: magit-blame-goto-chunk-hook
   4631      This hook is run when moving between chunks.
   4632 
   4633 
   4634 File: magit.info,  Node: Manipulating,  Next: Transferring,  Prev: Inspecting,  Up: Top
   4635 
   4636 6 Manipulating
   4637 **************
   4638 
   4639 * Menu:
   4640 
   4641 * Creating Repository::
   4642 * Cloning Repository::
   4643 * Staging and Unstaging::
   4644 * Applying::
   4645 * Committing::
   4646 * Branching::
   4647 * Merging::
   4648 * Resolving Conflicts::
   4649 * Rebasing::
   4650 * Cherry Picking::
   4651 * Resetting::
   4652 * Stashing::
   4653 
   4654 
   4655 File: magit.info,  Node: Creating Repository,  Next: Cloning Repository,  Up: Manipulating
   4656 
   4657 6.1 Creating Repository
   4658 =======================
   4659 
   4660 ‘I’ (‘magit-init’)
   4661      This command initializes a repository and then shows the status
   4662      buffer for the new repository.
   4663 
   4664      If the directory is below an existing repository, then the user has
   4665      to confirm that a new one should be created inside.  If the
   4666      directory is the root of the existing repository, then the user has
   4667      to confirm that it should be reinitialized.
   4668 
   4669 
   4670 File: magit.info,  Node: Cloning Repository,  Next: Staging and Unstaging,  Prev: Creating Repository,  Up: Manipulating
   4671 
   4672 6.2 Cloning Repository
   4673 ======================
   4674 
   4675 To clone a remote or local repository use ‘C’, which is bound to the
   4676 command ‘magit-clone’.  This command either act as a transient prefix
   4677 command, which binds several infix arguments and suffix commands, or it
   4678 can invoke ‘git clone’ directly, depending on whether a prefix argument
   4679 is used and on the value of ‘magit-clone-always-transient’.
   4680 
   4681  -- User Option: magit-clone-always-transient
   4682      This option controls whether the command ‘magit-clone’ always acts
   4683      as a transient prefix command, regardless of whether a prefix
   4684      argument is used or not.  If ‘t’, then that command always acts as
   4685      a transient prefix.  If ‘nil’, then a prefix argument has to be
   4686      used for it to act as a transient.
   4687 
   4688 ‘C’ (‘magit-clone’)
   4689      This command either acts as a transient prefix command as described
   4690      above or does the same thing as ‘transient-clone-regular’ as
   4691      described below.
   4692 
   4693      If it acts as a transient prefix, then it binds the following
   4694      suffix commands and several infix arguments.
   4695 
   4696 ‘C C’ (‘magit-clone-regular’)
   4697      This command creates a regular clone of an existing repository.
   4698      The repository and the target directory are read from the user.
   4699 
   4700 ‘C s’ (‘magit-clone-shallow’)
   4701      This command creates a shallow clone of an existing repository.
   4702      The repository and the target directory are read from the user.  By
   4703      default the depth of the cloned history is a single commit, but
   4704      with a prefix argument the depth is read from the user.
   4705 
   4706 ‘C >’ (‘magit-clone-sparse’)
   4707      This command creates a clone of an existing repository and
   4708      initializes a sparse checkout, avoiding a checkout of the full
   4709      working tree.  To add more directories, use the
   4710      ‘magit-sparse-checkout’ transient (see *note Sparse checkouts::).
   4711 
   4712 ‘C b’ (‘magit-clone-bare’)
   4713      This command creates a bare clone of an existing repository.  The
   4714      repository and the target directory are read from the user.
   4715 
   4716 ‘C m’ (‘magit-clone-mirror’)
   4717      This command creates a mirror of an existing repository.  The
   4718      repository and the target directory are read from the user.
   4719 
   4720    The following suffixes are disabled by default.  See *note
   4721 (transient)Enabling and Disabling Suffixes:: for how to enable them.
   4722 
   4723 ‘C d’ (‘magit-clone-shallow-since’)
   4724      This command creates a shallow clone of an existing repository.
   4725      Only commits that were committed after a date are cloned, which is
   4726      read from the user.  The repository and the target directory are
   4727      also read from the user.
   4728 
   4729 ‘C e’ (‘magit-clone-shallow-exclude’)
   4730      This command creates a shallow clone of an existing repository.
   4731      This reads a branch or tag from the user.  Commits that are
   4732      reachable from that are not cloned.  The repository and the target
   4733      directory are also read from the user.
   4734 
   4735  -- User Option: magit-clone-set-remote-head
   4736      This option controls whether cloning causes the reference
   4737      ‘refs/remotes/<remote>/HEAD’ to be created in the clone.  The
   4738      default is to delete the reference after running ‘git clone’, which
   4739      insists on creating it.  This is because the reference has not been
   4740      found to be particularly useful as it is not automatically updated
   4741      when the ‘HEAD’ of the remote changes.  Setting this option to ‘t’
   4742      preserves Git’s default behavior of creating the reference.
   4743 
   4744  -- User Option: magit-clone-set-remote.pushDefault
   4745      This option controls whether the value of the Git variable
   4746      ‘remote.pushDefault’ is set after cloning.
   4747 
   4748         • If ‘t’, then it is always set without asking.
   4749         • If ‘ask’, then the users are asked every time they clone a
   4750           repository.
   4751         • If ‘nil’, then it is never set.
   4752 
   4753  -- User Option: magit-clone-default-directory
   4754      This option control the default directory name used when reading
   4755      the destination for a cloning operation.
   4756 
   4757         • If ‘nil’ (the default), then the value of ‘default-directory’
   4758           is used.
   4759         • If a directory, then that is used.
   4760         • If a function, then that is called with the remote url as the
   4761           only argument and the returned value is used.
   4762 
   4763  -- User Option: magit-clone-name-alist
   4764      This option maps regular expressions, which match repository names,
   4765      to repository urls, making it possible for users to enter short
   4766      names instead of urls when cloning repositories.
   4767 
   4768      Each element has the form ‘(REGEXP HOSTNAME USER)’.  When the user
   4769      enters a name when a cloning command asks for a name or url, then
   4770      that is looked up in this list.  The first element whose REGEXP
   4771      matches is used.
   4772 
   4773      The format specified by option ‘magit-clone-url-format’ is used to
   4774      turn the name into an url, using HOSTNAME and the repository name.
   4775      If the provided name contains a slash, then that is used.
   4776      Otherwise if the name omits the owner of the repository, then the
   4777      default user specified in the matched entry is used.
   4778 
   4779      If USER contains a dot, then it is treated as a Git variable and
   4780      the value of that is used as the username.  Otherwise it is used as
   4781      the username itself.
   4782 
   4783  -- User Option: magit-clone-url-format
   4784      The format specified by this option is used when turning repository
   4785      names into urls.  ‘%h’ is the hostname and ‘%n’ is the repository
   4786      name, including the name of the owner.  The value can be a string
   4787      (representing a single static format) or an alist with elements
   4788      ‘(HOSTNAME . FORMAT)’ mapping hostnames to formats.  When an alist
   4789      is used, the ‘t’ key represents the default format.
   4790 
   4791      Example of a single format string:
   4792 
   4793           (setq magit-clone-url-format
   4794                 "git@%h:%n.git")
   4795 
   4796      Example of by-hostname format strings:
   4797 
   4798           (setq magit-clone-url-format
   4799                 '(("git.example.com" . "git@%h:~%n")
   4800                   (nil . "git@%h:%n.git")))
   4801 
   4802  -- User Option: magit-post-clone-hook
   4803      Hook run after the Git process has successfully finished cloning
   4804      the repository.  When the hook is called, ‘default-directory’ is
   4805      let-bound to the directory where the repository has been cloned.
   4806 
   4807 
   4808 File: magit.info,  Node: Staging and Unstaging,  Next: Applying,  Prev: Cloning Repository,  Up: Manipulating
   4809 
   4810 6.3 Staging and Unstaging
   4811 =========================
   4812 
   4813 Like Git, Magit can of course stage and unstage complete files.  Unlike
   4814 Git, it also allows users to gracefully un-/stage individual hunks and
   4815 even just part of a hunk.  To stage individual hunks and parts of hunks
   4816 using Git directly, one has to use the very modal and rather clumsy
   4817 interface of a ‘git add --interactive’ session.
   4818 
   4819    With Magit, on the other hand, one can un-/stage individual hunks by
   4820 just moving point into the respective section inside a diff displayed in
   4821 the status buffer or a separate diff buffer and typing ‘s’ or ‘u’.  To
   4822 operate on just parts of a hunk, mark the changes that should be
   4823 un-/staged using the region and then press the same key that would be
   4824 used to un-/stage.  To stage multiple files or hunks at once use a
   4825 region that starts inside the heading of such a section and ends inside
   4826 the heading of a sibling section of the same type.
   4827 
   4828    Besides staging and unstaging, Magit also provides several other
   4829 "apply variants" that can also operate on a file, multiple files at
   4830 once, a hunk, multiple hunks at once, and on parts of a hunk.  These
   4831 apply variants are described in the next section.
   4832 
   4833    You can also use Ediff to stage and unstage.  See *note Ediffing::.
   4834 
   4835 ‘s’ (‘magit-stage’)
   4836      Add the change at point to the staging area.
   4837 
   4838      With a prefix argument and an untracked file (or files) at point,
   4839      stage the file but not its content.  This makes it possible to
   4840      stage only a subset of the new file’s changes.
   4841 
   4842 ‘S’ (‘magit-stage-modified’)
   4843      Stage all changes to files modified in the worktree.  Stage all new
   4844      content of tracked files and remove tracked files that no longer
   4845      exist in the working tree from the index also.  With a prefix
   4846      argument also stage previously untracked (but not ignored) files.
   4847 
   4848 ‘u’ (‘magit-unstage’)
   4849      Remove the change at point from the staging area.
   4850 
   4851      Only staged changes can be unstaged.  But by default this command
   4852      performs an action that is somewhat similar to unstaging, when it
   4853      is called on a committed change: it reverses the change in the
   4854      index but not in the working tree.
   4855 
   4856 ‘U’ (‘magit-unstage-all’)
   4857      Remove all changes from the staging area.
   4858 
   4859  -- User Option: magit-unstage-committed
   4860      This option controls whether ‘magit-unstage’ "unstages" committed
   4861      changes by reversing them in the index but not the working tree.
   4862      The alternative is to raise an error.
   4863 
   4864 ‘M-x magit-reverse-in-index’
   4865      This command reverses the committed change at point in the index
   4866      but not the working tree.  By default no key is bound directly to
   4867      this command, but it is indirectly called when ‘u’
   4868      (‘magit-unstage’) is pressed on a committed change.
   4869 
   4870      This allows extracting a change from ‘HEAD’, while leaving it in
   4871      the working tree, so that it can later be committed using a
   4872      separate commit.  A typical workflow would be:
   4873 
   4874        1. Optionally make sure that there are no uncommitted changes.
   4875        2. Visit the ‘HEAD’ commit and navigate to the change that should
   4876           not have been included in that commit.
   4877        3. Type ‘u’ (‘magit-unstage’) to reverse it in the index.  This
   4878           assumes that ‘magit-unstage-committed-changes’ is non-nil.
   4879        4. Type ‘c e’ to extend ‘HEAD’ with the staged changes, including
   4880           those that were already staged before.
   4881        5. Optionally stage the remaining changes using ‘s’ or ‘S’ and
   4882           then type ‘c c’ to create a new commit.
   4883 
   4884 ‘M-x magit-reset-index’
   4885      Reset the index to some commit.  The commit is read from the user
   4886      and defaults to the commit at point.  If there is no commit at
   4887      point, then it defaults to ‘HEAD’.
   4888 
   4889 * Menu:
   4890 
   4891 * Staging from File-Visiting Buffers::
   4892 
   4893 
   4894 File: magit.info,  Node: Staging from File-Visiting Buffers,  Up: Staging and Unstaging
   4895 
   4896 6.3.1 Staging from File-Visiting Buffers
   4897 ----------------------------------------
   4898 
   4899 Fine-grained un-/staging has to be done from the status or a diff
   4900 buffer, but it’s also possible to un-/stage all changes made to the file
   4901 visited in the current buffer right from inside that buffer.
   4902 
   4903 ‘M-x magit-stage-file’
   4904      When invoked inside a file-visiting buffer, then stage all changes
   4905      to that file.  In a Magit buffer, stage the file at point if any.
   4906      Otherwise prompt for a file to be staged.  With a prefix argument
   4907      always prompt the user for a file, even in a file-visiting buffer
   4908      or when there is a file section at point.
   4909 
   4910 ‘M-x magit-unstage-file’
   4911      When invoked inside a file-visiting buffer, then unstage all
   4912      changes to that file.  In a Magit buffer, unstage the file at point
   4913      if any.  Otherwise prompt for a file to be unstaged.  With a prefix
   4914      argument always prompt the user for a file, even in a file-visiting
   4915      buffer or when there is a file section at point.
   4916 
   4917 
   4918 File: magit.info,  Node: Applying,  Next: Committing,  Prev: Staging and Unstaging,  Up: Manipulating
   4919 
   4920 6.4 Applying
   4921 ============
   4922 
   4923 Magit provides several "apply variants": stage, unstage, discard,
   4924 reverse, and "regular apply".  At least when operating on a hunk they
   4925 are all implemented using ‘git apply’, which is why they are called
   4926 "apply variants".
   4927 
   4928    • Stage.  Apply a change from the working tree to the index.  The
   4929      change also remains in the working tree.
   4930 
   4931    • Unstage.  Remove a change from the index.  The change remains in
   4932      the working tree.
   4933 
   4934    • Discard.  On a staged change, remove it from the working tree and
   4935      the index.  On an unstaged change, remove it from the working tree
   4936      only.
   4937 
   4938    • Reverse.  Reverse a change in the working tree.  Both committed and
   4939      staged changes can be reversed.  Unstaged changes cannot be
   4940      reversed.  Discard them instead.
   4941 
   4942    • Apply.  Apply a change to the working tree.  Both committed and
   4943      staged changes can be applied.  Unstaged changes cannot be applied
   4944      - as they already have been applied.
   4945 
   4946    The previous section described the staging and unstaging commands.
   4947 What follows are the commands which implement the remaining apply
   4948 variants.
   4949 
   4950 ‘a’ (‘magit-apply’)
   4951      Apply the change at point to the working tree.
   4952 
   4953      With a prefix argument fallback to a 3-way merge.  Doing so causes
   4954      the change to be applied to the index as well.
   4955 
   4956 ‘k’ (‘magit-discard’)
   4957      Remove the change at point from the working tree.
   4958 
   4959      On a hunk or file with unresolved conflicts prompt which side to
   4960      keep (while discarding the other).  If point is within the text of
   4961      a side, then keep that side without prompting.
   4962 
   4963 ‘v’ (‘magit-reverse’)
   4964      Reverse the change at point in the working tree.
   4965 
   4966      With a prefix argument fallback to a 3-way merge.  Doing so causes
   4967      the change to be applied to the index as well.
   4968 
   4969    With a prefix argument all apply variants attempt a 3-way merge when
   4970 appropriate (i.e., when ‘git apply’ is used internally).
   4971 
   4972 
   4973 File: magit.info,  Node: Committing,  Next: Branching,  Prev: Applying,  Up: Manipulating
   4974 
   4975 6.5 Committing
   4976 ==============
   4977 
   4978 When the user initiates a commit, Magit calls ‘git commit’ without any
   4979 arguments, so Git has to get it from the user.  It creates the file
   4980 ‘.git/COMMIT_EDITMSG’ and then opens that file in an editor.  Magit
   4981 arranges for that editor to be the Emacsclient.  Once the user finishes
   4982 the editing session, the Emacsclient exits and Git creates the commit
   4983 using the file’s content as message.
   4984 
   4985 * Menu:
   4986 
   4987 * Initiating a Commit::
   4988 * Editing Commit Messages::
   4989 
   4990 
   4991 File: magit.info,  Node: Initiating a Commit,  Next: Editing Commit Messages,  Up: Committing
   4992 
   4993 6.5.1 Initiating a Commit
   4994 -------------------------
   4995 
   4996 Also see *note (gitman)git-commit::.
   4997 
   4998 ‘c’ (‘magit-commit’)
   4999      This transient prefix command binds the following suffix commands
   5000      along with the appropriate infix arguments and displays them in a
   5001      temporary buffer until a suffix is invoked.
   5002 
   5003 ‘c c’ (‘magit-commit-create’)
   5004      Create a new commit on ‘HEAD’.  With a prefix argument amend to the
   5005      commit at ‘HEAD’ instead.
   5006 
   5007 ‘c a’ (‘magit-commit-amend’)
   5008      Amend the last commit.
   5009 
   5010 ‘c e’ (‘magit-commit-extend’)
   5011      Amend the last commit, without editing the message.  With a prefix
   5012      argument keep the committer date, otherwise change it.  The option
   5013      ‘magit-commit-extend-override-date’ can be used to inverse the
   5014      meaning of the prefix argument.
   5015 
   5016      Non-interactively respect the optional OVERRIDE-DATE argument and
   5017      ignore the option.
   5018 
   5019 ‘c w’ (‘magit-commit-reword’)
   5020      Reword the last commit, ignoring staged changes.  With a prefix
   5021      argument keep the committer date, otherwise change it.  The option
   5022      ‘magit-commit-reword-override-date’ can be used to inverse the
   5023      meaning of the prefix argument.
   5024 
   5025      Non-interactively respect the optional OVERRIDE-DATE argument and
   5026      ignore the option.
   5027 
   5028 ‘c f’ (‘magit-commit-fixup’)
   5029      Create a fixup commit.
   5030 
   5031      With a prefix argument the target commit has to be confirmed.
   5032      Otherwise the commit at point may be used without confirmation
   5033      depending on the value of option ‘magit-commit-squash-confirm’.
   5034 
   5035 ‘c F’ (‘magit-commit-instant-fixup’)
   5036      Create a fixup commit and instantly rebase.
   5037 
   5038 ‘c s’ (‘magit-commit-squash’)
   5039      Create a squash commit, without editing the squash message.
   5040 
   5041      With a prefix argument the target commit has to be confirmed.
   5042      Otherwise the commit at point may be used without confirmation
   5043      depending on the value of option ‘magit-commit-squash-confirm’.
   5044 
   5045 ‘c S’ (‘magit-commit-instant-squash’)
   5046      Create a squash commit and instantly rebase.
   5047 
   5048 ‘c A’ (‘magit-commit-augment’)
   5049      Create a squash commit, editing the squash message.
   5050 
   5051      With a prefix argument the target commit has to be confirmed.
   5052      Otherwise the commit at point may be used without confirmation
   5053      depending on the value of option ‘magit-commit-squash-confirm’.
   5054 
   5055  -- User Option: magit-commit-ask-to-stage
   5056      Whether to ask to stage all unstaged changes when committing and
   5057      nothing is staged.
   5058 
   5059  -- User Option: magit-commit-show-diff
   5060      Whether the relevant diff is automatically shown when committing.
   5061 
   5062  -- User Option: magit-commit-extend-override-date
   5063      Whether using ‘magit-commit-extend’ changes the committer date.
   5064 
   5065  -- User Option: magit-commit-reword-override-date
   5066      Whether using ‘magit-commit-reword’ changes the committer date.
   5067 
   5068  -- User Option: magit-commit-squash-confirm
   5069      Whether the commit targeted by squash and fixup has to be
   5070      confirmed.  When non-nil then the commit at point (if any) is used
   5071      as default choice.  Otherwise it has to be confirmed.  This option
   5072      only affects ‘magit-commit-squash’ and ‘magit-commit-fixup’.  The
   5073      "instant" variants always require confirmation because making an
   5074      error while using those is harder to recover from.
   5075 
   5076  -- User Option: magit-post-commit-hook
   5077      Hook run after creating a commit without the user editing a
   5078      message.
   5079 
   5080      This hook is run by ‘magit-refresh’ if ‘this-command’ is a member
   5081      of ‘magit-post-commit-hook-commands’.  This only includes commands
   5082      named ‘magit-commit-*’ that do *not* require that the user edits
   5083      the commit message in a buffer.
   5084 
   5085      Also see ‘git-commit-post-finish-hook’.
   5086 
   5087  -- User Option: magit-commit-diff-inhibit-same-window
   5088      Whether to inhibit use of same window when showing diff while
   5089      committing.
   5090 
   5091      When writing a commit, then a diff of the changes to be committed
   5092      is automatically shown.  The idea is that the diff is shown in a
   5093      different window of the same frame and for most users that just
   5094      works.  In other words most users can completely ignore this option
   5095      because its value doesn’t make a difference for them.
   5096 
   5097      However for users who configured Emacs to never create a new window
   5098      even when the package explicitly tries to do so, then displaying
   5099      two new buffers necessarily means that the first is immediately
   5100      replaced by the second.  In our case the message buffer is
   5101      immediately replaced by the diff buffer, which is of course highly
   5102      undesirable.
   5103 
   5104      A workaround is to suppress this user configuration in this
   5105      particular case.  Users have to explicitly opt-in by toggling this
   5106      option.  We cannot enable the workaround unconditionally because
   5107      that again causes issues for other users: if the frame is too tiny
   5108      or the relevant settings too aggressive, then the diff buffer would
   5109      end up being displayed in a new frame.
   5110 
   5111      Also see <https://github.com/magit/magit/issues/4132>.
   5112 
   5113 
   5114 File: magit.info,  Node: Editing Commit Messages,  Prev: Initiating a Commit,  Up: Committing
   5115 
   5116 6.5.2 Editing Commit Messages
   5117 -----------------------------
   5118 
   5119 After initiating a commit as described in the previous section, two new
   5120 buffers appear.  One shows the changes that are about to be committed,
   5121 while the other is used to write the message.
   5122 
   5123    Commit messages are edited in an edit session - in the background
   5124 ‘git’ is waiting for the editor, in our case ‘emacsclient’, to save the
   5125 commit message in a file (in most cases ‘.git/COMMIT_EDITMSG’) and then
   5126 return.  If the editor returns with a non-zero exit status then ‘git’
   5127 does not create the commit.  So the most important commands are those
   5128 for finishing and aborting the commit.
   5129 
   5130 ‘C-c C-c’ (‘with-editor-finish’)
   5131      Finish the current editing session by returning with exit code 0.
   5132      Git then creates the commit using the message it finds in the file.
   5133 
   5134 ‘C-c C-k’ (‘with-editor-cancel’)
   5135      Cancel the current editing session by returning with exit code 1.
   5136      Git then cancels the commit, but leaves the file untouched.
   5137 
   5138    In addition to being used by ‘git commit’, messages may also be
   5139 stored in a ring that persists until Emacs is closed.  By default the
   5140 message is stored at the beginning and the end of an edit session
   5141 (regardless of whether the session is finished successfully or was
   5142 canceled).  It is sometimes useful to bring back messages from that
   5143 ring.
   5144 
   5145 ‘C-c M-s’ (‘git-commit-save-message’)
   5146      Save the current buffer content to the commit message ring.
   5147 
   5148 ‘M-p’ (‘git-commit-prev-message’)
   5149      Cycle backward through the commit message ring, after saving the
   5150      current message to the ring.  With a numeric prefix ARG, go back
   5151      ARG comments.
   5152 
   5153 ‘M-n’ (‘git-commit-next-message’)
   5154      Cycle forward through the commit message ring, after saving the
   5155      current message to the ring.  With a numeric prefix ARG, go back
   5156      ARG comments.
   5157 
   5158    By default the diff for the changes that are about to be committed
   5159 are automatically shown when invoking the commit.  To prevent that,
   5160 remove ‘magit-commit-diff’ from ‘server-switch-hook’.
   5161 
   5162    When amending to an existing commit it may be useful to show either
   5163 the changes that are about to be added to that commit or to show those
   5164 changes alongside those that have already been committed.
   5165 
   5166 ‘C-c C-d’ (‘magit-diff-while-committing’)
   5167      While committing, show the changes that are about to be committed.
   5168      While amending, invoking the command again toggles between showing
   5169      just the new changes or all the changes that will be committed.
   5170 
   5171 * Menu:
   5172 
   5173 * Using the Revision Stack::
   5174 * Commit Pseudo Headers::
   5175 * Commit Mode and Hooks::
   5176 * Commit Message Conventions::
   5177 
   5178 
   5179 File: magit.info,  Node: Using the Revision Stack,  Next: Commit Pseudo Headers,  Up: Editing Commit Messages
   5180 
   5181 Using the Revision Stack
   5182 ........................
   5183 
   5184 ‘C-c C-w’ (‘magit-pop-revision-stack’)
   5185      This command inserts a representation of a revision into the
   5186      current buffer.  It can be used inside buffers used to write commit
   5187      messages but also in other buffers such as buffers used to edit
   5188      emails or ChangeLog files.
   5189 
   5190      By default this command pops the revision which was last added to
   5191      the ‘magit-revision-stack’ and inserts it into the current buffer
   5192      according to ‘magit-pop-revision-stack-format’.  Revisions can be
   5193      put on the stack using ‘magit-copy-section-value’ and
   5194      ‘magit-copy-buffer-revision’.
   5195 
   5196      If the stack is empty or with a prefix argument it instead reads a
   5197      revision in the minibuffer.  By using the minibuffer history this
   5198      allows selecting an item which was popped earlier or to insert an
   5199      arbitrary reference or revision without first pushing it onto the
   5200      stack.
   5201 
   5202      When reading the revision from the minibuffer, then it might not be
   5203      possible to guess the correct repository.  When this command is
   5204      called inside a repository (e.g., while composing a commit
   5205      message), then that repository is used.  Otherwise (e.g., while
   5206      composing an email) then the repository recorded for the top
   5207      element of the stack is used (even though we insert another
   5208      revision).  If not called inside a repository and with an empty
   5209      stack, or with two prefix arguments, then read the repository in
   5210      the minibuffer too.
   5211 
   5212  -- User Option: magit-pop-revision-stack-format
   5213      This option controls how the command ‘magit-pop-revision-stack’
   5214      inserts a revision into the current buffer.
   5215 
   5216      The entries on the stack have the format ‘(HASH TOPLEVEL)’ and this
   5217      option has the format ‘(POINT-FORMAT EOB-FORMAT INDEX-REGEXP)’, all
   5218      of which may be nil or a string (though either one of EOB-FORMAT or
   5219      POINT-FORMAT should be a string, and if INDEX-REGEXP is non-nil,
   5220      then the two formats should be too).
   5221 
   5222      First INDEX-REGEXP is used to find the previously inserted entry,
   5223      by searching backward from point.  The first submatch must match
   5224      the index number.  That number is incremented by one, and becomes
   5225      the index number of the entry to be inserted.  If you don’t want to
   5226      number the inserted revisions, then use nil for INDEX-REGEXP.
   5227 
   5228      If INDEX-REGEXP is non-nil then both POINT-FORMAT and EOB-FORMAT
   5229      should contain \"%N\", which is replaced with the number that was
   5230      determined in the previous step.
   5231 
   5232      Both formats, if non-nil and after removing %N, are then expanded
   5233      using ‘git show --format=FORMAT ...’ inside TOPLEVEL.
   5234 
   5235      The expansion of POINT-FORMAT is inserted at point, and the
   5236      expansion of EOB-FORMAT is inserted at the end of the buffer (if
   5237      the buffer ends with a comment, then it is inserted right before
   5238      that).
   5239 
   5240 
   5241 File: magit.info,  Node: Commit Pseudo Headers,  Next: Commit Mode and Hooks,  Prev: Using the Revision Stack,  Up: Editing Commit Messages
   5242 
   5243 Commit Pseudo Headers
   5244 .....................
   5245 
   5246 Some projects use pseudo headers in commit messages.  Magit colorizes
   5247 such headers and provides some commands to insert such headers.
   5248 
   5249  -- User Option: git-commit-known-pseudo-headers
   5250      A list of Git pseudo headers to be highlighted.
   5251 
   5252 ‘C-c C-i’ (‘git-commit-insert-pseudo-header’)
   5253      Insert a commit message pseudo header.
   5254 
   5255 ‘C-c C-a’ (‘git-commit-ack’)
   5256      Insert a header acknowledging that you have looked at the commit.
   5257 
   5258 ‘C-c C-r’ (‘git-commit-review’)
   5259      Insert a header acknowledging that you have reviewed the commit.
   5260 
   5261 ‘C-c C-s’ (‘git-commit-signoff’)
   5262      Insert a header to sign off the commit.
   5263 
   5264 ‘C-c C-t’ (‘git-commit-test’)
   5265      Insert a header acknowledging that you have tested the commit.
   5266 
   5267 ‘C-c C-o’ (‘git-commit-cc’)
   5268      Insert a header mentioning someone who might be interested.
   5269 
   5270 ‘C-c C-p’ (‘git-commit-reported’)
   5271      Insert a header mentioning the person who reported the issue being
   5272      fixed by the commit.
   5273 
   5274 ‘C-c M-i’ (‘git-commit-suggested’)
   5275      Insert a header mentioning the person who suggested the change.
   5276 
   5277 
   5278 File: magit.info,  Node: Commit Mode and Hooks,  Next: Commit Message Conventions,  Prev: Commit Pseudo Headers,  Up: Editing Commit Messages
   5279 
   5280 Commit Mode and Hooks
   5281 .....................
   5282 
   5283 ‘git-commit-mode’ is a minor mode that is only used to establish certain
   5284 key bindings.  This makes it possible to use an arbitrary major mode in
   5285 buffers used to edit commit messages.  It is even possible to use
   5286 different major modes in different repositories, which is useful when
   5287 different projects impose different commit message conventions.
   5288 
   5289  -- User Option: git-commit-major-mode
   5290      The value of this option is the major mode used to edit Git commit
   5291      messages.
   5292 
   5293    Because ‘git-commit-mode’ is a minor mode, we don’t use its mode hook
   5294 to setup the buffer, except for the key bindings.  All other setup
   5295 happens in the function ‘git-commit-setup’, which among other things
   5296 runs the hook ‘git-commit-setup-hook’.
   5297 
   5298  -- User Option: git-commit-setup-hook
   5299      Hook run at the end of ‘git-commit-setup’.
   5300 
   5301 The following functions are suitable for this hook:
   5302 
   5303  -- Function: git-commit-save-message
   5304      Save the current buffer content to the commit message ring.
   5305 
   5306  -- Function: git-commit-setup-changelog-support
   5307      After this function is called, ChangeLog entries are treated as
   5308      paragraphs.
   5309 
   5310  -- Function: git-commit-turn-on-auto-fill
   5311      Turn on ‘auto-fill-mode’.
   5312 
   5313  -- Function: git-commit-turn-on-flyspell
   5314      Turn on Flyspell mode.  Also prevent comments from being checked
   5315      and finally check current non-comment text.
   5316 
   5317  -- Function: git-commit-propertize-diff
   5318      Propertize the diff shown inside the commit message buffer.  Git
   5319      inserts such diffs into the commit message template when the
   5320      ‘--verbose’ argument is used.  ‘magit-commit’ by default does not
   5321      offer that argument because the diff that is shown in a separate
   5322      buffer is more useful.  But some users disagree, which is why this
   5323      function exists.
   5324 
   5325  -- Function: bug-reference-mode
   5326      Hyperlink bug references in the buffer.
   5327 
   5328  -- Function: with-editor-usage-message
   5329      Show usage information in the echo area.
   5330 
   5331  -- User Option: git-commit-post-finish-hook
   5332      Hook run after the user finished writing a commit message.
   5333 
   5334      This hook is only run after pressing ‘C-c C-c’ in a buffer used to
   5335      edit a commit message.  If a commit is created without the user
   5336      typing a message into a buffer, then this hook is not run.
   5337 
   5338      This hook is not run until the new commit has been created.  If
   5339      doing so takes Git longer than one second, then this hook isn’t run
   5340      at all.  For certain commands such as ‘magit-rebase-continue’ this
   5341      hook is never run because doing so would lead to a race condition.
   5342 
   5343      This hook is only run if ‘magit’ is available.
   5344 
   5345      Also see ‘magit-post-commit-hook’.
   5346 
   5347 
   5348 File: magit.info,  Node: Commit Message Conventions,  Prev: Commit Mode and Hooks,  Up: Editing Commit Messages
   5349 
   5350 Commit Message Conventions
   5351 ..........................
   5352 
   5353 Git-Commit highlights certain violations of commonly accepted commit
   5354 message conventions.  Certain violations even cause Git-Commit to ask
   5355 you to confirm that you really want to do that.  This nagging can of
   5356 course be turned off, but the result of doing that usually is that
   5357 instead of some code it’s now the human who is reviewing your commits
   5358 who has to waste some time telling you to fix your commits.
   5359 
   5360  -- User Option: git-commit-summary-max-length
   5361      The intended maximal length of the summary line of commit messages.
   5362      Characters beyond this column are colorized to indicate that this
   5363      preference has been violated.
   5364 
   5365  -- User Option: git-commit-finish-query-functions
   5366      List of functions called to query before performing commit.
   5367 
   5368      The commit message buffer is current while the functions are
   5369      called.  If any of them returns nil, then the commit is not
   5370      performed and the buffer is not killed.  The user should then fix
   5371      the issue and try again.
   5372 
   5373      The functions are called with one argument.  If it is non-nil then
   5374      that indicates that the user used a prefix argument to force
   5375      finishing the session despite issues.  Functions should usually
   5376      honor this wish and return non-nil.
   5377 
   5378      By default the only member is ‘git-commit-check-style-conventions’.
   5379 
   5380  -- Function: git-commit-check-style-conventions
   5381      This function checks for violations of certain basic style
   5382      conventions.  For each violation it asks users if they want to
   5383      proceed anyway.
   5384 
   5385  -- User Option: git-commit-style-convention-checks
   5386      This option controls what conventions the function by the same name
   5387      tries to enforce.  The value is a list of self-explanatory symbols
   5388      identifying certain conventions; ‘non-empty-second-line’ and
   5389      ‘overlong-summary-line’.
   5390 
   5391 
   5392 File: magit.info,  Node: Branching,  Next: Merging,  Prev: Committing,  Up: Manipulating
   5393 
   5394 6.6 Branching
   5395 =============
   5396 
   5397 * Menu:
   5398 
   5399 * The Two Remotes::
   5400 * Branch Commands::
   5401 * Branch Git Variables::
   5402 * Auxiliary Branch Commands::
   5403 
   5404 
   5405 File: magit.info,  Node: The Two Remotes,  Next: Branch Commands,  Up: Branching
   5406 
   5407 6.6.1 The Two Remotes
   5408 ---------------------
   5409 
   5410 The upstream branch of some local branch is the branch into which the
   5411 commits on that local branch should eventually be merged, usually
   5412 something like ‘origin/master’.  For the ‘master’ branch itself the
   5413 upstream branch and the branch it is being pushed to, are usually the
   5414 same remote branch.  But for a feature branch the upstream branch and
   5415 the branch it is being pushed to should differ.
   5416 
   5417    The commits on feature branches too should _eventually_ end up in a
   5418 remote branch such as ‘origin/master’ or ‘origin/maint’.  Such a branch
   5419 should therefore be used as the upstream.  But feature branches
   5420 shouldn’t be pushed directly to such branches.  Instead a feature branch
   5421 ‘my-feature’ is usually pushed to ‘my-fork/my-feature’ or if you are a
   5422 contributor ‘origin/my-feature’.  After the new feature has been
   5423 reviewed, the maintainer merges the feature into ‘master’.  And finally
   5424 ‘master’ (not ‘my-feature’ itself) is pushed to ‘origin/master’.
   5425 
   5426    But new features seldom are perfect on the first try, and so feature
   5427 branches usually have to be reviewed, improved, and re-pushed several
   5428 times.  Pushing should therefore be easy to do, and for that reason many
   5429 Git users have concluded that it is best to use the remote branch to
   5430 which the local feature branch is being pushed as its upstream.
   5431 
   5432    But luckily Git has long ago gained support for a push-remote which
   5433 can be configured separately from the upstream branch, using the
   5434 variables ‘branch.<name>.pushRemote’ and ‘remote.pushDefault’.  So we no
   5435 longer have to choose which of the two remotes should be used as "the
   5436 remote".
   5437 
   5438    Each of the fetching, pulling, and pushing transient commands
   5439 features three suffix commands that act on the current branch and some
   5440 other branch.  Of these, ‘p’ is bound to a command which acts on the
   5441 push-remote, ‘u’ is bound to a command which acts on the upstream, and
   5442 ‘e’ is bound to a command which acts on any other branch.  The status
   5443 buffer shows unpushed and unpulled commits for both the push-remote and
   5444 the upstream.
   5445 
   5446    It’s fairly simple to configure these two remotes.  The values of all
   5447 the variables that are related to fetching, pulling, and pushing (as
   5448 well as some other branch-related variables) can be inspected and
   5449 changed using the command ‘magit-branch-configure’, which is available
   5450 from many transient prefix commands that deal with branches.  It is also
   5451 possible to set the push-remote or upstream while pushing (see *note
   5452 Pushing::).
   5453 
   5454 
   5455 File: magit.info,  Node: Branch Commands,  Next: Branch Git Variables,  Prev: The Two Remotes,  Up: Branching
   5456 
   5457 6.6.2 Branch Commands
   5458 ---------------------
   5459 
   5460 The transient prefix command ‘magit-branch’ is used to create and
   5461 checkout branches, and to make changes to existing branches.  It is not
   5462 used to fetch, pull, merge, rebase, or push branches, i.e., this command
   5463 deals with branches themselves, not with the commits reachable from
   5464 them.  Those features are available from separate transient command.
   5465 
   5466 ‘b’ (‘magit-branch’)
   5467      This transient prefix command binds the following suffix commands
   5468      and displays them in a temporary buffer until a suffix is invoked.
   5469 
   5470      By default it also binds and displays the values of some
   5471      branch-related Git variables and allows changing their values.
   5472 
   5473  -- User Option: magit-branch-direct-configure
   5474      This option controls whether the transient command ‘magit-branch’
   5475      can be used to directly change the values of Git variables.  This
   5476      defaults to ‘t’ (to avoid changing key bindings).  When set to
   5477      ‘nil’, then no variables are displayed by that transient command,
   5478      and its suffix command ‘magit-branch-configure’ has to be used
   5479      instead to view and change branch related variables.
   5480 
   5481 ‘b C’ (‘magit-branch-configure’)
   5482 ‘f C’
   5483 ‘F C’
   5484 ‘P C’
   5485      This transient prefix command binds commands that set the value of
   5486      branch-related variables and displays them in a temporary buffer
   5487      until the transient is exited.
   5488 
   5489      With a prefix argument, this command always prompts for a branch.
   5490 
   5491      Without a prefix argument this depends on whether it was invoked as
   5492      a suffix of ‘magit-branch’ and on the
   5493      ‘magit-branch-direct-configure’ option.  If ‘magit-branch’ already
   5494      displays the variables for the current branch, then it isn’t useful
   5495      to invoke another transient that displays them for the same branch.
   5496      In that case this command prompts for a branch.
   5497 
   5498    The variables are described in *note Branch Git Variables::.
   5499 
   5500 ‘b b’ (‘magit-checkout’)
   5501      Checkout a revision read in the minibuffer and defaulting to the
   5502      branch or arbitrary revision at point.  If the revision is a local
   5503      branch then that becomes the current branch.  If it is something
   5504      else then ‘HEAD’ becomes detached.  Checkout fails if the working
   5505      tree or the staging area contain changes.
   5506 
   5507 ‘b n’ (‘magit-branch-create’)
   5508      Create a new branch.  The user is asked for a branch or arbitrary
   5509      revision to use as the starting point of the new branch.  When a
   5510      branch name is provided, then that becomes the upstream branch of
   5511      the new branch.  The name of the new branch is also read in the
   5512      minibuffer.
   5513 
   5514      Also see option ‘magit-branch-prefer-remote-upstream’.
   5515 
   5516 ‘b c’ (‘magit-branch-and-checkout’)
   5517      This command creates a new branch like ‘magit-branch-create’, but
   5518      then also checks it out.
   5519 
   5520      Also see option ‘magit-branch-prefer-remote-upstream’.
   5521 
   5522 ‘b l’ (‘magit-branch-checkout’)
   5523      This command checks out an existing or new local branch.  It reads
   5524      a branch name from the user offering all local branches and a
   5525      subset of remote branches as candidates.  Remote branches for which
   5526      a local branch by the same name exists are omitted from the list of
   5527      candidates.  The user can also enter a completely new branch name.
   5528 
   5529         • If the user selects an existing local branch, then that is
   5530           checked out.
   5531 
   5532         • If the user selects a remote branch, then it creates and
   5533           checks out a new local branch with the same name, and
   5534           configures the selected remote branch as the push target.
   5535 
   5536         • If the user enters a new branch name, then it creates and
   5537           checks that out, after also reading the starting-point from
   5538           the user.
   5539 
   5540      In the latter two cases the upstream is also set.  Whether it is
   5541      set to the chosen starting point or something else depends on the
   5542      value of ‘magit-branch-adjust-remote-upstream-alist’.
   5543 
   5544 ‘b s’ (‘magit-branch-spinoff’)
   5545      This command creates and checks out a new branch starting at and
   5546      tracking the current branch.  That branch in turn is reset to the
   5547      last commit it shares with its upstream.  If the current branch has
   5548      no upstream or no unpushed commits, then the new branch is created
   5549      anyway and the previously current branch is not touched.
   5550 
   5551      This is useful to create a feature branch after work has already
   5552      began on the old branch (likely but not necessarily "master").
   5553 
   5554      If the current branch is a member of the value of option
   5555      ‘magit-branch-prefer-remote-upstream’ (which see), then the current
   5556      branch will be used as the starting point as usual, but the
   5557      upstream of the starting-point may be used as the upstream of the
   5558      new branch, instead of the starting-point itself.
   5559 
   5560      If optional FROM is non-nil, then the source branch is reset to
   5561      ‘FROM~’, instead of to the last commit it shares with its upstream.
   5562      Interactively, FROM is only ever non-nil, if the region selects
   5563      some commits, and among those commits, FROM is the commit that is
   5564      the fewest commits ahead of the source branch.
   5565 
   5566      The commit at the other end of the selection actually does not
   5567      matter, all commits between FROM and ‘HEAD’ are moved to the new
   5568      branch.  If FROM is not reachable from ‘HEAD’ or is reachable from
   5569      the source branch’s upstream, then an error is raised.
   5570 
   5571 ‘b S’ (‘magit-branch-spinout’)
   5572      This command behaves like ‘magit-branch-spinoff’, except that it
   5573      does not change the current branch.  If there are any uncommitted
   5574      changes, then it behaves exactly like ‘magit-branch-spinoff’.
   5575 
   5576 ‘b x’ (‘magit-branch-reset’)
   5577      This command resets a branch, defaulting to the branch at point, to
   5578      the tip of another branch or any other commit.
   5579 
   5580      When the branch being reset is the current branch, then a hard
   5581      reset is performed.  If there are any uncommitted changes, then the
   5582      user has to confirm the reset because those changes would be lost.
   5583 
   5584      This is useful when you have started work on a feature branch but
   5585      realize it’s all crap and want to start over.
   5586 
   5587      When resetting to another branch and a prefix argument is used,
   5588      then the target branch is set as the upstream of the branch that is
   5589      being reset.
   5590 
   5591 ‘b k’ (‘magit-branch-delete’)
   5592      Delete one or multiple branches.  If the region marks multiple
   5593      branches, then offer to delete those.  Otherwise, prompt for a
   5594      single branch to be deleted, defaulting to the branch at point.
   5595 
   5596      Require confirmation when deleting branches is dangerous in some
   5597      way.  Option ‘magit-no-confirm’ can be customized to not require
   5598      confirmation in certain cases.  See its docstring to learn why
   5599      confirmation is required by default in certain cases or if a prompt
   5600      is confusing.
   5601 
   5602 ‘b m’ (‘magit-branch-rename’)
   5603      Rename a branch.  The branch and the new name are read in the
   5604      minibuffer.  With prefix argument the branch is renamed even if
   5605      that name conflicts with an existing branch.
   5606 
   5607  -- User Option: magit-branch-read-upstream-first
   5608      When creating a branch, whether to read the upstream branch before
   5609      the name of the branch that is to be created.  The default is ‘t’,
   5610      and I recommend you leave it at that.
   5611 
   5612  -- User Option: magit-branch-prefer-remote-upstream
   5613      This option specifies whether remote upstreams are favored over
   5614      local upstreams when creating new branches.
   5615 
   5616      When a new branch is created, then the branch, commit, or stash at
   5617      point is suggested as the starting point of the new branch, or if
   5618      there is no such revision at point the current branch.  In either
   5619      case the user may choose another starting point.
   5620 
   5621      If the chosen starting point is a branch, then it may also be set
   5622      as the upstream of the new branch, depending on the value of the
   5623      Git variable ‘branch.autoSetupMerge’.  By default this is done for
   5624      remote branches, but not for local branches.
   5625 
   5626      You might prefer to always use some remote branch as upstream.  If
   5627      the chosen starting point is (1) a local branch, (2) whose name
   5628      matches a member of the value of this option, (3) the upstream of
   5629      that local branch is a remote branch with the same name, and (4)
   5630      that remote branch can be fast-forwarded to the local branch, then
   5631      the chosen branch is used as starting point, but its own upstream
   5632      is used as the upstream of the new branch.
   5633 
   5634      Members of this option’s value are treated as branch names that
   5635      have to match exactly unless they contain a character that makes
   5636      them invalid as a branch name.  Recommended characters to use to
   5637      trigger interpretation as a regexp are "*" and "^".  Some other
   5638      characters which you might expect to be invalid, actually are not,
   5639      e.g., ".+$" are all perfectly valid.  More precisely, if ‘git
   5640      check-ref-format --branch STRING’ exits with a non-zero status,
   5641      then treat STRING as a regexp.
   5642 
   5643      Assuming the chosen branch matches these conditions you would end
   5644      up with with e.g.:
   5645 
   5646           feature --upstream--> origin/master
   5647 
   5648      instead of
   5649 
   5650           feature --upstream--> master --upstream--> origin/master
   5651 
   5652      Which you prefer is a matter of personal preference.  If you do
   5653      prefer the former, then you should add branches such as ‘master’,
   5654      ‘next’, and ‘maint’ to the value of this options.
   5655 
   5656  -- User Option: magit-branch-adjust-remote-upstream-alist
   5657      The value of this option is an alist of branches to be used as the
   5658      upstream when branching a remote branch.
   5659 
   5660      When creating a local branch from an ephemeral branch located on a
   5661      remote, e.g., a feature or hotfix branch, then that remote branch
   5662      should usually not be used as the upstream branch, since the
   5663      push-remote already allows accessing it and having both the
   5664      upstream and the push-remote reference the same related branch
   5665      would be wasteful.  Instead a branch like "maint" or "master"
   5666      should be used as the upstream.
   5667 
   5668      This option allows specifying the branch that should be used as the
   5669      upstream when branching certain remote branches.  The value is an
   5670      alist of the form ‘((UPSTREAM . RULE)...)’.  The first matching
   5671      element is used, the following elements are ignored.
   5672 
   5673      UPSTREAM is the branch to be used as the upstream for branches
   5674      specified by RULE.  It can be a local or a remote branch.
   5675 
   5676      RULE can either be a regular expression, matching branches whose
   5677      upstream should be the one specified by UPSTREAM.  Or it can be a
   5678      list of the only branches that should *not* use UPSTREAM; all other
   5679      branches will.  Matching is done after stripping the remote part of
   5680      the name of the branch that is being branched from.
   5681 
   5682      If you use a finite set of non-ephemeral branches across all your
   5683      repositories, then you might use something like:
   5684 
   5685           (("origin/master" . ("master" "next" "maint")))
   5686 
   5687      Or if the names of all your ephemeral branches contain a slash, at
   5688      least in some repositories, then a good value could be:
   5689 
   5690           (("origin/master" . "/"))
   5691 
   5692      Of course you can also fine-tune:
   5693 
   5694           (("origin/maint" . "\\`hotfix/")
   5695            ("origin/master" . "\\`feature/"))
   5696 
   5697      UPSTREAM can be a local branch:
   5698 
   5699           (("master" . ("master" "next" "maint")))
   5700 
   5701    Because the main branch is no longer almost always named "master" you
   5702 should also account for other common names:
   5703 
   5704      (("main"  . ("main" "master" "next" "maint"))
   5705       ("master" . ("main" "master" "next" "maint")))
   5706 
   5707  -- Command: magit-branch-orphan
   5708      This command creates and checks out a new orphan branch with
   5709      contents from a given revision.
   5710 
   5711  -- Command: magit-branch-or-checkout
   5712      This command is a hybrid between ‘magit-checkout’ and
   5713      ‘magit-branch-and-checkout’ and is intended as a replacement for
   5714      the former in ‘magit-branch’.
   5715 
   5716      It first asks the user for an existing branch or revision.  If the
   5717      user input actually can be resolved as a branch or revision, then
   5718      it checks that out, just like ‘magit-checkout’ would.
   5719 
   5720      Otherwise it creates and checks out a new branch using the input as
   5721      its name.  Before doing so it reads the starting-point for the new
   5722      branch.  This is similar to what ‘magit-branch-and-checkout’ does.
   5723 
   5724      To use this command instead of ‘magit-checkout’ add this to your
   5725      init file:
   5726 
   5727           (transient-replace-suffix 'magit-branch 'magit-checkout
   5728             '("b" "dwim" magit-branch-or-checkout))
   5729 
   5730 
   5731 File: magit.info,  Node: Branch Git Variables,  Next: Auxiliary Branch Commands,  Prev: Branch Commands,  Up: Branching
   5732 
   5733 6.6.3 Branch Git Variables
   5734 --------------------------
   5735 
   5736 These variables can be set from the transient prefix command
   5737 ‘magit-branch-configure’.  By default they can also be set from
   5738 ‘magit-branch’.  See *note Branch Commands::.
   5739 
   5740  -- Variable: branch.NAME.merge
   5741      Together with ‘branch.NAME.remote’ this variable defines the
   5742      upstream branch of the local branch named NAME.  The value of this
   5743      variable is the full reference of the upstream _branch_.
   5744 
   5745  -- Variable: branch.NAME.remote
   5746      Together with ‘branch.NAME.merge’ this variable defines the
   5747      upstream branch of the local branch named NAME.  The value of this
   5748      variable is the name of the upstream _remote_.
   5749 
   5750  -- Variable: branch.NAME.rebase
   5751      This variable controls whether pulling into the branch named NAME
   5752      is done by rebasing or by merging the fetched branch.
   5753 
   5754         • When ‘true’ then pulling is done by rebasing.
   5755         • When ‘false’ then pulling is done by merging.
   5756         • When undefined then the value of ‘pull.rebase’ is used.  The
   5757           default of that variable is ‘false’.
   5758 
   5759  -- Variable: branch.NAME.pushRemote
   5760      This variable specifies the remote that the branch named NAME is
   5761      usually pushed to.  The value has to be the name of an existing
   5762      remote.
   5763 
   5764      It is not possible to specify the name of _branch_ to push the
   5765      local branch to.  The name of the remote branch is always the same
   5766      as the name of the local branch.
   5767 
   5768      If this variable is undefined but ‘remote.pushDefault’ is defined,
   5769      then the value of the latter is used.  By default
   5770      ‘remote.pushDefault’ is undefined.
   5771 
   5772  -- Variable: branch.NAME.description
   5773      This variable can be used to describe the branch named NAME.  That
   5774      description is used, e.g., when turning the branch into a series of
   5775      patches.
   5776 
   5777    The following variables specify defaults which are used if the above
   5778 branch-specific variables are not set.
   5779 
   5780  -- Variable: pull.rebase
   5781      This variable specifies whether pulling is done by rebasing or by
   5782      merging.  It can be overwritten using ‘branch.NAME.rebase’.
   5783 
   5784         • When ‘true’ then pulling is done by rebasing.
   5785         • When ‘false’ (the default) then pulling is done by merging.
   5786 
   5787      Since it is never a good idea to merge the upstream branch into a
   5788      feature or hotfix branch and most branches are such branches, you
   5789      should consider setting this to ‘true’, and ‘branch.master.rebase’
   5790      to ‘false’.
   5791 
   5792  -- Variable: remote.pushDefault
   5793      This variable specifies what remote the local branches are usually
   5794      pushed to.  This can be overwritten per branch using
   5795      ‘branch.NAME.pushRemote’.
   5796 
   5797    The following variables are used during the creation of a branch and
   5798 control whether the various branch-specific variables are automatically
   5799 set at this time.
   5800 
   5801  -- Variable: branch.autoSetupMerge
   5802      This variable specifies under what circumstances creating a branch
   5803      NAME should result in the variables ‘branch.NAME.merge’ and
   5804      ‘branch.NAME.remote’ being set according to the starting point used
   5805      to create the branch.  If the starting point isn’t a branch, then
   5806      these variables are never set.
   5807 
   5808         • When ‘always’ then the variables are set regardless of whether
   5809           the starting point is a local or a remote branch.
   5810         • When ‘true’ (the default) then the variables are set when the
   5811           starting point is a remote branch, but not when it is a local
   5812           branch.
   5813         • When ‘false’ then the variables are never set.
   5814 
   5815  -- Variable: branch.autoSetupRebase
   5816      This variable specifies whether creating a branch NAME should
   5817      result in the variable ‘branch.NAME.rebase’ being set to ‘true’.
   5818 
   5819         • When ‘always’ then the variable is set regardless of whether
   5820           the starting point is a local or a remote branch.
   5821         • When ‘local’ then the variable are set when the starting point
   5822           is a local branch, but not when it is a remote branch.
   5823         • When ‘remote’ then the variable are set when the starting
   5824           point is a remote branch, but not when it is a local branch.
   5825         • When ‘never’ (the default) then the variable is never set.
   5826 
   5827    Note that the respective commands always change the repository-local
   5828 values.  If you want to change the global value, which is used when the
   5829 local value is undefined, then you have to do so on the command line,
   5830 e.g.:
   5831 
   5832      git config --global remote.autoSetupMerge always
   5833 
   5834    For more information about these variables you should also see
   5835 
   5836    *note (gitman)git-config::.  Also see *note (gitman)git-branch::.  ,
   5837 *note (gitman)git-checkout::.  and *note Pushing::.
   5838 
   5839  -- User Option: magit-prefer-remote-upstream
   5840      This option controls whether commands that read a branch from the
   5841      user and then set it as the upstream branch, offer a local or a
   5842      remote branch as default completion candidate, when they have the
   5843      choice.
   5844 
   5845      This affects all commands that use ‘magit-read-upstream-branch’ or
   5846      ‘magit-read-starting-point’, which includes all commands that
   5847      change the upstream and many which create new branches.
   5848 
   5849 
   5850 File: magit.info,  Node: Auxiliary Branch Commands,  Prev: Branch Git Variables,  Up: Branching
   5851 
   5852 6.6.4 Auxiliary Branch Commands
   5853 -------------------------------
   5854 
   5855 These commands are not available from the transient ‘magit-branch’ by
   5856 default.
   5857 
   5858  -- Command: magit-branch-shelve
   5859      This command shelves a branch.  This is done by deleting the
   5860      branch, and creating a new reference "refs/shelved/BRANCH-NAME"
   5861      pointing at the same commit as the branch pointed at.  If the
   5862      deleted branch had a reflog, then that is preserved as the reflog
   5863      of the new reference.
   5864 
   5865      This is useful if you want to move a branch out of sight, but are
   5866      not ready to completely discard it yet.
   5867 
   5868  -- Command: magit-branch-unshelve
   5869      This command unshelves a branch that was previously shelved using
   5870      ‘magit-branch-shelve’.  This is done by deleting the reference
   5871      "refs/shelved/BRANCH-NAME" and creating a branch "BRANCH-NAME"
   5872      pointing at the same commit as the deleted reference pointed at.
   5873      If the deleted reference had a reflog, then that is restored as the
   5874      reflog of the branch.
   5875 
   5876 
   5877 File: magit.info,  Node: Merging,  Next: Resolving Conflicts,  Prev: Branching,  Up: Manipulating
   5878 
   5879 6.7 Merging
   5880 ===========
   5881 
   5882 Also see *note (gitman)git-merge::.  For information on how to resolve
   5883 merge conflicts see the next section.
   5884 
   5885 ‘m’ (‘magit-merge’)
   5886      This transient prefix command binds the following suffix commands
   5887      along with the appropriate infix arguments and displays them in a
   5888      temporary buffer until a suffix is invoked.
   5889 
   5890    When no merge is in progress, then the transient features the
   5891 following suffix commands.
   5892 
   5893 ‘m m’ (‘magit-merge-plain’)
   5894      This command merges another branch or an arbitrary revision into
   5895      the current branch.  The branch or revision to be merged is read in
   5896      the minibuffer and defaults to the branch at point.
   5897 
   5898      Unless there are conflicts or a prefix argument is used, then the
   5899      resulting merge commit uses a generic commit message, and the user
   5900      does not get a chance to inspect or change it before the commit is
   5901      created.  With a prefix argument this does not actually create the
   5902      merge commit, which makes it possible to inspect how conflicts were
   5903      resolved and to adjust the commit message.
   5904 
   5905 ‘m e’ (‘magit-merge-editmsg’)
   5906      This command merges another branch or an arbitrary revision into
   5907      the current branch and opens a commit message buffer, so that the
   5908      user can make adjustments.  The commit is not actually created
   5909      until the user finishes with ‘C-c C-c’.
   5910 
   5911 ‘m n’ (‘magit-merge-nocommit’)
   5912      This command merges another branch or an arbitrary revision into
   5913      the current branch, but does not actually create the merge commit.
   5914      The user can then further adjust the merge, even when automatic
   5915      conflict resolution succeeded and/or adjust the commit message.
   5916 
   5917 ‘m a’ (‘magit-merge-absorb’)
   5918      This command merges another local branch into the current branch
   5919      and then removes the former.
   5920 
   5921      Before the source branch is merged, it is first force pushed to its
   5922      push-remote, provided the respective remote branch already exists.
   5923      This ensures that the respective pull-request (if any) won’t get
   5924      stuck on some obsolete version of the commits that are being
   5925      merged.  Finally, if ‘magit-branch-pull-request’ was used to create
   5926      the merged branch, then the respective remote branch is also
   5927      removed.
   5928 
   5929 ‘m i’ (‘magit-merge-into’)
   5930      This command merges the current branch into another local branch
   5931      and then removes the former.  The latter becomes the new current
   5932      branch.
   5933 
   5934      Before the source branch is merged, it is first force pushed to its
   5935      push-remote, provided the respective remote branch already exists.
   5936      This ensures that the respective pull-request (if any) won’t get
   5937      stuck on some obsolete version of the commits that are being
   5938      merged.  Finally, if ‘magit-branch-pull-request’ was used to create
   5939      the merged branch, then the respective remote branch is also
   5940      removed.
   5941 
   5942 ‘m s’ (‘magit-merge-squash’)
   5943      This command squashes the changes introduced by another branch or
   5944      an arbitrary revision into the current branch.  This only applies
   5945      the changes made by the squashed commits.  No information is
   5946      preserved that would allow creating an actual merge commit.
   5947      Instead of this command you should probably use a command from the
   5948      apply transient.
   5949 
   5950 ‘m p’ (‘magit-merge-preview’)
   5951      This command shows a preview of merging another branch or an
   5952      arbitrary revision into the current branch.
   5953 
   5954      Note that commands, that normally change how a diff is displayed,
   5955      do not work in buffers created by this command, because the
   5956      underlying Git command does not support diff arguments.
   5957 
   5958    When a merge is in progress, then the transient instead features the
   5959 following suffix commands.
   5960 
   5961 ‘m m’ (‘magit-merge’)
   5962      After the user resolved conflicts, this command proceeds with the
   5963      merge.  If some conflicts weren’t resolved, then this command
   5964      fails.
   5965 
   5966 ‘m a’ (‘magit-merge-abort’)
   5967      This command aborts the current merge operation.
   5968 
   5969 
   5970 File: magit.info,  Node: Resolving Conflicts,  Next: Rebasing,  Prev: Merging,  Up: Manipulating
   5971 
   5972 6.8 Resolving Conflicts
   5973 =======================
   5974 
   5975 When merging branches (or otherwise combining or changing history)
   5976 conflicts can occur.  If you edited two completely different parts of
   5977 the same file in two branches and then merge one of these branches into
   5978 the other, then Git can resolve that on its own, but if you edit the
   5979 same area of a file, then a human is required to decide how the two
   5980 versions, or "sides of the conflict", are to be combined into one.
   5981 
   5982    Here we can only provide a brief introduction to the subject and
   5983 point you toward some tools that can help.  If you are new to this, then
   5984 please also consult Git’s own documentation as well as other resources.
   5985 
   5986    If a file has conflicts and Git cannot resolve them by itself, then
   5987 it puts both versions into the affected file along with special markers
   5988 whose purpose is to denote the boundaries of the unresolved part of the
   5989 file and between the different versions.  These boundary lines begin
   5990 with the strings consisting of seven times the same character, one of
   5991 ‘<’, ‘|’, ‘=’ and ‘>’, and are followed by information about the source
   5992 of the respective versions, e.g.:
   5993 
   5994      <<<<<<< HEAD
   5995      Take the blue pill.
   5996      =======
   5997      Take the red pill.
   5998      >>>>>>> feature
   5999 
   6000    In this case you have chosen to take the red pill on one branch and
   6001 on another you picked the blue pill.  Now that you are merging these two
   6002 diverging branches, Git cannot possibly know which pill you want to
   6003 take.
   6004 
   6005    To resolve that conflict you have to create a version of the affected
   6006 area of the file by keeping only one of the sides, possibly by editing
   6007 it in order to bring in the changes from the other side, remove the
   6008 other versions as well as the markers, and then stage the result.  A
   6009 possible resolution might be:
   6010 
   6011      Take both pills.
   6012 
   6013    Often it is useful to see not only the two sides of the conflict but
   6014 also the "original" version from before the same area of the file was
   6015 modified twice on different branches.  Instruct Git to insert that
   6016 version as well by running this command once:
   6017 
   6018      git config --global merge.conflictStyle diff3
   6019 
   6020    The above conflict might then have looked like this:
   6021 
   6022      <<<<<<< HEAD
   6023      Take the blue pill.
   6024      ||||||| merged common ancestors
   6025      Take either the blue or the red pill, but not both.
   6026      =======
   6027      Take the red pill.
   6028      >>>>>>> feature
   6029 
   6030    If that were the case, then the above conflict resolution would not
   6031 have been correct, which demonstrates why seeing the original version
   6032 alongside the conflicting versions can be useful.
   6033 
   6034    You can perform the conflict resolution completely by hand, but Emacs
   6035 also provides some packages that help in the process: Smerge, Ediff
   6036 (*note (ediff)Top::), and Emerge (*note (emacs)Emerge::).  Magit does
   6037 not provide its own tools for conflict resolution, but it does make
   6038 using Smerge and Ediff more convenient.  (Ediff supersedes Emerge, so
   6039 you probably don’t want to use the latter anyway.)
   6040 
   6041    In the Magit status buffer, files with unresolved conflicts are
   6042 listed in the "Unstaged changes" and/or "Staged changes" sections.  They
   6043 are prefixed with the word "unmerged", which in this context essentially
   6044 is a synonym for "unresolved".
   6045 
   6046    Pressing ‘RET’ while point is on such a file section shows a buffer
   6047 visiting that file, turns on ‘smerge-mode’ in that buffer, and places
   6048 point inside the first area with conflicts.  You should then resolve
   6049 that conflict using regular edit commands and/or Smerge commands.
   6050 
   6051    Unfortunately Smerge does not have a manual, but you can get a list
   6052 of commands and binding ‘C-c ^ C-h’ and press ‘RET’ while point is on a
   6053 command name to read its documentation.
   6054 
   6055    Normally you would edit one version and then tell Smerge to keep only
   6056 that version.  Use ‘C-c ^ m’ (‘smerge-keep-mine’) to keep the ‘HEAD’
   6057 version or ‘C-c ^ o’ (‘smerge-keep-other’) to keep the version that
   6058 follows "|||||||".  Then use ‘C-c ^ n’ to move to the next conflicting
   6059 area in the same file.  Once you are done resolving conflicts, return to
   6060 the Magit status buffer.  The file should now be shown as "modified", no
   6061 longer as "unmerged", because Smerge automatically stages the file when
   6062 you save the buffer after resolving the last conflict.
   6063 
   6064    Magit now wraps the mentioned Smerge commands, allowing you to use
   6065 these key bindings without having to go to the file-visiting buffer.
   6066 Additionally ‘k’ (‘magit-discard’) on a hunk with unresolved conflicts
   6067 asks which side to keep or, if point is on a side, then it keeps it
   6068 without prompting.  Similarly ‘k’ on a unresolved file ask which side to
   6069 keep.
   6070 
   6071    Alternatively you could use Ediff, which uses separate buffers for
   6072 the different versions of the file.  To resolve conflicts in a file
   6073 using Ediff press ‘e’ while point is on such a file in the status
   6074 buffer.
   6075 
   6076    Ediff can be used for other purposes as well.  For more information
   6077 on how to enter Ediff from Magit, see *note Ediffing::.  Explaining how
   6078 to use Ediff is beyond the scope of this manual, instead see *note
   6079 (ediff)Top::.
   6080 
   6081    If you are unsure whether you should Smerge or Ediff, then use the
   6082 former.  It is much easier to understand and use, and except for truly
   6083 complex conflicts, the latter is usually overkill.
   6084 
   6085 
   6086 File: magit.info,  Node: Rebasing,  Next: Cherry Picking,  Prev: Resolving Conflicts,  Up: Manipulating
   6087 
   6088 6.9 Rebasing
   6089 ============
   6090 
   6091 Also see *note (gitman)git-rebase::.  For information on how to resolve
   6092 conflicts that occur during rebases see the preceding section.
   6093 
   6094 ‘r’ (‘magit-rebase’)
   6095      This transient prefix command binds the following suffix commands
   6096      along with the appropriate infix arguments and displays them in a
   6097      temporary buffer until a suffix is invoked.
   6098 
   6099    When no rebase is in progress, then the transient features the
   6100 following suffix commands.
   6101 
   6102    Using one of these commands _starts_ a rebase sequence.  Git might
   6103 then stop somewhere along the way, either because you told it to do so,
   6104 or because applying a commit failed due to a conflict.  When that
   6105 happens, then the status buffer shows information about the rebase
   6106 sequence which is in progress in a section similar to a log section.
   6107 See *note Information About In-Progress Rebase::.
   6108 
   6109    For information about the upstream and the push-remote, see *note The
   6110 Two Remotes::.
   6111 
   6112 ‘r p’ (‘magit-rebase-onto-pushremote’)
   6113      This command rebases the current branch onto its push-remote.
   6114 
   6115      With a prefix argument or when the push-remote is either not
   6116      configured or unusable, then let the user first configure the
   6117      push-remote.
   6118 
   6119 ‘r u’ (‘magit-rebase-onto-upstream’)
   6120      This command rebases the current branch onto its upstream branch.
   6121 
   6122      With a prefix argument or when the upstream is either not
   6123      configured or unusable, then let the user first configure the
   6124      upstream.
   6125 
   6126 ‘r e’ (‘magit-rebase-branch’)
   6127      This command rebases the current branch onto a branch read in the
   6128      minibuffer.  All commits that are reachable from head but not from
   6129      the selected branch TARGET are being rebased.
   6130 
   6131 ‘r s’ (‘magit-rebase-subset’)
   6132      This command starts a non-interactive rebase sequence to transfer
   6133      commits from START to ‘HEAD’ onto NEWBASE.  START has to be
   6134      selected from a list of recent commits.
   6135 
   6136    By default Magit uses the ‘--autostash’ argument, which causes
   6137 uncommitted changes to be stored in a stash before the rebase begins.
   6138 These changes are restored after the rebase completes and if possible
   6139 the stash is removed.  If the stash does not apply cleanly, then the
   6140 stash is not removed.  In case something goes wrong when resolving the
   6141 conflicts, this allows you to start over.
   6142 
   6143    Even though one of the actions is dedicated to interactive rebases,
   6144 the transient also features the infix argument ‘--interactive’.  This
   6145 can be used to turn one of the other, non-interactive rebase variants
   6146 into an interactive rebase.
   6147 
   6148    For example if you want to clean up a feature branch and at the same
   6149 time rebase it onto ‘master’, then you could use ‘r-iu’.  But we
   6150 recommend that you instead do that in two steps.  First use ‘ri’ to
   6151 cleanup the feature branch, and then in a second step ‘ru’ to rebase it
   6152 onto ‘master’.  That way if things turn out to be more complicated than
   6153 you thought and/or you make a mistake and have to start over, then you
   6154 only have to redo half the work.
   6155 
   6156    Explicitly enabling ‘--interactive’ won’t have an effect on the
   6157 following commands as they always use that argument anyway, even if it
   6158 is not enabled in the transient.
   6159 
   6160 ‘r i’ (‘magit-rebase-interactive’)
   6161      This command starts an interactive rebase sequence.
   6162 
   6163 ‘r f’ (‘magit-rebase-autosquash’)
   6164      This command combines squash and fixup commits with their intended
   6165      targets.
   6166 
   6167 ‘r m’ (‘magit-rebase-edit-commit’)
   6168      This command starts an interactive rebase sequence that lets the
   6169      user edit a single older commit.
   6170 
   6171 ‘r w’ (‘magit-rebase-reword-commit’)
   6172      This command starts an interactive rebase sequence that lets the
   6173      user reword a single older commit.
   6174 
   6175 ‘r k’ (‘magit-rebase-remove-commit’)
   6176      This command removes a single older commit using rebase.
   6177 
   6178    When a rebase is in progress, then the transient instead features the
   6179 following suffix commands.
   6180 
   6181 ‘r r’ (‘magit-rebase-continue’)
   6182      This command restart the current rebasing operation.
   6183 
   6184      In some cases this pops up a commit message buffer for you do edit.
   6185      With a prefix argument the old message is reused as-is.
   6186 
   6187 ‘r s’ (‘magit-rebase-skip’)
   6188      This command skips the current commit and restarts the current
   6189      rebase operation.
   6190 
   6191 ‘r e’ (‘magit-rebase-edit’)
   6192      This command lets the user edit the todo list of the current rebase
   6193      operation.
   6194 
   6195 ‘r a’ (‘magit-rebase-abort’)
   6196      This command aborts the current rebase operation, restoring the
   6197      original branch.
   6198 
   6199 * Menu:
   6200 
   6201 * Editing Rebase Sequences::
   6202 * Information About In-Progress Rebase::
   6203 
   6204 
   6205 File: magit.info,  Node: Editing Rebase Sequences,  Next: Information About In-Progress Rebase,  Up: Rebasing
   6206 
   6207 6.9.1 Editing Rebase Sequences
   6208 ------------------------------
   6209 
   6210 ‘C-c C-c’ (‘with-editor-finish’)
   6211      Finish the current editing session by returning with exit code 0.
   6212      Git then uses the rebase instructions it finds in the file.
   6213 
   6214 ‘C-c C-k’ (‘with-editor-cancel’)
   6215      Cancel the current editing session by returning with exit code 1.
   6216      Git then forgoes starting the rebase sequence.
   6217 
   6218 ‘<RET>’ (‘git-rebase-show-commit’)
   6219      Show the commit on the current line in another buffer and select
   6220      that buffer.
   6221 
   6222 ‘<SPC>’ (‘git-rebase-show-or-scroll-up’)
   6223      Show the commit on the current line in another buffer without
   6224      selecting that buffer.  If the revision buffer is already visible
   6225      in another window of the current frame, then instead scroll that
   6226      window up.
   6227 
   6228 ‘<DEL>’ (‘git-rebase-show-or-scroll-down’)
   6229      Show the commit on the current line in another buffer without
   6230      selecting that buffer.  If the revision buffer is already visible
   6231      in another window of the current frame, then instead scroll that
   6232      window down.
   6233 
   6234 ‘p’ (‘git-rebase-backward-line’)
   6235      Move to previous line.
   6236 
   6237 ‘n’ (‘forward-line’)
   6238      Move to next line.
   6239 
   6240 ‘M-p’ (‘git-rebase-move-line-up’)
   6241      Move the current commit (or command) up.
   6242 
   6243 ‘M-n’ (‘git-rebase-move-line-down’)
   6244      Move the current commit (or command) down.
   6245 
   6246 ‘r’ (‘git-rebase-reword’)
   6247      Edit message of commit on current line.
   6248 
   6249 ‘e’ (‘git-rebase-edit’)
   6250      Stop at the commit on the current line.
   6251 
   6252 ‘s’ (‘git-rebase-squash’)
   6253      Meld commit on current line into previous commit, and edit message.
   6254 
   6255 ‘f’ (‘git-rebase-fixup’)
   6256      Meld commit on current line into previous commit, discarding the
   6257      current commit’s message.
   6258 
   6259 ‘k’ (‘git-rebase-kill-line’)
   6260      Kill the current action line.
   6261 
   6262 ‘c’ (‘git-rebase-pick’)
   6263      Use commit on current line.
   6264 
   6265 ‘x’ (‘git-rebase-exec’)
   6266      Insert a shell command to be run after the proceeding commit.
   6267 
   6268      If there already is such a command on the current line, then edit
   6269      that instead.  With a prefix argument insert a new command even
   6270      when there already is one on the current line.  With empty input
   6271      remove the command on the current line, if any.
   6272 
   6273 ‘b’ (‘git-rebase-break’)
   6274      Insert a break action before the current line, instructing Git to
   6275      return control to the user.
   6276 
   6277 ‘y’ (‘git-rebase-insert’)
   6278      Read an arbitrary commit and insert it below current line.
   6279 
   6280 ‘C-x u’ (‘git-rebase-undo’)
   6281      Undo some previous changes.  Like ‘undo’ but works in read-only
   6282      buffers.
   6283 
   6284  -- User Option: git-rebase-auto-advance
   6285      Whether to move to next line after changing a line.
   6286 
   6287  -- User Option: git-rebase-show-instructions
   6288      Whether to show usage instructions inside the rebase buffer.
   6289 
   6290  -- User Option: git-rebase-confirm-cancel
   6291      Whether confirmation is required to cancel.
   6292 
   6293    When a rebase is performed with the ‘--rebase-merges’ option, the
   6294 sequence will include a few other types of actions and the following
   6295 commands become relevant.
   6296 
   6297 ‘l’ (‘git-rebase-label’)
   6298      This commands inserts a label action or edits the one at point.
   6299 
   6300 ‘t’ (‘git-rebase-reset’)
   6301      This command inserts a reset action or edits the one at point.  The
   6302      prompt will offer the labels that are currently present in the
   6303      buffer.
   6304 
   6305 ‘MM’ (‘git-rebase-merge’)
   6306      The command inserts a merge action or edits the one at point.  The
   6307      prompt will offer the labels that are currently present in the
   6308      buffer.  Specifying a message to reuse via ‘-c’ or ‘-C’ is not
   6309      supported; an editor will always be invoked for the merge.
   6310 
   6311 ‘Mt’ (‘git-rebase-merge-toggle-editmsg’)
   6312      This command toggles between the ‘-C’ and ‘-c’ options of the merge
   6313      action at point.  These options both specify a commit whose message
   6314      should be reused.  The lower-case variant instructs Git to invoke
   6315      the editor when creating the merge, allowing the user to edit the
   6316      message.
   6317 
   6318 
   6319 File: magit.info,  Node: Information About In-Progress Rebase,  Prev: Editing Rebase Sequences,  Up: Rebasing
   6320 
   6321 6.9.2 Information About In-Progress Rebase
   6322 ------------------------------------------
   6323 
   6324 While a rebase sequence is in progress, the status buffer features a
   6325 section that lists the commits that have already been applied as well as
   6326 the commits that still have to be applied.
   6327 
   6328    The commits are split in two halves.  When rebase stops at a commit,
   6329 either because the user has to deal with a conflict or because s/he
   6330 explicitly requested that rebase stops at that commit, then point is
   6331 placed on the commit that separates the two groups, i.e., on ‘HEAD’.
   6332 The commits above it have not been applied yet, while the ‘HEAD’ and the
   6333 commits below it have already been applied.  In between these two groups
   6334 of applied and yet-to-be applied commits, there sometimes is a commit
   6335 which has been dropped.
   6336 
   6337    Each commit is prefixed with a word and these words are additionally
   6338 shown in different colors to indicate the status of the commits.
   6339 
   6340    The following colors are used:
   6341 
   6342    • Commits that use the same foreground color as the ‘default’ face
   6343      have not been applied yet.
   6344 
   6345    • Yellow commits have some special relationship to the commit rebase
   6346      stopped at.  This is used for the words "join", "goal", "same" and
   6347      "work" (see below).
   6348 
   6349    • Gray commits have already been applied.
   6350 
   6351    • The blue commit is the ‘HEAD’ commit.
   6352 
   6353    • The green commit is the commit the rebase sequence stopped at.  If
   6354      this is the same commit as ‘HEAD’ (e.g., because you haven’t done
   6355      anything yet after rebase stopped at the commit, then this commit
   6356      is shown in blue, not green).  There can only be a green *and* a
   6357      blue commit at the same time, if you create one or more new commits
   6358      after rebase stops at a commit.
   6359 
   6360    • Red commits have been dropped.  They are shown for reference only,
   6361      e.g., to make it easier to diff.
   6362 
   6363    Of course these colors are subject to the color-theme in use.
   6364 
   6365    The following words are used:
   6366 
   6367    • Commits prefixed with ‘pick’, ‘reword’, ‘edit’, ‘squash’, and
   6368      ‘fixup’ have not been applied yet.  These words have the same
   6369      meaning here as they do in the buffer used to edit the rebase
   6370      sequence.  See *note Editing Rebase Sequences::.  When the
   6371      ‘--rebase-merges’ option was specified, ‘reset’, ‘label’, and
   6372      ‘merge’ lines may also be present.
   6373 
   6374    • Commits prefixed with ‘done’ and ‘onto’ have already been applied.
   6375      It is possible for such a commit to be the ‘HEAD’, in which case it
   6376      is blue.  Otherwise it is grey.
   6377 
   6378         • The commit prefixed with ‘onto’ is the commit on top of which
   6379           all the other commits are being re-applied.  This commit
   6380           itself did not have to be re-applied, it is the commit rebase
   6381           did rewind to before starting to re-apply other commits.
   6382 
   6383         • Commits prefixed with ‘done’ have already been re-applied.
   6384           This includes commits that have been re-applied but also new
   6385           commits that you have created during the rebase.
   6386 
   6387    • All other commits, those not prefixed with any of the above words,
   6388      are in some way related to the commit at which rebase stopped.
   6389 
   6390      To determine whether a commit is related to the stopped-at commit
   6391      their hashes, trees and patch-ids (1) are being compared.  The
   6392      commit message is not used for this purpose.
   6393 
   6394      Generally speaking commits that are related to the stopped-at
   6395      commit can have any of the used colors, though not all color/word
   6396      combinations are possible.
   6397 
   6398      Words used for stopped-at commits are:
   6399 
   6400         • When a commit is prefixed with ‘void’, then that indicates
   6401           that Magit knows for sure that all the changes in that commit
   6402           have been applied using several new commits.  This commit is
   6403           no longer reachable from ‘HEAD’, and it also isn’t one of the
   6404           commits that will be applied when resuming the session.
   6405 
   6406         • When a commit is prefixed with ‘join’, then that indicates
   6407           that the rebase sequence stopped at that commit due to a
   6408           conflict - you now have to join (merge) the changes with what
   6409           has already been applied.  In a sense this is the commit
   6410           rebase stopped at, but while its effect is already in the
   6411           index and in the worktree (with conflict markers), the commit
   6412           itself has not actually been applied yet (it isn’t the
   6413           ‘HEAD’).  So it is shown in yellow, like the other commits
   6414           that still have to be applied.
   6415 
   6416         • When a commit is prefixed with ‘stop’ or a _blue_ or _green_
   6417           ‘same’, then that indicates that rebase stopped at this
   6418           commit, that it is still applied or has been applied again,
   6419           and that at least its patch-id is unchanged.
   6420 
   6421              • When a commit is prefixed with ‘stop’, then that
   6422                indicates that rebase stopped at that commit because you
   6423                requested that earlier, and its patch-id is unchanged.
   6424                It might even still be the exact same commit.
   6425 
   6426              • When a commit is prefixed with a _blue_ or _green_
   6427                ‘same’, then that indicates that while its tree or hash
   6428                changed, its patch-id did not.  If it is blue, then it is
   6429                the ‘HEAD’ commit (as always for blue).  When it is
   6430                green, then it no longer is ‘HEAD’ because other commit
   6431                have been created since (but before continuing the
   6432                rebase).
   6433 
   6434         • When a commit is prefixed with ‘goal’, a _yellow_ ‘same,’ or
   6435           ‘work’, then that indicates that rebase applied that commit
   6436           but that you then reset ‘HEAD’ to an earlier commit (likely to
   6437           split it up into multiple commits), and that there are some
   6438           uncommitted changes remaining which likely (but not
   6439           necessarily) originate from that commit.
   6440 
   6441              • When a commit is prefixed with ‘goal’, then that
   6442                indicates that it is still possible to create a new
   6443                commit with the exact same tree (the "goal") without
   6444                manually editing any files, by committing the index, or
   6445                by staging all changes and then committing that.  This is
   6446                the case when the original tree still exists in the index
   6447                or worktree in untainted form.
   6448 
   6449              • When a commit is prefixed with a yellow ‘same’, then that
   6450                indicates that it is no longer possible to create a
   6451                commit with the exact same tree, but that it is still
   6452                possible to create a commit with the same patch-id.  This
   6453                would be the case if you created a new commit with other
   6454                changes, but the changes from the original commit still
   6455                exist in the index or working tree in untainted form.
   6456 
   6457              • When a commit is prefixed with ‘work’, then that
   6458                indicates that you reset ‘HEAD’ to an earlier commit, and
   6459                that there are some staged and/or unstaged changes
   6460                (likely, but not necessarily) originating from that
   6461                commit.  However it is no longer possible to create a new
   6462                commit with the same tree or at least the same patch-id
   6463                because you have already made other changes.
   6464 
   6465         • When a commit is prefixed with ‘poof’ or ‘gone’, then that
   6466           indicates that rebase applied that commit but that you then
   6467           reset ‘HEAD’ to an earlier commit (likely to split it up into
   6468           multiple commits), and that there are no uncommitted changes.
   6469 
   6470              • When a commit is prefixed with ‘poof’, then that
   6471                indicates that it is no longer reachable from ‘HEAD’, but
   6472                that it has been replaced with one or more commits, which
   6473                together have the exact same effect.
   6474 
   6475              • When a commit is prefixed with ‘gone’, then that
   6476                indicates that it is no longer reachable from ‘HEAD’ and
   6477                that we also cannot determine whether its changes are
   6478                still in effect in one or more new commits.  They might
   6479                be, but if so, then there must also be other changes
   6480                which makes it impossible to know for sure.
   6481 
   6482    Do not worry if you do not fully understand the above.  That’s okay,
   6483 you will acquire a good enough understanding through practice.
   6484 
   6485    For other sequence operations such as cherry-picking, a similar
   6486 section is displayed, but they lack some of the features described
   6487 above, due to limitations in the git commands used to implement them.
   6488 Most importantly these sequences only support "picking" a commit but not
   6489 other actions such as "rewording", and they do not keep track of the
   6490 commits which have already been applied.
   6491 
   6492    ---------- Footnotes ----------
   6493 
   6494    (1) The patch-id is a hash of the _changes_ introduced by a commit.
   6495 It differs from the hash of the commit itself, which is a hash of the
   6496 result of applying that change (i.e., the resulting trees and blobs) as
   6497 well as author and committer information, the commit message, and the
   6498 hashes of the parents of the commit.  The patch-id hash on the other
   6499 hand is created only from the added and removed lines, even line numbers
   6500 and whitespace changes are ignored when calculating this hash.  The
   6501 patch-ids of two commits can be used to answer the question "Do these
   6502 commits make the same change?".
   6503 
   6504 
   6505 File: magit.info,  Node: Cherry Picking,  Next: Resetting,  Prev: Rebasing,  Up: Manipulating
   6506 
   6507 6.10 Cherry Picking
   6508 ===================
   6509 
   6510 Also see *note (gitman)git-cherry-pick::.
   6511 
   6512 ‘A’ (‘magit-cherry-pick’)
   6513      This transient prefix command binds the following suffix commands
   6514      along with the appropriate infix arguments and displays them in a
   6515      temporary buffer until a suffix is invoked.
   6516 
   6517    When no cherry-pick or revert is in progress, then the transient
   6518 features the following suffix commands.
   6519 
   6520 ‘A A’ (‘magit-cherry-copy’)
   6521      This command copies COMMITS from another branch onto the current
   6522      branch.  If the region selects multiple commits, then those are
   6523      copied, without prompting.  Otherwise the user is prompted for a
   6524      commit or range, defaulting to the commit at point.
   6525 
   6526 ‘A a’ (‘magit-cherry-apply’)
   6527      This command applies the changes in COMMITS from another branch
   6528      onto the current branch.  If the region selects multiple commits,
   6529      then those are used, without prompting.  Otherwise the user is
   6530      prompted for a commit or range, defaulting to the commit at point.
   6531 
   6532      This command also has a top-level binding, which can be invoked
   6533      without using the transient by typing ‘a’ at the top-level.
   6534 
   6535    The following commands not only apply some commits to some branch,
   6536 but also remove them from some other branch.  The removal is performed
   6537 using either ‘git-update-ref’ or if necessary ‘git-rebase’.  Both
   6538 applying commits as well as removing them using ‘git-rebase’ can lead to
   6539 conflicts.  If that happens, then these commands abort and you not only
   6540 have to resolve the conflicts but also finish the process the same way
   6541 you would have to if these commands didn’t exist at all.
   6542 
   6543 ‘A h’ (‘magit-cherry-harvest’)
   6544      This command moves the selected COMMITS that must be located on
   6545      another BRANCH onto the current branch instead, removing them from
   6546      the former.  When this command succeeds, then the same branch is
   6547      current as before.
   6548 
   6549      Applying the commits on the current branch or removing them from
   6550      the other branch can lead to conflicts.  When that happens, then
   6551      this command stops and you have to resolve the conflicts and then
   6552      finish the process manually.
   6553 
   6554 ‘A d’ (‘magit-cherry-donate’)
   6555      This command moves the selected COMMITS from the current branch
   6556      onto another existing BRANCH, removing them from the former.  When
   6557      this command succeeds, then the same branch is current as before.
   6558      ‘HEAD’ is allowed to be detached initially.
   6559 
   6560      Applying the commits on the other branch or removing them from the
   6561      current branch can lead to conflicts.  When that happens, then this
   6562      command stops and you have to resolve the conflicts and then finish
   6563      the process manually.
   6564 
   6565 ‘A n’ (‘magit-cherry-spinout’)
   6566      This command moves the selected COMMITS from the current branch
   6567      onto a new branch BRANCH, removing them from the former.  When this
   6568      command succeeds, then the same branch is current as before.
   6569 
   6570      Applying the commits on the other branch or removing them from the
   6571      current branch can lead to conflicts.  When that happens, then this
   6572      command stops and you have to resolve the conflicts and then finish
   6573      the process manually.
   6574 
   6575 ‘A s’ (‘magit-cherry-spinoff’)
   6576      This command moves the selected COMMITS from the current branch
   6577      onto a new branch BRANCH, removing them from the former.  When this
   6578      command succeeds, then the new branch is checked out.
   6579 
   6580      Applying the commits on the other branch or removing them from the
   6581      current branch can lead to conflicts.  When that happens, then this
   6582      command stops and you have to resolve the conflicts and then finish
   6583      the process manually.
   6584 
   6585    When a cherry-pick or revert is in progress, then the transient
   6586 instead features the following suffix commands.
   6587 
   6588 ‘A A’ (‘magit-sequence-continue’)
   6589      Resume the current cherry-pick or revert sequence.
   6590 
   6591 ‘A s’ (‘magit-sequence-skip’)
   6592      Skip the stopped at commit during a cherry-pick or revert sequence.
   6593 
   6594 ‘A a’ (‘magit-sequence-abort’)
   6595      Abort the current cherry-pick or revert sequence.  This discards
   6596      all changes made since the sequence started.
   6597 
   6598 * Menu:
   6599 
   6600 * Reverting::
   6601 
   6602 
   6603 File: magit.info,  Node: Reverting,  Up: Cherry Picking
   6604 
   6605 6.10.1 Reverting
   6606 ----------------
   6607 
   6608 ‘V’ (‘magit-revert’)
   6609      This transient prefix command binds the following suffix commands
   6610      along with the appropriate infix arguments and displays them in a
   6611      temporary buffer until a suffix is invoked.
   6612 
   6613    When no cherry-pick or revert is in progress, then the transient
   6614 features the following suffix commands.
   6615 
   6616 ‘V V’ (‘magit-revert-and-commit’)
   6617      Revert a commit by creating a new commit.  Prompt for a commit,
   6618      defaulting to the commit at point.  If the region selects multiple
   6619      commits, then revert all of them, without prompting.
   6620 
   6621 ‘V v’ (‘magit-revert-no-commit’)
   6622      Revert a commit by applying it in reverse to the working tree.
   6623      Prompt for a commit, defaulting to the commit at point.  If the
   6624      region selects multiple commits, then revert all of them, without
   6625      prompting.
   6626 
   6627    When a cherry-pick or revert is in progress, then the transient
   6628 instead features the following suffix commands.
   6629 
   6630 ‘V V’ (‘magit-sequence-continue’)
   6631      Resume the current cherry-pick or revert sequence.
   6632 
   6633 ‘V s’ (‘magit-sequence-skip’)
   6634      Skip the stopped at commit during a cherry-pick or revert sequence.
   6635 
   6636 ‘V a’ (‘magit-sequence-abort’)
   6637      Abort the current cherry-pick or revert sequence.  This discards
   6638      all changes made since the sequence started.
   6639 
   6640 
   6641 File: magit.info,  Node: Resetting,  Next: Stashing,  Prev: Cherry Picking,  Up: Manipulating
   6642 
   6643 6.11 Resetting
   6644 ==============
   6645 
   6646 Also see *note (gitman)git-reset::.
   6647 
   6648 ‘x’ (‘magit-reset-quickly’)
   6649      Reset the ‘HEAD’ and index to some commit read from the user and
   6650      defaulting to the commit at point, and possibly also reset the
   6651      working tree.  With a prefix argument reset the working tree
   6652      otherwise don’t.
   6653 
   6654 ‘X m’ (‘magit-reset-mixed’)
   6655      Reset the ‘HEAD’ and index to some commit read from the user and
   6656      defaulting to the commit at point.  The working tree is kept as-is.
   6657 
   6658 ‘X s’ (‘magit-reset-soft’)
   6659      Reset the ‘HEAD’ to some commit read from the user and defaulting
   6660      to the commit at point.  The index and the working tree are kept
   6661      as-is.
   6662 
   6663 ‘X h’ (‘magit-reset-hard’)
   6664      Reset the ‘HEAD’, index, and working tree to some commit read from
   6665      the user and defaulting to the commit at point.
   6666 
   6667 ‘X k’ (‘magit-reset-keep’)
   6668      Reset the ‘HEAD’, index, and working tree to some commit read from
   6669      the user and defaulting to the commit at point.  Uncommitted
   6670      changes are kept as-is.
   6671 
   6672 ‘X i’ (‘magit-reset-index’)
   6673      Reset the index to some commit read from the user and defaulting to
   6674      the commit at point.  Keep the ‘HEAD’ and working tree as-is, so if
   6675      the commit refers to the ‘HEAD’, then this effectively unstages all
   6676      changes.
   6677 
   6678 ‘X w’ (‘magit-reset-worktree’)
   6679      Reset the working tree to some commit read from the user and
   6680      defaulting to the commit at point.  Keep the ‘HEAD’ and index
   6681      as-is.
   6682 
   6683 ‘X f’ (‘magit-file-checkout’)
   6684      Update file in the working tree and index to the contents from a
   6685      revision.  Both the revision and file are read from the user.
   6686 
   6687 
   6688 File: magit.info,  Node: Stashing,  Prev: Resetting,  Up: Manipulating
   6689 
   6690 6.12 Stashing
   6691 =============
   6692 
   6693 Also see *note (gitman)git-stash::.
   6694 
   6695 ‘z’ (‘magit-stash’)
   6696      This transient prefix command binds the following suffix commands
   6697      along with the appropriate infix arguments and displays them in a
   6698      temporary buffer until a suffix is invoked.
   6699 
   6700 ‘z z’ (‘magit-stash-both’)
   6701      Create a stash of the index and working tree.  Untracked files are
   6702      included according to infix arguments.  One prefix argument is
   6703      equivalent to ‘--include-untracked’ while two prefix arguments are
   6704      equivalent to ‘--all’.
   6705 
   6706 ‘z i’ (‘magit-stash-index’)
   6707      Create a stash of the index only.  Unstaged and untracked changes
   6708      are not stashed.
   6709 
   6710 ‘z w’ (‘magit-stash-worktree’)
   6711      Create a stash of unstaged changes in the working tree.  Untracked
   6712      files are included according to infix arguments.  One prefix
   6713      argument is equivalent to ‘--include-untracked’ while two prefix
   6714      arguments are equivalent to ‘--all’.
   6715 
   6716 ‘z x’ (‘magit-stash-keep-index’)
   6717      Create a stash of the index and working tree, keeping index intact.
   6718      Untracked files are included according to infix arguments.  One
   6719      prefix argument is equivalent to ‘--include-untracked’ while two
   6720      prefix arguments are equivalent to ‘--all’.
   6721 
   6722 ‘z Z’ (‘magit-snapshot-both’)
   6723      Create a snapshot of the index and working tree.  Untracked files
   6724      are included according to infix arguments.  One prefix argument is
   6725      equivalent to ‘--include-untracked’ while two prefix arguments are
   6726      equivalent to ‘--all’.
   6727 
   6728 ‘z I’ (‘magit-snapshot-index’)
   6729      Create a snapshot of the index only.  Unstaged and untracked
   6730      changes are not stashed.
   6731 
   6732 ‘z W’ (‘magit-snapshot-worktree’)
   6733      Create a snapshot of unstaged changes in the working tree.
   6734      Untracked files are included according to infix arguments.  One
   6735      prefix argument is equivalent to ‘--include-untracked’ while two
   6736      prefix arguments are equivalent to ‘--all’-.
   6737 
   6738 ‘z a’ (‘magit-stash-apply’)
   6739      Apply a stash to the working tree.
   6740 
   6741      First try ‘git stash apply --index’, which tries to preserve the
   6742      index stored in the stash, if any.  This may fail because applying
   6743      the stash could result in conflicts and those have to be stored in
   6744      the index, making it impossible to also store the stash’s index
   6745      there as well.
   6746 
   6747      If the above failed, then try ‘git stash apply’.  This fails (with
   6748      or without ‘--index’) if there are any uncommitted changes to files
   6749      that are also modified in the stash.
   6750 
   6751      If both of the above failed, then apply using ‘git apply’.  If
   6752      there are no conflicting files, use ‘--3way’.  If there are
   6753      conflicting files, then using ‘--3way’ requires that those files
   6754      are staged first, which may be undesirable, so prompt the user
   6755      whether to use ‘--3way’ or ‘--reject’.
   6756 
   6757      Customize ‘magit-no-confirm’ if you want to always use ‘--3way’,
   6758      without being prompted.
   6759 
   6760 ‘z p’ (‘magit-stash-pop’)
   6761      Apply a stash to the working tree.  On complete success (if the
   6762      stash can be applied without any conflicts, and while preserving
   6763      the stash’s index) then remove the stash from stash list.
   6764 
   6765      First try ‘git stash pop --index’, which tries to preserve the
   6766      index stored in the stash, if any.  This may fail because applying
   6767      the stash could result in conflicts and those have to be stored in
   6768      the index, making it impossible to also store the stash’s index
   6769      there as well.
   6770 
   6771      If the above failed, then try ‘git stash apply’.  This fails (with
   6772      or without ‘--index’) if there are any uncommitted changes to files
   6773      that are also modified in the stash.
   6774 
   6775      If both of the above failed, then apply using ‘git apply’.  If
   6776      there are no conflicting files, use ‘--3way’.  If there are
   6777      conflicting files, then using ‘--3way’ requires that those files
   6778      are staged first, which may be undesirable, so prompt the user
   6779      whether to use ‘--3way’ or ‘--reject’.
   6780 
   6781      Customize ‘magit-no-confirm’ if you want to always use ‘--3way’,
   6782      without being prompted.
   6783 
   6784 ‘z k’ (‘magit-stash-drop’)
   6785      Remove a stash from the stash list.  When the region is active,
   6786      offer to drop all contained stashes.
   6787 
   6788 ‘z v’ (‘magit-stash-show’)
   6789      Show all diffs of a stash in a buffer.
   6790 
   6791 ‘z b’ (‘magit-stash-branch’)
   6792      Create and checkout a new branch from an existing stash.  The new
   6793      branch starts at the commit that was current when the stash was
   6794      created.
   6795 
   6796 ‘z B’ (‘magit-stash-branch-here’)
   6797      Create and checkout a new branch from an existing stash.  Use the
   6798      current branch or ‘HEAD’ as the starting-point of the new branch.
   6799      Then apply the stash, dropping it if it applies cleanly.
   6800 
   6801 ‘z f’ (‘magit-stash-format-patch’)
   6802      Create a patch from STASH.
   6803 
   6804 ‘k’ (‘magit-stash-clear’)
   6805      Remove all stashes saved in REF’s reflog by deleting REF.
   6806 
   6807 ‘z l’ (‘magit-stash-list’)
   6808      List all stashes in a buffer.
   6809 
   6810  -- User Option: magit-stashes-margin
   6811      This option specifies whether the margin is initially shown in
   6812      stashes buffers and how it is formatted.
   6813 
   6814      The value has the form ‘(INIT STYLE WIDTH AUTHOR AUTHOR-WIDTH)’.
   6815 
   6816         • If INIT is non-nil, then the margin is shown initially.
   6817         • STYLE controls how to format the author or committer date.  It
   6818           can be one of ‘age’ (to show the age of the commit),
   6819           ‘age-abbreviated’ (to abbreviate the time unit to a
   6820           character), or a string (suitable for ‘format-time-string’) to
   6821           show the actual date.  Option
   6822           ‘magit-log-margin-show-committer-date’ controls which date is
   6823           being displayed.
   6824         • WIDTH controls the width of the margin.  This exists for
   6825           forward compatibility and currently the value should not be
   6826           changed.
   6827         • AUTHOR controls whether the name of the author is also shown
   6828           by default.
   6829         • AUTHOR-WIDTH has to be an integer.  When the name of the
   6830           author is shown, then this specifies how much space is used to
   6831           do so.
   6832 
   6833 
   6834 File: magit.info,  Node: Transferring,  Next: Miscellaneous,  Prev: Manipulating,  Up: Top
   6835 
   6836 7 Transferring
   6837 **************
   6838 
   6839 * Menu:
   6840 
   6841 * Remotes::
   6842 * Fetching::
   6843 * Pulling::
   6844 * Pushing::
   6845 * Plain Patches::
   6846 * Maildir Patches::
   6847 
   6848 
   6849 File: magit.info,  Node: Remotes,  Next: Fetching,  Up: Transferring
   6850 
   6851 7.1 Remotes
   6852 ===========
   6853 
   6854 * Menu:
   6855 
   6856 * Remote Commands::
   6857 * Remote Git Variables::
   6858 
   6859 
   6860 File: magit.info,  Node: Remote Commands,  Next: Remote Git Variables,  Up: Remotes
   6861 
   6862 7.1.1 Remote Commands
   6863 ---------------------
   6864 
   6865 The transient prefix command ‘magit-remote’ is used to add remotes and
   6866 to make changes to existing remotes.  This command only deals with
   6867 remotes themselves, not with branches or the transfer of commits.  Those
   6868 features are available from separate transient commands.
   6869 
   6870    Also see *note (gitman)git-remote::.
   6871 
   6872 ‘M’ (‘magit-remote’)
   6873      This transient prefix command binds the following suffix commands
   6874      and displays them in a temporary buffer until a suffix is invoked.
   6875 
   6876      By default it also binds and displays the values of some
   6877      remote-related Git variables and allows changing their values.
   6878 
   6879  -- User Option: magit-remote-direct-configure
   6880      This option controls whether remote-related Git variables are
   6881      accessible directly from the transient ‘magit-remote’.
   6882 
   6883      If ‘t’ (the default) and a local branch is checked out, then
   6884      ‘magit-remote’ features the variables for the upstream remote of
   6885      that branch, or if ‘HEAD’ is detached, for ‘origin’, provided that
   6886      exists.
   6887 
   6888      If ‘nil’, then ‘magit-remote-configure’ has to be used to do so.
   6889 
   6890 ‘M C’ (‘magit-remote-configure’)
   6891      This transient prefix command binds commands that set the value of
   6892      remote-related variables and displays them in a temporary buffer
   6893      until the transient is exited.
   6894 
   6895      With a prefix argument, this command always prompts for a remote.
   6896 
   6897      Without a prefix argument this depends on whether it was invoked as
   6898      a suffix of ‘magit-remote’ and on the
   6899      ‘magit-remote-direct-configure’ option.  If ‘magit-remote’ already
   6900      displays the variables for the upstream, then it does not make
   6901      sense to invoke another transient that displays them for the same
   6902      remote.  In that case this command prompts for a remote.
   6903 
   6904    The variables are described in *note Remote Git Variables::.
   6905 
   6906 ‘M a’ (‘magit-remote-add’)
   6907      This command add a remote and fetches it.  The remote name and url
   6908      are read in the minibuffer.
   6909 
   6910 ‘M r’ (‘magit-remote-rename’)
   6911      This command renames a remote.  Both the old and the new names are
   6912      read in the minibuffer.
   6913 
   6914 ‘M u’ (‘magit-remote-set-url’)
   6915      This command changes the url of a remote.  Both the remote and the
   6916      new url are read in the minibuffer.
   6917 
   6918 ‘M k’ (‘magit-remote-remove’)
   6919      This command deletes a remote, read in the minibuffer.
   6920 
   6921 ‘M p’ (‘magit-remote-prune’)
   6922      This command removes stale remote-tracking branches for a remote
   6923      read in the minibuffer.
   6924 
   6925 ‘M P’ (‘magit-remote-prune-refspecs’)
   6926      This command removes stale refspecs for a remote read in the
   6927      minibuffer.
   6928 
   6929      A refspec is stale if there no longer exists at least one branch on
   6930      the remote that would be fetched due to that refspec.  A stale
   6931      refspec is problematic because its existence causes Git to refuse
   6932      to fetch according to the remaining non-stale refspecs.
   6933 
   6934      If only stale refspecs remain, then this command offers to either
   6935      delete the remote or to replace the stale refspecs with the default
   6936      refspec ("+refs/heads/*:refs/remotes/REMOTE/*").
   6937 
   6938      This command also removes the remote-tracking branches that were
   6939      created due to the now stale refspecs.  Other stale branches are
   6940      not removed.
   6941 
   6942  -- User Option: magit-remote-add-set-remote.pushDefault
   6943      This option controls whether the user is asked whether they want to
   6944      set ‘remote.pushDefault’ after adding a remote.
   6945 
   6946      If ‘ask’, then users is always ask.  If ‘ask-if-unset’, then the
   6947      user is only if the variable isn’t set already.  If ‘nil’, then the
   6948      user isn’t asked and the variable isn’t set.  If the value is a
   6949      string, then the variable is set without the user being asked,
   6950      provided that the name of the added remote is equal to that string
   6951      and the variable isn’t already set.
   6952 
   6953 
   6954 File: magit.info,  Node: Remote Git Variables,  Prev: Remote Commands,  Up: Remotes
   6955 
   6956 7.1.2 Remote Git Variables
   6957 --------------------------
   6958 
   6959 These variables can be set from the transient prefix command
   6960 ‘magit-remote-configure’.  By default they can also be set from
   6961 ‘magit-remote’.  See *note Remote Commands::.
   6962 
   6963  -- Variable: remote.NAME.url
   6964      This variable specifies the url of the remote named NAME.  It can
   6965      have multiple values.
   6966 
   6967  -- Variable: remote.NAME.fetch
   6968      The refspec used when fetching from the remote named NAME.  It can
   6969      have multiple values.
   6970 
   6971  -- Variable: remote.NAME.pushurl
   6972      This variable specifies the url used for pushing to the remote
   6973      named NAME.  If it is not specified, then ‘remote.NAME.url’ is used
   6974      instead.  It can have multiple values.
   6975 
   6976  -- Variable: remote.NAME.push
   6977      The refspec used when pushing to the remote named NAME.  It can
   6978      have multiple values.
   6979 
   6980  -- Variable: remote.NAME.tagOpts
   6981      This variable specifies what tags are fetched by default.  If the
   6982      value is ‘--no-tags’ then no tags are fetched.  If the value is
   6983      ‘--tags’, then all tags are fetched.  If this variable has no
   6984      value, then only tags are fetched that are reachable from fetched
   6985      branches.
   6986 
   6987 
   6988 File: magit.info,  Node: Fetching,  Next: Pulling,  Prev: Remotes,  Up: Transferring
   6989 
   6990 7.2 Fetching
   6991 ============
   6992 
   6993 Also see *note (gitman)git-fetch::.  For information about the upstream
   6994 and the push-remote, see *note The Two Remotes::.
   6995 
   6996 ‘f’ (‘magit-fetch’)
   6997      This transient prefix command binds the following suffix commands
   6998      along with the appropriate infix arguments and displays them in a
   6999      temporary buffer until a suffix is invoked.
   7000 
   7001 ‘f p’ (‘magit-fetch-from-pushremote’)
   7002      This command fetches from the current push-remote.
   7003 
   7004      With a prefix argument or when the push-remote is either not
   7005      configured or unusable, then let the user first configure the
   7006      push-remote.
   7007 
   7008 ‘f u’ (‘magit-fetch-from-upstream’)
   7009      This command fetch from the upstream of the current branch.
   7010 
   7011      If the upstream is configured for the current branch and names an
   7012      existing remote, then use that.  Otherwise try to use another
   7013      remote: If only a single remote is configured, then use that.
   7014      Otherwise if a remote named "origin" exists, then use that.
   7015 
   7016      If no remote can be determined, then this command is not available
   7017      from the ‘magit-fetch’ transient prefix and invoking it directly
   7018      results in an error.
   7019 
   7020 ‘f e’ (‘magit-fetch-other’)
   7021      This command fetch from a repository read from the minibuffer.
   7022 
   7023 ‘f o’ (‘magit-fetch-branch’)
   7024      This command fetches a branch from a remote, both of which are read
   7025      from the minibuffer.
   7026 
   7027 ‘f r’ (‘magit-fetch-refspec’)
   7028      This command fetches from a remote using an explicit refspec, both
   7029      of which are read from the minibuffer.
   7030 
   7031 ‘f a’ (‘magit-fetch-all’)
   7032      This command fetches from all remotes.
   7033 
   7034 ‘f m’ (‘magit-submodule-fetch’)
   7035      This command fetches all submodules.  With a prefix argument it
   7036      fetches all remotes of all submodules.
   7037 
   7038  -- User Option: magit-pull-or-fetch
   7039      By default fetch and pull commands are available from separate
   7040      transient prefix command.  Setting this to ‘t’ adds some (but not
   7041      all) of the above suffix commands to the ‘magit-pull’ transient.
   7042 
   7043      If you do that, then you might also want to change the key binding
   7044      for these prefix commands, e.g.:
   7045 
   7046           (setq magit-pull-or-fetch t)
   7047           (define-key magit-mode-map "f" 'magit-pull) ; was magit-fetch
   7048           (define-key magit-mode-map "F" nil)         ; was magit-pull
   7049 
   7050 
   7051 File: magit.info,  Node: Pulling,  Next: Pushing,  Prev: Fetching,  Up: Transferring
   7052 
   7053 7.3 Pulling
   7054 ===========
   7055 
   7056 Also see *note (gitman)git-pull::.  For information about the upstream
   7057 and the push-remote, see *note The Two Remotes::.
   7058 
   7059 ‘F’ (‘magit-pull’)
   7060      This transient prefix command binds the following suffix commands
   7061      and displays them in a temporary buffer until a suffix is invoked.
   7062 
   7063 ‘F p’ (‘magit-pull-from-pushremote’)
   7064      This command pulls from the push-remote of the current branch.
   7065 
   7066      With a prefix argument or when the push-remote is either not
   7067      configured or unusable, then let the user first configure the
   7068      push-remote.
   7069 
   7070 ‘F u’ (‘magit-pull-from-upstream’)
   7071      This command pulls from the upstream of the current branch.
   7072 
   7073      With a prefix argument or when the upstream is either not
   7074      configured or unusable, then let the user first configure the
   7075      upstream.
   7076 
   7077 ‘F e’ (‘magit-pull-branch’)
   7078      This command pulls from a branch read in the minibuffer.
   7079 
   7080 
   7081 File: magit.info,  Node: Pushing,  Next: Plain Patches,  Prev: Pulling,  Up: Transferring
   7082 
   7083 7.4 Pushing
   7084 ===========
   7085 
   7086 Also see *note (gitman)git-push::.  For information about the upstream
   7087 and the push-remote, see *note The Two Remotes::.
   7088 
   7089 ‘P’ (‘magit-push’)
   7090      This transient prefix command binds the following suffix commands
   7091      along with the appropriate infix arguments and displays them in a
   7092      temporary buffer until a suffix is invoked.
   7093 
   7094 ‘P p’ (‘magit-push-current-to-pushremote’)
   7095      This command pushes the current branch to its push-remote.
   7096 
   7097      With a prefix argument or when the push-remote is either not
   7098      configured or unusable, then let the user first configure the
   7099      push-remote.
   7100 
   7101 ‘P u’ (‘magit-push-current-to-upstream’)
   7102      This command pushes the current branch to its upstream branch.
   7103 
   7104      With a prefix argument or when the upstream is either not
   7105      configured or unusable, then let the user first configure the
   7106      upstream.
   7107 
   7108 ‘P e’ (‘magit-push-current’)
   7109      This command pushes the current branch to a branch read in the
   7110      minibuffer.
   7111 
   7112 ‘P o’ (‘magit-push-other’)
   7113      This command pushes an arbitrary branch or commit somewhere.  Both
   7114      the source and the target are read in the minibuffer.
   7115 
   7116 ‘P r’ (‘magit-push-refspecs’)
   7117      This command pushes one or multiple refspecs to a remote, both of
   7118      which are read in the minibuffer.
   7119 
   7120      To use multiple refspecs, separate them with commas.  Completion is
   7121      only available for the part before the colon, or when no colon is
   7122      used.
   7123 
   7124 ‘P m’ (‘magit-push-matching’)
   7125      This command pushes all matching branches to another repository.
   7126 
   7127      If only one remote exists, then push to that.  Otherwise prompt for
   7128      a remote, offering the remote configured for the current branch as
   7129      default.
   7130 
   7131 ‘P t’ (‘magit-push-tags’)
   7132      This command pushes all tags to another repository.
   7133 
   7134      If only one remote exists, then push to that.  Otherwise prompt for
   7135      a remote, offering the remote configured for the current branch as
   7136      default.
   7137 
   7138 ‘P T’ (‘magit-push-tag’)
   7139      This command pushes a tag to another repository.
   7140 
   7141    One of the infix arguments, ‘--force-with-lease’, deserves a word of
   7142 caution.  It is passed without a value, which means "permit a force push
   7143 as long as the remote-tracking branches match their counterparts on the
   7144 remote end".  If you’ve set up a tool to do automatic fetches (Magit
   7145 itself does not provide such functionality), using ‘--force-with-lease’
   7146 can be dangerous because you don’t actually control or know the state of
   7147 the remote-tracking refs.  In that case, you should consider setting
   7148 ‘push.useForceIfIncludes’ to ‘true’ (available since Git 2.30).
   7149 
   7150    Two more push commands exist, which by default are not available from
   7151 the push transient.  See their doc-strings for instructions on how to
   7152 add them to the transient.
   7153 
   7154  -- Command: magit-push-implicitly args
   7155      This command pushes somewhere without using an explicit refspec.
   7156 
   7157      This command simply runs ‘git push -v [ARGS]’.  ARGS are the infix
   7158      arguments.  No explicit refspec arguments are used.  Instead the
   7159      behavior depends on at least these Git variables: ‘push.default’,
   7160      ‘remote.pushDefault’, ‘branch.<branch>.pushRemote’,
   7161      ‘branch.<branch>.remote’, ‘branch.<branch>.merge’, and
   7162      ‘remote.<remote>.push’.
   7163 
   7164      If you add this suffix to a transient prefix without explicitly
   7165      specifying the description, then an attempt is made to predict what
   7166      this command will do.  For example:
   7167 
   7168           (transient-insert-suffix 'magit-push \"p\"
   7169             '(\"i\" magit-push-implicitly))"
   7170 
   7171  -- Command: magit-push-to-remote remote args
   7172      This command pushes to the remote REMOTE without using an explicit
   7173      refspec.  The remote is read in the minibuffer.
   7174 
   7175      This command simply runs ‘git push -v [ARGS] REMOTE’.  ARGS are the
   7176      infix arguments.  No refspec arguments are used.  Instead the
   7177      behavior depends on at least these Git variables: ‘push.default’,
   7178      ‘remote.pushDefault’, ‘branch.<branch>.pushRemote’,
   7179      ‘branch.<branch>.remote’, ‘branch.<branch>.merge’, and
   7180      ‘remote.<remote>.push’.
   7181 
   7182 
   7183 File: magit.info,  Node: Plain Patches,  Next: Maildir Patches,  Prev: Pushing,  Up: Transferring
   7184 
   7185 7.5 Plain Patches
   7186 =================
   7187 
   7188 ‘W’ (‘magit-patch’)
   7189      This transient prefix command binds the following suffix commands
   7190      along with the appropriate infix arguments and displays them in a
   7191      temporary buffer until a suffix is invoked.
   7192 
   7193 ‘W c’ (‘magit-patch-create’)
   7194      This command creates patches for a set commits.  If the region
   7195      marks several commits, then it creates patches for all of them.
   7196      Otherwise it functions as a transient prefix command, which
   7197      features several infix arguments and binds itself as a suffix
   7198      command.  When this command is invoked as a suffix of itself, then
   7199      it creates a patch using the specified infix arguments.
   7200 
   7201 ‘w a’ (‘magit-patch-apply’)
   7202      This command applies a patch.  This is a transient prefix command,
   7203      which features several infix arguments and binds itself as a suffix
   7204      command.  When this command is invoked as a suffix of itself, then
   7205      it applies a patch using the specified infix arguments.
   7206 
   7207 ‘W s’ (‘magit-patch-save’)
   7208      This command creates a patch from the current diff.
   7209 
   7210      Inside ‘magit-diff-mode’ or ‘magit-revision-mode’ buffers, ‘C-x
   7211      C-w’ is also bound to this command.
   7212 
   7213    It is also possible to save a plain patch file by using ‘C-x C-w’
   7214 inside a ‘magit-diff-mode’ or ‘magit-revision-mode’ buffer.
   7215 
   7216 
   7217 File: magit.info,  Node: Maildir Patches,  Prev: Plain Patches,  Up: Transferring
   7218 
   7219 7.6 Maildir Patches
   7220 ===================
   7221 
   7222 Also see *note (gitman)git-am::.  and *note (gitman)git-apply::.
   7223 
   7224 ‘w’ (‘magit-am’)
   7225      This transient prefix command binds the following suffix commands
   7226      along with the appropriate infix arguments and displays them in a
   7227      temporary buffer until a suffix is invoked.
   7228 
   7229 ‘w w’ (‘magit-am-apply-patches’)
   7230      This command applies one or more patches.  If the region marks
   7231      files, then those are applied as patches.  Otherwise this command
   7232      reads a file-name in the minibuffer, defaulting to the file at
   7233      point.
   7234 
   7235 ‘w m’ (‘magit-am-apply-maildir’)
   7236      This command applies patches from a maildir.
   7237 
   7238 ‘w a’ (‘magit-patch-apply’)
   7239      This command applies a plain patch.  For a longer description see
   7240      *note Plain Patches::.  This command is only available from the
   7241      ‘magit-am’ transient for historic reasons.
   7242 
   7243    When an "am" operation is in progress, then the transient instead
   7244 features the following suffix commands.
   7245 
   7246 ‘w w’ (‘magit-am-continue’)
   7247      This command resumes the current patch applying sequence.
   7248 
   7249 ‘w s’ (‘magit-am-skip’)
   7250      This command skips the stopped at patch during a patch applying
   7251      sequence.
   7252 
   7253 ‘w a’ (‘magit-am-abort’)
   7254      This command aborts the current patch applying sequence.  This
   7255      discards all changes made since the sequence started.
   7256 
   7257 
   7258 File: magit.info,  Node: Miscellaneous,  Next: Customizing,  Prev: Transferring,  Up: Top
   7259 
   7260 8 Miscellaneous
   7261 ***************
   7262 
   7263 * Menu:
   7264 
   7265 * Tagging::
   7266 * Notes::
   7267 * Submodules::
   7268 * Subtree::
   7269 * Worktree::
   7270 * Sparse checkouts::
   7271 * Bundle::
   7272 * Common Commands::
   7273 * Wip Modes::
   7274 * Commands for Buffers Visiting Files::
   7275 * Minor Mode for Buffers Visiting Blobs::
   7276 
   7277 
   7278 File: magit.info,  Node: Tagging,  Next: Notes,  Up: Miscellaneous
   7279 
   7280 8.1 Tagging
   7281 ===========
   7282 
   7283 Also see *note (gitman)git-tag::.
   7284 
   7285 ‘t’ (‘magit-tag’)
   7286      This transient prefix command binds the following suffix commands
   7287      along with the appropriate infix arguments and displays them in a
   7288      temporary buffer until a suffix is invoked.
   7289 
   7290 ‘t t’ (‘magit-tag-create’)
   7291      This command creates a new tag with the given NAME at REV.  With a
   7292      prefix argument it creates an annotated tag.
   7293 
   7294 ‘t r’ (‘magit-tag-release’)
   7295      This commands creates a release tag.  It assumes that release tags
   7296      match ‘magit-release-tag-regexp’.
   7297 
   7298      First it prompts for the name of the new tag using the highest
   7299      existing tag as initial input and leaving it to the user to
   7300      increment the desired part of the version string.  If you use
   7301      unconventional release tags or version numbers (e.g.,
   7302      ‘v1.2.3-custom.1’), you can set the ‘magit-release-tag-regexp’ and
   7303      ‘magit-tag-version-regexp-alist’ variables.
   7304 
   7305      If ‘--annotate’ is enabled then it prompts for the message of the
   7306      new tag.  The proposed tag message is based on the message of the
   7307      highest tag, provided that that contains the corresponding version
   7308      string and substituting the new version string for that.  Otherwise
   7309      it proposes something like "Foo-Bar 1.2.3", given, for example, a
   7310      TAG "v1.2.3" and a repository located at something like
   7311      "/path/to/foo-bar".
   7312 
   7313 ‘t k’ (‘magit-tag-delete’)
   7314      This command deletes one or more tags.  If the region marks
   7315      multiple tags (and nothing else), then it offers to delete those.
   7316      Otherwise, it prompts for a single tag to be deleted, defaulting to
   7317      the tag at point.
   7318 
   7319 ‘t p’ (‘magit-tag-prune’)
   7320      This command offers to delete tags missing locally from REMOTE, and
   7321      vice versa.
   7322 
   7323 
   7324 File: magit.info,  Node: Notes,  Next: Submodules,  Prev: Tagging,  Up: Miscellaneous
   7325 
   7326 8.2 Notes
   7327 =========
   7328 
   7329 Also see *note (gitman)git-notes::.
   7330 
   7331 ‘T’ (‘magit-notes’)
   7332      This transient prefix command binds the following suffix commands
   7333      along with the appropriate infix arguments and displays them in a
   7334      temporary buffer until a suffix is invoked.
   7335 
   7336 ‘T T’ (‘magit-notes-edit’)
   7337      Edit the note attached to a commit, defaulting to the commit at
   7338      point.
   7339 
   7340      By default use the value of Git variable ‘core.notesRef’ or
   7341      "refs/notes/commits" if that is undefined.
   7342 
   7343 ‘T r’ (‘magit-notes-remove’)
   7344      Remove the note attached to a commit, defaulting to the commit at
   7345      point.
   7346 
   7347      By default use the value of Git variable ‘core.notesRef’ or
   7348      "refs/notes/commits" if that is undefined.
   7349 
   7350 ‘T p’ (‘magit-notes-prune’)
   7351      Remove notes about unreachable commits.
   7352 
   7353    It is possible to merge one note ref into another.  That may result
   7354 in conflicts which have to resolved in the temporary worktree
   7355 ".git/NOTES_MERGE_WORKTREE".
   7356 
   7357 ‘T m’ (‘magit-notes-merge’)
   7358      Merge the notes of a ref read from the user into the current notes
   7359      ref.  The current notes ref is the value of Git variable
   7360      ‘core.notesRef’ or "refs/notes/commits" if that is undefined.
   7361 
   7362    When a notes merge is in progress then the transient features the
   7363 following suffix commands, instead of those listed above.
   7364 
   7365 ‘T c’ (‘magit-notes-merge-commit’)
   7366      Commit the current notes ref merge, after manually resolving
   7367      conflicts.
   7368 
   7369 ‘T a’ (‘magit-notes-merge-abort’)
   7370      Abort the current notes ref merge.
   7371 
   7372    The following variables control what notes reference ‘magit-notes-*’,
   7373 ‘git notes’ and ‘git show’ act on and display.  Both the local and
   7374 global values are displayed and can be modified.
   7375 
   7376  -- Variable: core.notesRef
   7377      This variable specifies the notes ref that is displayed by default
   7378      and which commands act on by default.
   7379 
   7380  -- Variable: notes.displayRef
   7381      This variable specifies additional notes ref to be displayed in
   7382      addition to the ref specified by ‘core.notesRef’.  It can have
   7383      multiple values and may end with ‘*’ to display all refs in the
   7384      ‘refs/notes/’ namespace (or ‘**’ if some names contain slashes).
   7385 
   7386 
   7387 File: magit.info,  Node: Submodules,  Next: Subtree,  Prev: Notes,  Up: Miscellaneous
   7388 
   7389 8.3 Submodules
   7390 ==============
   7391 
   7392 Also see *note (gitman)git-submodule::.
   7393 
   7394 * Menu:
   7395 
   7396 * Listing Submodules::
   7397 * Submodule Transient::
   7398 
   7399 
   7400 File: magit.info,  Node: Listing Submodules,  Next: Submodule Transient,  Up: Submodules
   7401 
   7402 8.3.1 Listing Submodules
   7403 ------------------------
   7404 
   7405 The command ‘magit-list-submodules’ displays a list of the current
   7406 repository’s submodules in a separate buffer.  It’s also possible to
   7407 display information about submodules directly in the status buffer of
   7408 the super-repository by adding ‘magit-insert-modules’ to the hook
   7409 ‘magit-status-sections-hook’ as described in *note Status Module
   7410 Sections::.
   7411 
   7412  -- Command: magit-list-submodules
   7413      This command displays a list of the current repository’s populated
   7414      submodules in a separate buffer.
   7415 
   7416      It can be invoked by pressing ‘RET’ on the section titled
   7417      "Modules".
   7418 
   7419  -- User Option: magit-submodule-list-columns
   7420      This option controls what columns are displayed by the command
   7421      ‘magit-list-submodules’ and how they are displayed.
   7422 
   7423      Each element has the form ‘(HEADER WIDTH FORMAT PROPS)’.
   7424 
   7425      HEADER is the string displayed in the header.  WIDTH is the width
   7426      of the column.  FORMAT is a function that is called with one
   7427      argument, the repository identification (usually its basename), and
   7428      with ‘default-directory’ bound to the toplevel of its working tree.
   7429      It has to return a string to be inserted or nil.  PROPS is an alist
   7430      that supports the keys ‘:right-align’, ‘:pad-right’ and ‘:sort’.
   7431 
   7432      The ‘:sort’ function has a weird interface described in the
   7433      docstring of ‘tabulated-list--get-sort’.  Alternatively ‘<’ and
   7434      ‘magit-repolist-version<’ can be used as those functions are
   7435      automatically replaced with functions that satisfy the interface.
   7436      Set ‘:sort’ to ‘nil’ to inhibit sorting; if unspecified, then the
   7437      column is sortable using the default sorter.
   7438 
   7439      You may wish to display a range of numeric columns using just one
   7440      character per column and without any padding between columns, in
   7441      which case you should use an appropriate HEADER, set WIDTH to 1,
   7442      and set ‘:pad-right’ to 9.  ‘+’ is substituted for numbers higher
   7443      than 9.
   7444 
   7445 
   7446 File: magit.info,  Node: Submodule Transient,  Prev: Listing Submodules,  Up: Submodules
   7447 
   7448 8.3.2 Submodule Transient
   7449 -------------------------
   7450 
   7451 ‘o’ (‘magit-submodule’)
   7452      This transient prefix command binds the following suffix commands
   7453      along with the appropriate infix arguments and displays them in a
   7454      temporary buffer until a suffix is invoked.
   7455 
   7456    Some of the below commands default to act on the modules that are
   7457 selected using the region.  For brevity their description talk about
   7458 "the selected modules", but if no modules are selected, then they act on
   7459 the current module instead, or if point isn’t on a module, then the read
   7460 a single module to act on.  With a prefix argument these commands ignore
   7461 the selection and the current module and instead act on all suitable
   7462 modules.
   7463 
   7464 ‘o a’ (‘magit-submodule-add’)
   7465      This commands adds the repository at URL as a module.  Optional
   7466      PATH is the path to the module relative to the root of the
   7467      super-project.  If it is nil then the path is determined based on
   7468      URL.
   7469 
   7470 ‘o r’ (‘magit-submodule-register’)
   7471      This command registers the selected modules by copying their urls
   7472      from ".gitmodules" to "$GIT_DIR/config".  These values can then be
   7473      edited before running ‘magit-submodule-populate’.  If you don’t
   7474      need to edit any urls, then use the latter directly.
   7475 
   7476 ‘o p’ (‘magit-submodule-populate’)
   7477      This command creates the working directory or directories of the
   7478      selected modules, checking out the recorded commits.
   7479 
   7480 ‘o u’ (‘magit-submodule-update’)
   7481      This command updates the selected modules checking out the recorded
   7482      commits.
   7483 
   7484 ‘o s’ (‘magit-submodule-synchronize’)
   7485      This command synchronizes the urls of the selected modules, copying
   7486      the values from ".gitmodules" to the ".git/config" of the
   7487      super-project as well those of the modules.
   7488 
   7489 ‘o d’ (‘magit-submodule-unpopulate’)
   7490      This command removes the working directory of the selected modules.
   7491 
   7492 ‘o l’ (‘magit-list-submodules’)
   7493      This command displays a list of the current repository’s modules.
   7494 
   7495 ‘o f’ (‘magit-fetch-modules’)
   7496      This command fetches all populated modules.
   7497 
   7498      Option ‘magit-fetch-modules-jobs’ controls how many submodules are
   7499      being fetched in parallel.  Also fetch the super-repository,
   7500      because ‘git fetch’ does not support not doing that.  With a prefix
   7501      argument fetch all remotes.
   7502 
   7503 
   7504 File: magit.info,  Node: Subtree,  Next: Worktree,  Prev: Submodules,  Up: Miscellaneous
   7505 
   7506 8.4 Subtree
   7507 ===========
   7508 
   7509 Also see *note (gitman)git-subtree::.
   7510 
   7511 ‘O’ (‘magit-subtree’)
   7512      This transient prefix command binds the two sub-transients; one for
   7513      importing a subtree and one for exporting a subtree.
   7514 
   7515 ‘O i’ (‘magit-subtree-import’)
   7516      This transient prefix command binds the following suffix commands
   7517      along with the appropriate infix arguments and displays them in a
   7518      temporary buffer until a suffix is invoked.
   7519 
   7520      The suffixes of this command import subtrees.
   7521 
   7522      If the ‘--prefix’ argument is set, then the suffix commands use
   7523      that prefix without prompting the user.  If it is unset, then they
   7524      read the prefix in the minibuffer.
   7525 
   7526 ‘O i a’ (‘magit-subtree-add’)
   7527      This command adds COMMIT from REPOSITORY as a new subtree at
   7528      PREFIX.
   7529 
   7530 ‘O i c’ (‘magit-subtree-add-commit’)
   7531      This command add COMMIT as a new subtree at PREFIX.
   7532 
   7533 ‘O i m’ (‘magit-subtree-merge’)
   7534      This command merges COMMIT into the PREFIX subtree.
   7535 
   7536 ‘O i f’ (‘magit-subtree-pull’)
   7537      This command pulls COMMIT from REPOSITORY into the PREFIX subtree.
   7538 
   7539 ‘O e’ (‘magit-subtree-export’)
   7540      This transient prefix command binds the following suffix commands
   7541      along with the appropriate infix arguments and displays them in a
   7542      temporary buffer until a suffix is invoked.
   7543 
   7544      The suffixes of this command export subtrees.
   7545 
   7546      If the ‘--prefix’ argument is set, then the suffix commands use
   7547      that prefix without prompting the user.  If it is unset, then they
   7548      read the prefix in the minibuffer.
   7549 
   7550 ‘O e p’ (‘magit-subtree-push’)
   7551      This command extract the history of the subtree PREFIX and pushes
   7552      it to REF on REPOSITORY.
   7553 
   7554 ‘O e s’ (‘magit-subtree-split’)
   7555      This command extracts the history of the subtree PREFIX.
   7556 
   7557 
   7558 File: magit.info,  Node: Worktree,  Next: Sparse checkouts,  Prev: Subtree,  Up: Miscellaneous
   7559 
   7560 8.5 Worktree
   7561 ============
   7562 
   7563 Also see *note (gitman)git-worktree::.
   7564 
   7565 ‘Z’ (‘magit-worktree’)
   7566      This transient prefix command binds the following suffix commands
   7567      and displays them in a temporary buffer until a suffix is invoked.
   7568 
   7569 ‘Z b’ (‘magit-worktree-checkout’)
   7570      Checkout BRANCH in a new worktree at PATH.
   7571 
   7572 ‘Z c’ (‘magit-worktree-branch’)
   7573      Create a new BRANCH and check it out in a new worktree at PATH.
   7574 
   7575 ‘Z m’ (‘magit-worktree-move’)
   7576      Move an existing worktree to a new PATH.
   7577 
   7578 ‘Z k’ (‘magit-worktree-delete’)
   7579      Delete a worktree, defaulting to the worktree at point.  The
   7580      primary worktree cannot be deleted.
   7581 
   7582 ‘Z g’ (‘magit-worktree-status’)
   7583      Show the status for the worktree at point.
   7584 
   7585      If there is no worktree at point, then read one in the minibuffer.
   7586      If the worktree at point is the one whose status is already being
   7587      displayed in the current buffer, then show it in Dired instead.
   7588 
   7589 
   7590 File: magit.info,  Node: Sparse checkouts,  Next: Bundle,  Prev: Worktree,  Up: Miscellaneous
   7591 
   7592 8.6 Sparse checkouts
   7593 ====================
   7594 
   7595 Sparse checkouts provide a way to restrict the working tree to a subset
   7596 of directories.  See *note (gitman)git-sparse-checkout::.
   7597 
   7598    *Warning*: Git introduced the ‘git sparse-checkout’ command in
   7599 version 2.25 and still advertises it as experimental and subject to
   7600 change.  Magit’s interface should be considered the same.  In
   7601 particular, if Git introduces a backward incompatible change, Magit’s
   7602 sparse checkout functionality may be updated in a way that requires a
   7603 more recent Git version.
   7604 
   7605 ‘>’ (‘magit-sparse-checkout’)
   7606      This transient prefix command binds the following suffix commands
   7607      and displays them in a temporary buffer until a suffix is invoked.
   7608 
   7609 ‘> e’ (‘magit-sparse-checkout-enable’)
   7610      This command initializes a sparse checkout that includes only the
   7611      files in the top-level directory.
   7612 
   7613      Note that ‘magit-sparse-checkout-set’ and
   7614      ‘magit-sparse-checkout-add’ automatically initialize a sparse
   7615      checkout if necessary.  However, you may want to call
   7616      ‘magit-sparse-checkout-enable’ explicitly to re-initialize a sparse
   7617      checkout after calling ‘magit-sparse-checkout-disable’, to pass
   7618      additional arguments to ‘git sparse-checkout init’, or to execute
   7619      the initialization asynchronously.
   7620 
   7621 ‘> s’ (‘magit-sparse-checkout-set’)
   7622      This command takes a list of directories and configures the sparse
   7623      checkout to include only files in those subdirectories.  Any
   7624      previously included directories are excluded unless they are in the
   7625      provided list of directories.
   7626 
   7627 ‘> a’ (‘magit-sparse-checkout-add’)
   7628      This command is like ‘magit-sparse-checkout-set’, but instead adds
   7629      the specified list of directories to the set of directories that is
   7630      already included in the sparse checkout.
   7631 
   7632 ‘> r’ (‘magit-sparse-checkout-reapply’)
   7633      This command applies the currently configured sparse checkout
   7634      patterns to the working tree.  This is useful to call if excluded
   7635      files have been checked out after operations such as merging or
   7636      rebasing.
   7637 
   7638 ‘> d’ (‘magit-sparse-checkout-disable’)
   7639      This command restores the full checkout.  To return to the previous
   7640      sparse checkout, call ‘magit-sparse-checkout-enable’.
   7641 
   7642    A sparse checkout can also be initiated when cloning a repository by
   7643 using the ‘magit-clone-sparse’ command in the ‘magit-clone’ transient
   7644 (see *note Cloning Repository::).
   7645 
   7646    If you want the status buffer to indicate when a sparse checkout is
   7647 enabled, add the function ‘magit-sparse-checkout-insert-header’ to
   7648 ‘magit-status-headers-hook’.
   7649 
   7650 
   7651 File: magit.info,  Node: Bundle,  Next: Common Commands,  Prev: Sparse checkouts,  Up: Miscellaneous
   7652 
   7653 8.7 Bundle
   7654 ==========
   7655 
   7656 Also see *note (gitman)git-bundle::.
   7657 
   7658  -- Command: magit-bundle
   7659      This transient prefix command binds several suffix commands for
   7660      running ‘git bundle’ subcommands and displays them in a temporary
   7661      buffer until a suffix is invoked.
   7662 
   7663 
   7664 File: magit.info,  Node: Common Commands,  Next: Wip Modes,  Prev: Bundle,  Up: Miscellaneous
   7665 
   7666 8.8 Common Commands
   7667 ===================
   7668 
   7669  -- Command: magit-switch-to-repository-buffer
   7670  -- Command: magit-switch-to-repository-buffer-other-window
   7671  -- Command: magit-switch-to-repository-buffer-other-frame
   7672  -- Command: magit-display-repository-buffer
   7673      These commands read any existing Magit buffer that belongs to the
   7674      current repository from the user and then switch to the selected
   7675      buffer (without refreshing it).
   7676 
   7677      The last variant uses ‘magit-display-buffer’ to do so and thus
   7678      respects ‘magit-display-buffer-function’.
   7679 
   7680    These are some of the commands that can be used in all buffers whose
   7681 major-modes derive from ‘magit-mode’.  There are other common commands
   7682 beside the ones below, but these didn’t fit well anywhere else.
   7683 
   7684 ‘C-w’ (‘magit-copy-section-value’)
   7685      This command saves the value of the current section to the
   7686      ‘kill-ring’, and, provided that the current section is a commit,
   7687      branch, or tag section, it also pushes the (referenced) revision to
   7688      the ‘magit-revision-stack’.
   7689 
   7690      When the current section is a branch or a tag, and a prefix
   7691      argument is used, then it saves the revision at its tip to the
   7692      ‘kill-ring’ instead of the reference name.
   7693 
   7694      When the region is active, this command saves that to the
   7695      ‘kill-ring’, like ‘kill-ring-save’ would, instead of behaving as
   7696      described above.  If a prefix argument is used and the region is
   7697      within a hunk, then it strips the diff marker column and keeps only
   7698      either the added or removed lines, depending on the sign of the
   7699      prefix argument.
   7700 
   7701 ‘M-w’ (‘magit-copy-buffer-revision’)
   7702      This command saves the revision being displayed in the current
   7703      buffer to the ‘kill-ring’ and also pushes it to the
   7704      ‘magit-revision-stack’.  It is mainly intended for use in
   7705      ‘magit-revision-mode’ buffers, the only buffers where it is always
   7706      unambiguous exactly which revision should be saved.
   7707 
   7708      Most other Magit buffers usually show more than one revision, in
   7709      some way or another, so this command has to select one of them, and
   7710      that choice might not always be the one you think would have been
   7711      the best pick.
   7712 
   7713    Outside of Magit ‘M-w’ and ‘C-w’ are usually bound to
   7714 ‘kill-ring-save’ and ‘kill-region’, and these commands would also be
   7715 useful in Magit buffers.  Therefore when the region is active, then both
   7716 of these commands behave like ‘kill-ring-save’ instead of as described
   7717 above.
   7718 
   7719 
   7720 File: magit.info,  Node: Wip Modes,  Next: Commands for Buffers Visiting Files,  Prev: Common Commands,  Up: Miscellaneous
   7721 
   7722 8.9 Wip Modes
   7723 =============
   7724 
   7725 Git keeps *committed* changes around long enough for users to recover
   7726 changes they have accidentally deleted.  It does so by not garbage
   7727 collecting any committed but no longer referenced objects for a certain
   7728 period of time, by default 30 days.
   7729 
   7730    But Git does *not* keep track of *uncommitted* changes in the working
   7731 tree and not even the index (the staging area).  Because Magit makes it
   7732 so convenient to modify uncommitted changes, it also makes it easy to
   7733 shoot yourself in the foot in the process.
   7734 
   7735    For that reason Magit provides a global mode that saves *tracked*
   7736 files to work-in-progress references after or before certain actions.
   7737 (At present untracked files are never saved and for technical reasons
   7738 nothing is saved before the first commit has been created).
   7739 
   7740    Two separate work-in-progress references are used to track the state
   7741 of the index and of the working tree: ‘refs/wip/index/<branchref>’ and
   7742 ‘refs/wip/wtree/<branchref>’, where ‘<branchref>’ is the full ref of the
   7743 current branch, e.g., ‘refs/heads/master’.  When the ‘HEAD’ is detached
   7744 then ‘HEAD’ is used in place of ‘<branchref>’.
   7745 
   7746    Checking out another branch (or detaching ‘HEAD’) causes the use of
   7747 different wip refs for subsequent changes.
   7748 
   7749  -- User Option: magit-wip-mode
   7750      When this mode is enabled, then uncommitted changes are committed
   7751      to dedicated work-in-progress refs whenever appropriate (i.e., when
   7752      dataloss would be a possibility otherwise).
   7753 
   7754      Setting this variable directly does not take effect; either use the
   7755      Custom interface to do so or call the respective mode function.
   7756 
   7757      For historic reasons this mode is implemented on top of four other
   7758      ‘magit-wip-*’ modes, which can also be used individually, if you
   7759      want finer control over when the wip refs are updated; but that is
   7760      discouraged.  See *note Legacy Wip Modes::.
   7761 
   7762    To view the log for a branch and its wip refs use the commands
   7763 ‘magit-wip-log’ and ‘magit-wip-log-current’.  You should use ‘--graph’
   7764 when using these commands.
   7765 
   7766  -- Command: magit-wip-log
   7767      This command shows the log for a branch and its wip refs.  With a
   7768      negative prefix argument only the worktree wip ref is shown.
   7769 
   7770      The absolute numeric value of the prefix argument controls how many
   7771      "branches" of each wip ref are shown.  This is only relevant if the
   7772      value of ‘magit-wip-merge-branch’ is ‘nil’.
   7773 
   7774  -- Command: magit-wip-log-current
   7775      This command shows the log for the current branch and its wip refs.
   7776      With a negative prefix argument only the worktree wip ref is shown.
   7777 
   7778      The absolute numeric value of the prefix argument controls how many
   7779      "branches" of each wip ref are shown.  This is only relevant if the
   7780      value of ‘magit-wip-merge-branch’ is ‘nil’.
   7781 
   7782 ‘X w’ (‘magit-reset-worktree’)
   7783      This command resets the working tree to some commit read from the
   7784      user and defaulting to the commit at point, while keeping the
   7785      ‘HEAD’ and index as-is.
   7786 
   7787      This can be used to restore files to the state committed to a wip
   7788      ref.  Note that this will discard any unstaged changes that might
   7789      have existed before invoking this command (but of course only after
   7790      committing that to the working tree wip ref).
   7791 
   7792    Note that even if you enable ‘magit-wip-mode’ this won’t give you
   7793 perfect protection.  The most likely scenario for losing changes despite
   7794 the use of ‘magit-wip-mode’ is making a change outside Emacs and then
   7795 destroying it also outside Emacs.  In some such a scenario, Magit, being
   7796 an Emacs package, didn’t get the opportunity to keep you from shooting
   7797 yourself in the foot.
   7798 
   7799    When you are unsure whether Magit did commit a change to the wip
   7800 refs, then you can explicitly request that all changes to all tracked
   7801 files are being committed.
   7802 
   7803 ‘M-x magit-wip-commit’
   7804      This command commits all changes to all tracked files to the index
   7805      and working tree work-in-progress refs.  Like the modes described
   7806      above, it does not commit untracked files, but it does check all
   7807      tracked files for changes.  Use this command when you suspect that
   7808      the modes might have overlooked a change made outside Emacs/Magit.
   7809 
   7810  -- User Option: magit-wip-namespace
   7811      The namespace used for work-in-progress refs.  It has to end with a
   7812      slash.  The wip refs are named ‘<namespace>index/<branchref>’ and
   7813      ‘<namespace>wtree/<branchref>’.  When snapshots are created while
   7814      the ‘HEAD’ is detached then ‘HEAD’ is used in place of
   7815      ‘<branchref>’.
   7816 
   7817  -- User Option: magit-wip-mode-lighter
   7818      Mode-line lighter for ‘magit-wip--mode’.
   7819 
   7820 * Menu:
   7821 
   7822 * Wip Graph::
   7823 * Legacy Wip Modes::
   7824 
   7825 
   7826 File: magit.info,  Node: Wip Graph,  Next: Legacy Wip Modes,  Up: Wip Modes
   7827 
   7828 8.9.1 Wip Graph
   7829 ---------------
   7830 
   7831  -- User Option: magit-wip-merge-branch
   7832      This option controls whether the current branch is merged into the
   7833      wip refs after a new commit was created on the branch.
   7834 
   7835      If non-nil and the current branch has new commits, then it is
   7836      merged into the wip ref before creating a new wip commit.  This
   7837      makes it easier to inspect wip history and the wip commits are
   7838      never garbage collected.
   7839 
   7840      If nil and the current branch has new commits, then the wip ref is
   7841      reset to the tip of the branch before creating a new wip commit.
   7842      With this setting wip commits are eventually garbage collected.
   7843 
   7844    When ‘magit-wip-merge-branch’ is ‘t’, then the history looks like
   7845 this:
   7846 
   7847        *--*--*--*--*--*       refs/wip/index/refs/heads/master
   7848       /     /     /
   7849      A-----B-----C            refs/heads/master
   7850 
   7851    When ‘magit-wip-merge-branch’ is ‘nil’, then creating a commit on the
   7852 real branch and then making a change causes the wip refs to be recreated
   7853 to fork from the new commit.  But the old commits on the wip refs are
   7854 not lost.  They are still available from the reflog.  To make it easier
   7855 to see when the fork point of a wip ref was changed, an additional
   7856 commit with the message "restart autosaving" is created on it (‘xxO’
   7857 commits below are such boundary commits).
   7858 
   7859    Starting with
   7860 
   7861            BI0---BI1    refs/wip/index/refs/heads/master
   7862           /
   7863      A---B              refs/heads/master
   7864           \
   7865            BW0---BW1    refs/wip/wtree/refs/heads/master
   7866 
   7867    and committing the staged changes and editing and saving a file would
   7868 result in
   7869 
   7870            BI0---BI1        refs/wip/index/refs/heads/master
   7871           /
   7872      A---B---C              refs/heads/master
   7873           \   \
   7874            \   CW0---CW1    refs/wip/wtree/refs/heads/master
   7875             \
   7876              BW0---BW1      refs/wip/wtree/refs/heads/master@{2}
   7877 
   7878    The fork-point of the index wip ref is not changed until some change
   7879 is being staged.  Likewise just checking out a branch or creating a
   7880 commit does not change the fork-point of the working tree wip ref.  The
   7881 fork-points are not adjusted until there actually is a change that
   7882 should be committed to the respective wip ref.
   7883 
   7884 
   7885 File: magit.info,  Node: Legacy Wip Modes,  Prev: Wip Graph,  Up: Wip Modes
   7886 
   7887 8.9.2 Legacy Wip Modes
   7888 ----------------------
   7889 
   7890 It is recommended that you use the mode ‘magit-wip-mode’ (which see) and
   7891 ignore the existence of the following modes, which are preserved for
   7892 historic reasons.
   7893 
   7894    Setting the following variables directly does not take effect; either
   7895 use the Custom interface to do so or call the respective mode functions.
   7896 
   7897  -- User Option: magit-wip-after-save-mode
   7898      When this mode is enabled, then saving a buffer that visits a file
   7899      tracked in a Git repository causes its current state to be
   7900      committed to the working tree wip ref for the current branch.
   7901 
   7902  -- User Option: magit-wip-after-apply-mode
   7903      When this mode is enabled, then applying (i.e., staging, unstaging,
   7904      discarding, reversing, and regularly applying) a change to a file
   7905      tracked in a Git repository causes its current state to be
   7906      committed to the index and/or working tree wip refs for the current
   7907      branch.
   7908 
   7909    If you only ever edit files using Emacs and only ever interact with
   7910 Git using Magit, then the above two modes should be enough to protect
   7911 each and every change from accidental loss.  In practice nobody does
   7912 that.  Two additional modes exists that do commit to the wip refs before
   7913 making changes that could cause the loss of earlier changes.
   7914 
   7915  -- User Option: magit-wip-before-change-mode
   7916      When this mode is enabled, then certain commands commit the
   7917      existing changes to the files they are about to make changes to.
   7918 
   7919  -- User Option: magit-wip-initial-backup-mode
   7920      When this mode is enabled, then the current version of a file is
   7921      committed to the worktree wip ref before the buffer visiting that
   7922      file is saved for the first time since the buffer was created.
   7923 
   7924      This backs up the same version of the file that ‘backup-buffer’
   7925      would save.  While ‘backup-buffer’ uses a backup file, this mode
   7926      uses the same worktree wip ref as used by the other Magit Wip
   7927      modes.  Like ‘backup-buffer’, it only does this once; unless you
   7928      kill the buffer and visit the file again only one backup will be
   7929      created per Emacs session.
   7930 
   7931      This mode ignores the variables that affect ‘backup-buffer’ and can
   7932      be used along-side that function, which is recommended because it
   7933      only backs up files that are tracked in a Git repository.
   7934 
   7935  -- User Option: magit-wip-after-save-local-mode-lighter
   7936      Mode-line lighter for ‘magit-wip-after-save-local-mode’.
   7937 
   7938  -- User Option: magit-wip-after-apply-mode-lighter
   7939      Mode-line lighter for ‘magit-wip-after-apply-mode’.
   7940 
   7941  -- User Option: magit-wip-before-change-mode-lighter
   7942      Mode-line lighter for ‘magit-wip-before-change-mode’.
   7943 
   7944  -- User Option: magit-wip-initial-backup-mode-lighter
   7945      Mode-line lighter for ‘magit-wip-initial-backup-mode’.
   7946 
   7947 
   7948 File: magit.info,  Node: Commands for Buffers Visiting Files,  Next: Minor Mode for Buffers Visiting Blobs,  Prev: Wip Modes,  Up: Miscellaneous
   7949 
   7950 8.10 Commands for Buffers Visiting Files
   7951 ========================================
   7952 
   7953 By default Magit defines a few global key bindings.  These bindings are
   7954 a compromise between providing no bindings at all and providing the
   7955 better bindings I would have liked to use instead.  Magit cannot provide
   7956 the set of recommended bindings by default because those key sequences
   7957 are strictly reserved for bindings added by the user.  Also see *note
   7958 Global Bindings:: and *note (elisp)Key Binding Conventions::.
   7959 
   7960    To use the recommended bindings, add this to your init file and
   7961 restart Emacs.
   7962 
   7963      (setq magit-define-global-key-bindings 'recommended)
   7964 
   7965    If you don’t want Magit to add any bindings to the global keymap at
   7966 all, add this to your init file and restart Emacs.
   7967 
   7968      (setq magit-define-global-key-bindings nil)
   7969 
   7970 ‘C-c f’ (‘magit-file-dispatch’)
   7971 ‘C-c f s’ (‘magit-stage-file’)
   7972 ‘C-c f s’ (‘magit-stage-buffer-file’)
   7973 ‘C-c f u’ (‘magit-unstage-file’)
   7974 ‘C-c f u’ (‘magit-unstage-buffer-file’)
   7975 ‘C-c f , x’ (‘magit-file-untrack’)
   7976 ‘C-c f , r’ (‘magit-file-rename’)
   7977 ‘C-c f , k’ (‘magit-file-delete’)
   7978 ‘C-c f , c’ (‘magit-file-checkout’)
   7979 ‘C-c f D’ (‘magit-diff’)
   7980 ‘C-c f d’ (‘magit-diff-buffer-file’)
   7981 ‘C-c f L’ (‘magit-log’)
   7982 ‘C-c f l’ (‘magit-log-buffer-file’)
   7983 ‘C-c f t’ (‘magit-log-trace-definition’)
   7984 ‘C-c f M’ (‘magit-log-merged’)
   7985 ‘C-c f B’ (‘magit-blame’)
   7986 ‘C-c f b’ (‘magit-blame-additions’)
   7987 ‘C-c f r’ (‘magit-blame-removal’)
   7988 ‘C-c f f’ (‘magit-blame-reverse’)
   7989 ‘C-c f m’ (‘magit-blame-echo’)
   7990 ‘C-c f q’ (‘magit-blame-quit’)
   7991 ‘C-c f p’ (‘magit-blob-previous’)
   7992 ‘C-c f n’ (‘magit-blob-next’)
   7993 ‘C-c f v’ (‘magit-find-file’)
   7994 ‘C-c f V’ (‘magit-blob-visit-file’)
   7995 ‘C-c f g’ (‘magit-status-here’)
   7996 ‘C-c f G’ (‘magit-display-repository-buffer’)
   7997 ‘C-c f c’ (‘magit-commit’)
   7998 ‘C-c f e’ (‘magit-edit-line-commit’)
   7999      Each of these commands is documented individually right below,
   8000      alongside their default key bindings.  The bindings shown above are
   8001      the recommended bindings, which you can enable by following the
   8002      instructions further up.
   8003 
   8004 ‘C-c M-g’ (‘magit-file-dispatch’)
   8005      This transient prefix command binds the following suffix commands
   8006      and displays them in a temporary buffer until a suffix is invoked.
   8007 
   8008 ‘C-c M-g s’ (‘magit-stage-file’)
   8009 ‘C-c M-g s’ (‘magit-stage-buffer-file’)
   8010      Stage all changes to the file being visited in the current buffer.
   8011      When not visiting a file, then the first command is used, which
   8012      prompts for a file.
   8013 
   8014 ‘C-c M-g u’ (‘magit-unstage-file’)
   8015 ‘C-c M-g u’ (‘magit-unstage-buffer-file’)
   8016      Unstage all changes to the file being visited in the current
   8017      buffer.  When not visiting a file, then the first command is used,
   8018      which prompts for a file.
   8019 
   8020 ‘C-c M-g , x’ (‘magit-file-untrack’)
   8021      This command untracks a file read from the user, defaulting to the
   8022      visited file.
   8023 
   8024 ‘C-c M-g , r’ (‘magit-file-rename’)
   8025      This command renames a file read from the user, defaulting to the
   8026      visited file.
   8027 
   8028 ‘C-c M-g , k’ (‘magit-file-delete’)
   8029      This command deletes a file read from the user, defaulting to the
   8030      visited file.
   8031 
   8032 ‘C-c M-g , c’ (‘magit-file-checkout’)
   8033      This command updates a file in the working tree and index to the
   8034      contents from a revision.  Both the revision and file are read from
   8035      the user.
   8036 
   8037 ‘C-c M-g D’ (‘magit-diff’)
   8038      This transient prefix command binds several diff suffix commands
   8039      and infix arguments and displays them in a temporary buffer until a
   8040      suffix is invoked.  See *note Diffing::.
   8041 
   8042      This is the same command that ‘d’ is bound to in Magit buffers.  If
   8043      this command is invoked from a file-visiting buffer, then the
   8044      initial value of the option (‘--’) that limits the diff to certain
   8045      file(s) is set to the visited file.
   8046 
   8047 ‘C-c M-g d’ (‘magit-diff-buffer-file’)
   8048      This command shows the diff for the file of blob that the current
   8049      buffer visits.
   8050 
   8051  -- User Option: magit-diff-buffer-file-locked
   8052      This option controls whether ‘magit-diff-buffer-file’ uses a
   8053      dedicated buffer.  See *note Modes and Buffers::.
   8054 
   8055 ‘C-c M-g L’ (‘magit-log’)
   8056      This transient prefix command binds several log suffix commands and
   8057      infix arguments and displays them in a temporary buffer until a
   8058      suffix is invoked.  See *note Logging::.
   8059 
   8060      This is the same command that ‘l’ is bound to in Magit buffers.  If
   8061      this command is invoked from a file-visiting buffer, then the
   8062      initial value of the option (‘--’) that limits the log to certain
   8063      file(s) is set to the visited file.
   8064 
   8065 ‘C-c M-g l’ (‘magit-log-buffer-file’)
   8066      This command shows the log for the file of blob that the current
   8067      buffer visits.  Renames are followed when a prefix argument is used
   8068      or when ‘--follow’ is an active log argument.  When the region is
   8069      active, the log is restricted to the selected line range.
   8070 
   8071  -- User Option: magit-log-buffer-file-locked
   8072      This option controls whether ‘magit-log-buffer-file’ uses a
   8073      dedicated buffer.  See *note Modes and Buffers::.
   8074 
   8075 ‘C-c M-g t’ (‘magit-log-trace-definition’)
   8076      This command shows the log for the definition at point.
   8077 
   8078 ‘C-c M-g M’ (‘magit-log-merged’)
   8079      This command reads a commit and a branch in shows a log concerning
   8080      the merge of the former into the latter.  This shows multiple
   8081      commits even in case of a fast-forward merge.
   8082 
   8083 ‘C-c M-g B’ (‘magit-blame’)
   8084      This transient prefix command binds all blaming suffix commands
   8085      along with the appropriate infix arguments and displays them in a
   8086      temporary buffer until a suffix is invoked.
   8087 
   8088      For more information about this and the following commands also see
   8089      *note Blaming::.
   8090 
   8091      In addition to the ‘magit-blame’ sub-transient, the dispatch
   8092      transient also binds several blaming suffix commands directly.  See
   8093      *note Blaming:: for information about those commands and bindings.
   8094 
   8095 ‘C-c M-g p’ (‘magit-blob-previous’)
   8096      This command visits the previous blob which modified the current
   8097      file.
   8098 
   8099 ‘C-c M-g n’ (‘magit-blob-next’)
   8100      This command visits the next blob which modified the current file.
   8101 
   8102 ‘C-c M-g v’ (‘magit-find-file’)
   8103      This command reads a revision and file and visits the respective
   8104      blob.
   8105 
   8106 ‘C-c M-g V’ (‘magit-blob-visit-file’)
   8107      This command visits the file from the working tree, corresponding
   8108      to the current blob.  When visiting a blob or the version from the
   8109      index, then it goes to the same location in the respective file in
   8110      the working tree.
   8111 
   8112 ‘C-c M-g g’ (‘magit-status-here’)
   8113      This command displays the status of the current repository in a
   8114      buffer, like ‘magit-status’ does.  Additionally it tries to go to
   8115      the position in that buffer, which corresponds to the position in
   8116      the current file-visiting buffer (if any).
   8117 
   8118 ‘C-c M-g G’ (‘magit-display-repository-buffer’)
   8119      This command reads and displays a Magit buffer belonging to the
   8120      current repository, without refreshing it.
   8121 
   8122 ‘C-c M-g c’ (‘magit-commit’)
   8123      This transient prefix command binds the following suffix commands
   8124      along with the appropriate infix arguments and displays them in a
   8125      temporary buffer until a suffix is invoked.  See *note Initiating a
   8126      Commit::.
   8127 
   8128 ‘C-c M-g e’ (‘magit-edit-line-commit’)
   8129      This command makes the commit editable that added the current line.
   8130 
   8131      With a prefix argument it makes the commit editable that removes
   8132      the line, if any.  The commit is determined using ‘git blame’ and
   8133      made editable using ‘git rebase --interactive’ if it is reachable
   8134      from ‘HEAD’, or by checking out the commit (or a branch that points
   8135      at it) otherwise.
   8136 
   8137 
   8138 File: magit.info,  Node: Minor Mode for Buffers Visiting Blobs,  Prev: Commands for Buffers Visiting Files,  Up: Miscellaneous
   8139 
   8140 8.11 Minor Mode for Buffers Visiting Blobs
   8141 ==========================================
   8142 
   8143 The ‘magit-blob-mode’ enables certain Magit features in blob-visiting
   8144 buffers.  Such buffers can be created using ‘magit-find-file’ and some
   8145 of the commands mentioned below, which also take care of turning on this
   8146 minor mode.  Currently this mode only establishes a few key bindings,
   8147 but this might be extended.
   8148 
   8149 ‘p’ (‘magit-blob-previous’)
   8150      Visit the previous blob which modified the current file.
   8151 
   8152 ‘n’ (‘magit-blob-next’)
   8153      Visit the next blob which modified the current file.
   8154 
   8155 ‘q’ (‘magit-kill-this-buffer’)
   8156      Kill the current buffer.
   8157 
   8158 
   8159 File: magit.info,  Node: Customizing,  Next: Plumbing,  Prev: Miscellaneous,  Up: Top
   8160 
   8161 9 Customizing
   8162 *************
   8163 
   8164 Both Git and Emacs are highly customizable.  Magit is both a Git
   8165 porcelain as well as an Emacs package, so it makes sense to customize it
   8166 using both Git variables as well as Emacs options.  However this
   8167 flexibility doesn’t come without problems, including but not limited to
   8168 the following.
   8169 
   8170    • Some Git variables automatically have an effect in Magit without
   8171      requiring any explicit support.  Sometimes that is desirable - in
   8172      other cases, it breaks Magit.
   8173 
   8174      When a certain Git setting breaks Magit but you want to keep using
   8175      that setting on the command line, then that can be accomplished by
   8176      overriding the value for Magit only by appending something like
   8177      ‘("-c" "some.variable=compatible-value")’ to
   8178      ‘magit-git-global-arguments’.
   8179 
   8180    • Certain settings like ‘fetch.prune=true’ are respected by Magit
   8181      commands (because they simply call the respective Git command) but
   8182      their value is not reflected in the respective transient buffers.
   8183      In this case the ‘--prune’ argument in ‘magit-fetch’ might be
   8184      active or inactive, but that doesn’t keep the Git variable from
   8185      being honored by the suffix commands anyway.  So pruning might
   8186      happen despite the ‘--prune’ arguments being displayed in a way
   8187      that seems to indicate that no pruning will happen.
   8188 
   8189    I intend to address these and similar issues in a future release.
   8190 
   8191 * Menu:
   8192 
   8193 * Per-Repository Configuration::
   8194 * Essential Settings::
   8195 
   8196 
   8197 File: magit.info,  Node: Per-Repository Configuration,  Next: Essential Settings,  Up: Customizing
   8198 
   8199 9.1 Per-Repository Configuration
   8200 ================================
   8201 
   8202 Magit can be configured on a per-repository level using both Git
   8203 variables as well as Emacs options.
   8204 
   8205    To set a Git variable for one repository only, simply set it in
   8206 ‘/path/to/repo/.git/config’ instead of ‘$HOME/.gitconfig’ or
   8207 ‘/etc/gitconfig’.  See *note (gitman)git-config::.
   8208 
   8209    Similarly, Emacs options can be set for one repository only by
   8210 editing ‘/path/to/repo/.dir-locals.el’.  See *note (emacs)Directory
   8211 Variables::.  For example to disable automatic refreshes of
   8212 file-visiting buffers in just one huge repository use this:
   8213 
   8214    • ‘/path/to/huge/repo/.dir-locals.el’
   8215 
   8216           ((nil . ((magit-refresh-buffers . nil))))
   8217 
   8218    It might only be costly to insert certain information into Magit
   8219 buffers for repositories that are exceptionally large, in which case you
   8220 can disable the respective section inserters just for that repository:
   8221 
   8222    • ‘/path/to/tag/invested/repo/.dir-locals.el’
   8223 
   8224           ((magit-status-mode
   8225             . ((eval . (magit-disable-section-inserter 'magit-insert-tags-header)))))
   8226 
   8227  -- Function: magit-disable-section-inserter fn
   8228      This function disables the section inserter FN in the current
   8229      repository.  It is only intended for use in ‘.dir-locals.el’ and
   8230      ‘.dir-locals-2.el’.
   8231 
   8232    If you want to apply the same settings to several, but not all,
   8233 repositories then keeping the repository-local config files in sync
   8234 would quickly become annoying.  To avoid that you can create config
   8235 files for certain classes of repositories (e.g., "huge repositories")
   8236 and then include those files in the per-repository config files.  For
   8237 example:
   8238 
   8239    • ‘/path/to/huge/repo/.git/config’
   8240 
   8241           [include]
   8242                   path = /path/to/huge-gitconfig
   8243 
   8244    • ‘/path/to/huge-gitconfig’
   8245 
   8246           [status]
   8247                   showUntrackedFiles = no
   8248 
   8249    • ‘$HOME/.emacs.d/init.el’
   8250 
   8251           (dir-locals-set-class-variables 'huge-git-repository
   8252              '((nil . ((magit-refresh-buffers . nil)))))
   8253 
   8254           (dir-locals-set-directory-class
   8255              "/path/to/huge/repo/" 'huge-git-repository)
   8256 
   8257 
   8258 File: magit.info,  Node: Essential Settings,  Prev: Per-Repository Configuration,  Up: Customizing
   8259 
   8260 9.2 Essential Settings
   8261 ======================
   8262 
   8263 The next three sections list and discuss several variables that many
   8264 users might want to customize, for safety and/or performance reasons.
   8265 
   8266 * Menu:
   8267 
   8268 * Safety::
   8269 * Performance::
   8270 * Global Bindings::
   8271 
   8272 
   8273 File: magit.info,  Node: Safety,  Next: Performance,  Up: Essential Settings
   8274 
   8275 9.2.1 Safety
   8276 ------------
   8277 
   8278 This section discusses various variables that you might want to change
   8279 (or *not* change) for safety reasons.
   8280 
   8281    Git keeps *committed* changes around long enough for users to recover
   8282 changes they have accidentally been deleted.  It does not do the same
   8283 for *uncommitted* changes in the working tree and not even the index
   8284 (the staging area).  Because Magit makes it so easy to modify
   8285 uncommitted changes, it also makes it easy to shoot yourself in the foot
   8286 in the process.  For that reason Magit provides three global modes that
   8287 save *tracked* files to work-in-progress references after or before
   8288 certain actions.  See *note Wip Modes::.
   8289 
   8290    These modes are not enabled by default because of performance
   8291 concerns.  Instead a lot of potentially destructive commands require
   8292 confirmation every time they are used.  In many cases this can be
   8293 disabled by adding a symbol to ‘magit-no-confirm’ (see *note Completion
   8294 and Confirmation::).  If you enable the various wip modes then you
   8295 should add ‘safe-with-wip’ to this list.
   8296 
   8297    Similarly it isn’t necessary to require confirmation before moving a
   8298 file to the system trash - if you trashed a file by mistake then you can
   8299 recover it from there.  Option ‘magit-delete-by-moving-to-trash’
   8300 controls whether the system trash is used, which is the case by default.
   8301 Nevertheless, ‘trash’ isn’t a member of ‘magit-no-confirm’ - you might
   8302 want to change that.
   8303 
   8304    By default buffers visiting files are automatically reverted when the
   8305 visited file changes on disk.  This isn’t as risky as it might seem, but
   8306 to make an informed decision you should see *note Risk of Reverting
   8307 Automatically::.
   8308 
   8309 
   8310 File: magit.info,  Node: Performance,  Next: Global Bindings,  Prev: Safety,  Up: Essential Settings
   8311 
   8312 9.2.2 Performance
   8313 -----------------
   8314 
   8315 After Magit has run ‘git’ for side-effects, it also refreshes the
   8316 current Magit buffer and the respective status buffer.  This is
   8317 necessary because otherwise outdated information might be displayed
   8318 without the user noticing.  Magit buffers are updated by recreating
   8319 their content from scratch, which makes updating simpler and less
   8320 error-prone, but also more costly.  Keeping it simple and just
   8321 re-creating everything from scratch is an old design decision and
   8322 departing from that will require major refactoring.
   8323 
   8324    Meanwhile you can tell Magit to only automatically refresh the
   8325 current Magit buffer, but not the status buffer.  If you do that, then
   8326 the status buffer is only refreshed automatically if it is the current
   8327 buffer.
   8328 
   8329      (setq magit-refresh-status-buffer nil)
   8330 
   8331    You should also check whether any third-party packages have added
   8332 anything to ‘magit-refresh-buffer-hook’, ‘magit-pre-refresh-hook’, and
   8333 ‘magit-post-refresh-hook’.  If so, then check whether those additions
   8334 impact performance significantly.
   8335 
   8336    Magit can be told to refresh buffers verbosely using ‘M-x
   8337 magit-toggle-verbose-refresh’.  Enabling this helps figuring out which
   8338 sections are bottlenecks.  Each line printed to the ‘*Messages*’ buffer
   8339 contains a section name, the number of seconds it took to show this
   8340 section, and from 0 to 2 exclamation marks: the more exclamation marks
   8341 the slower the section is.
   8342 
   8343    Magit also reverts buffers for visited files located inside the
   8344 current repository when the visited file changes on disk.  That is
   8345 implemented on top of ‘auto-revert-mode’ from the built-in library
   8346 ‘autorevert’.  To figure out whether that impacts performance, check
   8347 whether performance is significantly worse, when many buffers exist
   8348 and/or when some buffers visit files using TRAMP.  If so, then this
   8349 should help.
   8350 
   8351      (setq auto-revert-buffer-list-filter
   8352            'magit-auto-revert-repository-buffer-p)
   8353 
   8354    For alternative approaches see *note Automatic Reverting of
   8355 File-Visiting Buffers::.
   8356 
   8357    If you have enabled any features that are disabled by default, then
   8358 you should check whether they impact performance significantly.  It’s
   8359 likely that they were not enabled by default because it is known that
   8360 they reduce performance at least in large repositories.
   8361 
   8362    If performance is only slow inside certain unusually large
   8363 repositories, then you might want to disable certain features on a
   8364 per-repository or per-repository-class basis only.  See *note
   8365 Per-Repository Configuration::.  For example it takes a long time to
   8366 determine the next and current tag in repository with exceptional
   8367 numbers of tags.  It would therefore be a good idea to disable
   8368 ‘magit-insert-tags-headers’, as explained at the mentioned node.
   8369 
   8370 * Menu:
   8371 
   8372 * Microsoft Windows Performance::
   8373 * MacOS Performance::
   8374 
   8375 Log Performance
   8376 ...............
   8377 
   8378 When showing logs, Magit limits the number of commits initially shown in
   8379 the hope that this avoids unnecessary work.  When ‘--graph’ is used,
   8380 then this unfortunately does not have the desired effect for large
   8381 histories.  Junio, Git’s maintainer, said on the git mailing list
   8382 (<https://www.spinics.net/lists/git/msg232230.html>): "‘--graph’ wants
   8383 to compute the whole history and the max-count only affects the output
   8384 phase after ‘--graph’ does its computation".
   8385 
   8386    In other words, it’s not that Git is slow at outputting the
   8387 differences, or that Magit is slow at parsing the output - the problem
   8388 is that Git first goes outside and has a smoke.
   8389 
   8390    We actually work around this issue by limiting the number of commits
   8391 not only by using ‘-<N>’ but by also using a range.  But unfortunately
   8392 that’s not always possible.
   8393 
   8394    When more than a few thousand commits are shown, then the use of
   8395 ‘--graph’ can slow things down.
   8396 
   8397    Using ‘--color --graph’ is even slower.  Magit uses code that is part
   8398 of Emacs to turn control characters into faces.  That code is pretty
   8399 slow and this is quite noticeable when showing a log with many branches
   8400 and merges.  For that reason ‘--color’ is not enabled by default
   8401 anymore.  Consider leaving it at that.
   8402 
   8403 Diff Performance
   8404 ................
   8405 
   8406 If diffs are slow, then consider turning off some optional diff features
   8407 by setting all or some of the following variables to ‘nil’:
   8408 ‘magit-diff-highlight-indentation’, ‘magit-diff-highlight-trailing’,
   8409 ‘magit-diff-paint-whitespace’, ‘magit-diff-highlight-hunk-body’, and
   8410 ‘magit-diff-refine-hunk’.
   8411 
   8412    When showing a commit instead of some arbitrary diff, then some
   8413 additional information is displayed.  Calculating this information can
   8414 be quite expensive given certain circumstances.  If looking at a commit
   8415 using ‘magit-revision-mode’ takes considerably more time than looking at
   8416 the same commit in ‘magit-diff-mode’, then consider setting
   8417 ‘magit-revision-insert-related-refs’ to ‘nil’.
   8418 
   8419    When you are often confronted with diffs that contain deleted files,
   8420 then you might want to enable the ‘--irreversible-delete’ argument.  If
   8421 you do that then diffs still show that a file was deleted but without
   8422 also showing the complete deleted content of the file.  This argument is
   8423 not available by default, see *note (transient)Enabling and Disabling
   8424 Suffixes::.  Once you have done that you should enable it and save that
   8425 setting, see *note (transient)Saving Values::.  You should do this in
   8426 both the diff (‘d’) and the diff refresh (‘D’) transient popups.
   8427 
   8428 Refs Buffer Performance
   8429 .......................
   8430 
   8431 When refreshing the "references buffer" is slow, then that’s usually
   8432 because several hundred refs are being displayed.  The best way to
   8433 address that is to display fewer refs, obviously.
   8434 
   8435    If you are not, or only mildly, interested in seeing the list of
   8436 tags, then start by not displaying them:
   8437 
   8438      (remove-hook 'magit-refs-sections-hook 'magit-insert-tags)
   8439 
   8440    Then you should also make sure that the listed remote branches
   8441 actually all exist.  You can do so by pruning branches which no longer
   8442 exist using ‘f-pa’.
   8443 
   8444 Committing Performance
   8445 ......................
   8446 
   8447 When you initiate a commit, then Magit by default automatically shows a
   8448 diff of the changes you are about to commit.  For large commits this can
   8449 take a long time, which is especially distracting when you are
   8450 committing large amounts of generated data which you don’t actually
   8451 intend to inspect before committing.  This behavior can be turned off
   8452 using:
   8453 
   8454      (remove-hook 'server-switch-hook 'magit-commit-diff)
   8455      (remove-hook 'with-editor-filter-visit-hook 'magit-commit-diff)
   8456 
   8457    Then you can type ‘C-c C-d’ to show the diff when you actually want
   8458 to see it, but only then.  Alternatively you can leave the hook alone
   8459 and just type ‘C-g’ in those cases when it takes too long to generate
   8460 the diff.  If you do that, then you will end up with a broken diff
   8461 buffer, but doing it this way has the advantage that you usually get to
   8462 see the diff, which is useful because it increases the odds that you
   8463 spot potential issues.
   8464 
   8465 
   8466 File: magit.info,  Node: Microsoft Windows Performance,  Next: MacOS Performance,  Up: Performance
   8467 
   8468 Microsoft Windows Performance
   8469 .............................
   8470 
   8471 In order to update the status buffer, ‘git’ has to be run a few dozen
   8472 times.  That is problematic on Microsoft Windows, because that operating
   8473 system is exceptionally slow at starting processes.  Sadly this is an
   8474 issue that can only be fixed by Microsoft itself, and they don’t appear
   8475 to be particularly interested in doing so.
   8476 
   8477    Beside the subprocess issue, there are also other Windows-specific
   8478 performance issues.  Some of these have workarounds.  The maintainers of
   8479 "Git for Windows" try to improve performance on Windows.  Always use the
   8480 latest release in order to benefit from the latest performance tweaks.
   8481 Magit too tries to work around some Windows-specific issues.
   8482 
   8483    According to some sources, setting the following Git variables can
   8484 also help.
   8485 
   8486      git config --global core.preloadindex true   # default since v2.1
   8487      git config --global core.fscache true        # default since v2.8
   8488      git config --global gc.auto 256
   8489 
   8490    You should also check whether an anti-virus program is affecting
   8491 performance.
   8492 
   8493 
   8494 File: magit.info,  Node: MacOS Performance,  Prev: Microsoft Windows Performance,  Up: Performance
   8495 
   8496 MacOS Performance
   8497 .................
   8498 
   8499 Before Emacs 26.1 child processes were created using ‘fork’ on macOS.
   8500 That needlessly copied GUI resources, which is expensive.  The result
   8501 was that forking took about 30 times as long on Darwin than on Linux,
   8502 and because Magit starts many ‘git’ processes that made quite a
   8503 difference.
   8504 
   8505    So make sure that you are using at least Emacs 26.1, in which case
   8506 the faster ‘vfork’ will be used.  (The creation of child processes still
   8507 takes about twice as long on Darwin compared to Linux.)  See (1) for
   8508 more information.
   8509 
   8510    Additionally, ‘git’ installed from a package manager like ‘brew’ or
   8511 ‘nix’ seems to be slower than the native executable.  Profile the ‘git’
   8512 executable you’re running against the one at ‘/usr/bin/git’, and if you
   8513 notice a notable difference try using the latter as
   8514 ‘magit-git-executable’.
   8515 
   8516    ---------- Footnotes ----------
   8517 
   8518    (1) 
   8519 <https://lists.gnu.org/archive/html/bug-gnu-emacs/2017-04/msg00201.html>
   8520 
   8521 
   8522 File: magit.info,  Node: Global Bindings,  Prev: Performance,  Up: Essential Settings
   8523 
   8524 9.2.3 Global Bindings
   8525 ---------------------
   8526 
   8527  -- User Option: magit-define-global-key-bindings
   8528      This option controls which set of Magit key bindings, if any, may
   8529      be added to the global keymap, even before Magit is first used in
   8530      the current Emacs session.
   8531 
   8532         • If the value is ‘nil’, no bindings are added.
   8533 
   8534         • If ‘default’, maybe add:
   8535 
   8536           ‘C-x g’     ‘magit-status’
   8537           ‘C-x M-g’   ‘magit-dispatch’
   8538           ‘C-c M-g’   ‘magit-file-dispatch’
   8539 
   8540         • If ‘recommended’, maybe add:
   8541 
   8542           ‘C-x g’   ‘magit-status’
   8543           ‘C-c g’   ‘magit-dispatch’
   8544           ‘C-c f’   ‘magit-file-dispatch’
   8545 
   8546           These bindings are strongly recommended, but we cannot use
   8547           them by default, because the ‘C-c <LETTER>’ namespace is
   8548           strictly reserved for bindings added by the user (see *note
   8549           (elisp)Key Binding Conventions::).
   8550 
   8551      The bindings in the chosen set may be added when ‘after-init-hook’
   8552      is run.  Each binding is added if, and only if, at that time no
   8553      other key is bound to the same command, and no other command is
   8554      bound to the same key.  In other words we try to avoid adding
   8555      bindings that are unnecessary, as well as bindings that conflict
   8556      with other bindings.
   8557 
   8558      Adding these bindings is delayed until ‘after-init-hook’ is run to
   8559      allow users to set the variable anywhere in their init file
   8560      (without having to make sure to do so before ‘magit’ is loaded or
   8561      autoloaded) and to increase the likelihood that all the potentially
   8562      conflicting user bindings have already been added.
   8563 
   8564      To set this variable use either ‘setq’ or the Custom interface.  Do
   8565      not use the function ‘customize-set-variable’ because doing that
   8566      would cause Magit to be loaded immediately, when that form is
   8567      evaluated (this differs from ‘custom-set-variables’, which doesn’t
   8568      load the libraries that define the customized variables).
   8569 
   8570      Setting this variable has no effect if ‘after-init-hook’ has
   8571      already been run.
   8572 
   8573 
   8574 File: magit.info,  Node: Plumbing,  Next: FAQ,  Prev: Customizing,  Up: Top
   8575 
   8576 10 Plumbing
   8577 ***********
   8578 
   8579 The following sections describe how to use several of Magit’s core
   8580 abstractions to extend Magit itself or implement a separate extension.
   8581 
   8582    A few of the low-level features used by Magit have been factored out
   8583 into separate libraries/packages, so that they can be used by other
   8584 packages, without having to depend on Magit.  See *note
   8585 (with-editor)Top:: for information about ‘with-editor’.  ‘transient’
   8586 doesn’t have a manual yet.
   8587 
   8588    If you are trying to find an unused key that you can bind to a
   8589 command provided by your own Magit extension, then checkout
   8590 <https://github.com/magit/magit/wiki/Plugin-Dispatch-Key-Registry>.
   8591 
   8592 * Menu:
   8593 
   8594 * Calling Git::
   8595 * Section Plumbing::
   8596 * Refreshing Buffers::
   8597 * Conventions::
   8598 
   8599 
   8600 File: magit.info,  Node: Calling Git,  Next: Section Plumbing,  Up: Plumbing
   8601 
   8602 10.1 Calling Git
   8603 ================
   8604 
   8605 Magit provides many specialized functions for calling Git.  All of these
   8606 functions are defined in either ‘magit-git.el’ or ‘magit-process.el’ and
   8607 have one of the prefixes ‘magit-run-’, ‘magit-call-’, ‘magit-start-’, or
   8608 ‘magit-git-’ (which is also used for other things).
   8609 
   8610    All of these functions accept an indefinite number of arguments,
   8611 which are strings that specify command line arguments for Git (or in
   8612 some cases an arbitrary executable).  These arguments are flattened
   8613 before being passed on to the executable; so instead of strings they can
   8614 also be lists of strings and arguments that are ‘nil’ are silently
   8615 dropped.  Some of these functions also require a single mandatory
   8616 argument before these command line arguments.
   8617 
   8618    Roughly speaking, these functions run Git either to get some value or
   8619 for side-effects.  The functions that return a value are useful to
   8620 collect the information necessary to populate a Magit buffer, while the
   8621 others are used to implement Magit commands.
   8622 
   8623    The functions in the value-only group always run synchronously, and
   8624 they never trigger a refresh.  The function in the side-effect group can
   8625 be further divided into subgroups depending on whether they run Git
   8626 synchronously or asynchronously, and depending on whether they trigger a
   8627 refresh when the executable has finished.
   8628 
   8629 * Menu:
   8630 
   8631 * Getting a Value from Git::
   8632 * Calling Git for Effect::
   8633 
   8634 
   8635 File: magit.info,  Node: Getting a Value from Git,  Next: Calling Git for Effect,  Up: Calling Git
   8636 
   8637 10.1.1 Getting a Value from Git
   8638 -------------------------------
   8639 
   8640 These functions run Git in order to get a value, an exit status, or
   8641 output.  Of course you could also use them to run Git commands that have
   8642 side-effects, but that should be avoided.
   8643 
   8644  -- Function: magit-git-exit-code &rest args
   8645      Executes git with ARGS and returns its exit code.
   8646 
   8647  -- Function: magit-git-success &rest args
   8648      Executes git with ARGS and returns ‘t’ if the exit code is ‘0’,
   8649      ‘nil’ otherwise.
   8650 
   8651  -- Function: magit-git-failure &rest args
   8652      Executes git with ARGS and returns ‘t’ if the exit code is ‘1’,
   8653      ‘nil’ otherwise.
   8654 
   8655  -- Function: magit-git-true &rest args
   8656      Executes git with ARGS and returns ‘t’ if the first line printed by
   8657      git is the string "true", ‘nil’ otherwise.
   8658 
   8659  -- Function: magit-git-false &rest args
   8660      Executes git with ARGS and returns ‘t’ if the first line printed by
   8661      git is the string "false", ‘nil’ otherwise.
   8662 
   8663  -- Function: magit-git-insert &rest args
   8664      Executes git with ARGS and inserts its output at point.
   8665 
   8666  -- Function: magit-git-string &rest args
   8667      Executes git with ARGS and returns the first line of its output.
   8668      If there is no output or if it begins with a newline character,
   8669      then this returns ‘nil’.
   8670 
   8671  -- Function: magit-git-lines &rest args
   8672      Executes git with ARGS and returns its output as a list of lines.
   8673      Empty lines anywhere in the output are omitted.
   8674 
   8675  -- Function: magit-git-items &rest args
   8676      Executes git with ARGS and returns its null-separated output as a
   8677      list.  Empty items anywhere in the output are omitted.
   8678 
   8679      If the value of option ‘magit-git-debug’ is non-nil and git exits
   8680      with a non-zero exit status, then warn about that in the echo area
   8681      and add a section containing git’s standard error in the current
   8682      repository’s process buffer.
   8683 
   8684  -- Function: magit-process-git destination &rest args
   8685      Calls Git synchronously in a separate process, returning its exit
   8686      code.  DESTINATION specifies how to handle the output, like for
   8687      ‘call-process’, except that file handlers are supported.  Enables
   8688      Cygwin’s "noglob" option during the call and ensures unix eol
   8689      conversion.
   8690 
   8691  -- Function: magit-process-file process &optional infile buffer display
   8692           &rest args
   8693      Processes files synchronously in a separate process.  Identical to
   8694      ‘process-file’ but temporarily enables Cygwin’s "noglob" option
   8695      during the call and ensures unix eol conversion.
   8696 
   8697    If an error occurs when using one of the above functions, then that
   8698 is usually due to a bug, i.e., using an argument which is not actually
   8699 supported.  Such errors are usually not reported, but when they occur we
   8700 need to be able to debug them.
   8701 
   8702  -- User Option: magit-git-debug
   8703      Whether to report errors that occur when using ‘magit-git-insert’,
   8704      ‘magit-git-string’, ‘magit-git-lines’, or ‘magit-git-items’.  This
   8705      does not actually raise an error.  Instead a message is shown in
   8706      the echo area, and git’s standard error is insert into a new
   8707      section in the current repository’s process buffer.
   8708 
   8709  -- Function: magit-git-str &rest args
   8710      This is a variant of ‘magit-git-string’ that ignores the option
   8711      ‘magit-git-debug’.  It is mainly intended to be used while handling
   8712      errors in functions that do respect that option.  Using such a
   8713      function while handing an error could cause yet another error and
   8714      therefore lead to an infinite recursion.  You probably won’t ever
   8715      need to use this function.
   8716 
   8717 
   8718 File: magit.info,  Node: Calling Git for Effect,  Prev: Getting a Value from Git,  Up: Calling Git
   8719 
   8720 10.1.2 Calling Git for Effect
   8721 -----------------------------
   8722 
   8723 These functions are used to run git to produce some effect.  Most Magit
   8724 commands that actually run git do so by using such a function.
   8725 
   8726    Because we do not need to consume git’s output when using these
   8727 functions, their output is instead logged into a per-repository buffer,
   8728 which can be shown using ‘$’ from a Magit buffer or ‘M-x magit-process’
   8729 elsewhere.
   8730 
   8731    These functions can have an effect in two distinct ways.  Firstly,
   8732 running git may change something, i.e., create or push a new commit.
   8733 Secondly, that change may require that Magit buffers are refreshed to
   8734 reflect the changed state of the repository.  But refreshing isn’t
   8735 always desirable, so only some of these functions do perform such a
   8736 refresh after git has returned.
   8737 
   8738    Sometimes it is useful to run git asynchronously.  For example, when
   8739 the user has just initiated a push, then there is no reason to make her
   8740 wait until that has completed.  In other cases it makes sense to wait
   8741 for git to complete before letting the user do something else.  For
   8742 example after staging a change it is useful to wait until after the
   8743 refresh because that also automatically moves to the next change.
   8744 
   8745  -- Function: magit-call-git &rest args
   8746      Calls git synchronously with ARGS.
   8747 
   8748  -- Function: magit-call-process program &rest args
   8749      Calls PROGRAM synchronously with ARGS.
   8750 
   8751  -- Function: magit-run-git &rest args
   8752      Calls git synchronously with ARGS and then refreshes.
   8753 
   8754  -- Function: magit-run-git-with-input &rest args
   8755      Calls git synchronously with ARGS and sends it the content of the
   8756      current buffer on standard input.
   8757 
   8758      If the current buffer’s ‘default-directory’ is on a remote
   8759      filesystem, this function actually runs git asynchronously.  But
   8760      then it waits for the process to return, so the function itself is
   8761      synchronous.
   8762 
   8763  -- Function: magit-git &rest args
   8764      Calls git synchronously with ARGS for side-effects only.  This
   8765      function does not refresh the buffer.
   8766 
   8767  -- Function: magit-git-wash washer &rest args
   8768      Execute Git with ARGS, inserting washed output at point.  Actually
   8769      first insert the raw output at point.  If there is no output call
   8770      ‘magit-cancel-section’.  Otherwise temporarily narrow the buffer to
   8771      the inserted text, move to its beginning, and then call function
   8772      WASHER with ARGS as its sole argument.
   8773 
   8774    And now for the asynchronous variants.
   8775 
   8776  -- Function: magit-run-git-async &rest args
   8777      Start Git, prepare for refresh, and return the process object.
   8778      ARGS is flattened and then used as arguments to Git.
   8779 
   8780      Display the command line arguments in the echo area.
   8781 
   8782      After Git returns some buffers are refreshed: the buffer that was
   8783      current when this function was called (if it is a Magit buffer and
   8784      still alive), as well as the respective Magit status buffer.
   8785      Unmodified buffers visiting files that are tracked in the current
   8786      repository are reverted if ‘magit-revert-buffers’ is non-nil.
   8787 
   8788  -- Function: magit-run-git-with-editor &rest args
   8789      Export GIT_EDITOR and start Git.  Also prepare for refresh and
   8790      return the process object.  ARGS is flattened and then used as
   8791      arguments to Git.
   8792 
   8793      Display the command line arguments in the echo area.
   8794 
   8795      After Git returns some buffers are refreshed: the buffer that was
   8796      current when this function was called (if it is a Magit buffer and
   8797      still alive), as well as the respective Magit status buffer.
   8798 
   8799  -- Function: magit-start-git input &rest args
   8800      Start Git, prepare for refresh, and return the process object.
   8801 
   8802      If INPUT is non-nil, it has to be a buffer or the name of an
   8803      existing buffer.  The buffer content becomes the processes standard
   8804      input.
   8805 
   8806      Option ‘magit-git-executable’ specifies the Git executable and
   8807      option ‘magit-git-global-arguments’ specifies constant arguments.
   8808      The remaining arguments ARGS specify arguments to Git.  They are
   8809      flattened before use.
   8810 
   8811      After Git returns, some buffers are refreshed: the buffer that was
   8812      current when this function was called (if it is a Magit buffer and
   8813      still alive), as well as the respective Magit status buffer.
   8814      Unmodified buffers visiting files that are tracked in the current
   8815      repository are reverted if ‘magit-revert-buffers’ is non-nil.
   8816 
   8817  -- Function: magit-start-process &rest args
   8818      Start PROGRAM, prepare for refresh, and return the process object.
   8819 
   8820      If optional argument INPUT is non-nil, it has to be a buffer or the
   8821      name of an existing buffer.  The buffer content becomes the
   8822      processes standard input.
   8823 
   8824      The process is started using ‘start-file-process’ and then setup to
   8825      use the sentinel ‘magit-process-sentinel’ and the filter
   8826      ‘magit-process-filter’.  Information required by these functions is
   8827      stored in the process object.  When this function returns the
   8828      process has not started to run yet so it is possible to override
   8829      the sentinel and filter.
   8830 
   8831      After the process returns, ‘magit-process-sentinel’ refreshes the
   8832      buffer that was current when ‘magit-start-process’ was called (if
   8833      it is a Magit buffer and still alive), as well as the respective
   8834      Magit status buffer.  Unmodified buffers visiting files that are
   8835      tracked in the current repository are reverted if
   8836      ‘magit-revert-buffers’ is non-nil.
   8837 
   8838  -- Variable: magit-this-process
   8839      The child process which is about to start.  This can be used to
   8840      change the filter and sentinel.
   8841 
   8842  -- Variable: magit-process-raise-error
   8843      When this is non-nil, then ‘magit-process-sentinel’ raises an error
   8844      if git exits with a non-zero exit status.  For debugging purposes.
   8845 
   8846 
   8847 File: magit.info,  Node: Section Plumbing,  Next: Refreshing Buffers,  Prev: Calling Git,  Up: Plumbing
   8848 
   8849 10.2 Section Plumbing
   8850 =====================
   8851 
   8852 * Menu:
   8853 
   8854 * Creating Sections::
   8855 * Section Selection::
   8856 * Matching Sections::
   8857 
   8858 
   8859 File: magit.info,  Node: Creating Sections,  Next: Section Selection,  Up: Section Plumbing
   8860 
   8861 10.2.1 Creating Sections
   8862 ------------------------
   8863 
   8864  -- Macro: magit-insert-section &rest args
   8865      Insert a section at point.
   8866 
   8867      TYPE is the section type, a symbol.  Many commands that act on the
   8868      current section behave differently depending on that type.  Also if
   8869      a variable ‘magit-TYPE-section-map’ exists, then use that as the
   8870      text-property ‘keymap’ of all text belonging to the section (but
   8871      this may be overwritten in subsections).  TYPE can also have the
   8872      form ‘(eval FORM)’ in which case FORM is evaluated at runtime.
   8873 
   8874      Optional VALUE is the value of the section, usually a string that
   8875      is required when acting on the section.
   8876 
   8877      When optional HIDE is non-nil collapse the section body by default,
   8878      i.e., when first creating the section, but not when refreshing the
   8879      buffer.  Otherwise, expand it by default.  This can be overwritten
   8880      using ‘magit-section-set-visibility-hook’.  When a section is
   8881      recreated during a refresh, then the visibility of predecessor is
   8882      inherited and HIDE is ignored (but the hook is still honored).
   8883 
   8884      BODY is any number of forms that actually insert the section’s
   8885      heading and body.  Optional NAME, if specified, has to be a symbol,
   8886      which is then bound to the struct of the section being inserted.
   8887 
   8888      Before BODY is evaluated the ‘start’ of the section object is set
   8889      to the value of ‘point’ and after BODY was evaluated its ‘end’ is
   8890      set to the new value of ‘point’; BODY is responsible for moving
   8891      ‘point’ forward.
   8892 
   8893      If it turns out inside BODY that the section is empty, then
   8894      ‘magit-cancel-section’ can be used to abort and remove all traces
   8895      of the partially inserted section.  This can happen when creating a
   8896      section by washing Git’s output and Git didn’t actually output
   8897      anything this time around.
   8898 
   8899  -- Function: magit-insert-heading &rest args
   8900      Insert the heading for the section currently being inserted.
   8901 
   8902      This function should only be used inside ‘magit-insert-section’.
   8903 
   8904      When called without any arguments, then just set the ‘content’ slot
   8905      of the object representing the section being inserted to a marker
   8906      at ‘point’.  The section should only contain a single line when
   8907      this function is used like this.
   8908 
   8909      When called with arguments ARGS, which have to be strings, then
   8910      insert those strings at point.  The section should not contain any
   8911      text before this happens and afterwards it should again only
   8912      contain a single line.  If the ‘face’ property is set anywhere
   8913      inside any of these strings, then insert all of them unchanged.
   8914      Otherwise use the ‘magit-section-heading’ face for all inserted
   8915      text.
   8916 
   8917      The ‘content’ property of the section struct is the end of the
   8918      heading (which lasts from ‘start’ to ‘content’) and the beginning
   8919      of the body (which lasts from ‘content’ to ‘end’).  If the value of
   8920      ‘content’ is nil, then the section has no heading and its body
   8921      cannot be collapsed.  If a section does have a heading then its
   8922      height must be exactly one line, including a trailing newline
   8923      character.  This isn’t enforced; you are responsible for getting it
   8924      right.  The only exception is that this function does insert a
   8925      newline character if necessary.
   8926 
   8927  -- Function: magit-cancel-section
   8928      Cancel the section currently being inserted.  This exits the
   8929      innermost call to ‘magit-insert-section’ and removes all traces of
   8930      what has already happened inside that call.
   8931 
   8932  -- Function: magit-define-section-jumper sym title &optional value
   8933      Define an interactive function to go to section SYM.  TITLE is the
   8934      displayed title of the section.
   8935 
   8936 
   8937 File: magit.info,  Node: Section Selection,  Next: Matching Sections,  Prev: Creating Sections,  Up: Section Plumbing
   8938 
   8939 10.2.2 Section Selection
   8940 ------------------------
   8941 
   8942  -- Function: magit-current-section
   8943      Return the section at point.
   8944 
   8945  -- Function: magit-region-sections &optional condition multiple
   8946      Return a list of the selected sections.
   8947 
   8948      When the region is active and constitutes a valid section
   8949      selection, then return a list of all selected sections.  This is
   8950      the case when the region begins in the heading of a section and
   8951      ends in the heading of the same section or in that of a sibling
   8952      section.  If optional MULTIPLE is non-nil, then the region cannot
   8953      begin and end in the same section.
   8954 
   8955      When the selection is not valid, then return nil.  In this case,
   8956      most commands that can act on the selected sections will instead
   8957      act on the section at point.
   8958 
   8959      When the region looks like it would in any other buffer then the
   8960      selection is invalid.  When the selection is valid then the region
   8961      uses the ‘magit-section-highlight’ face.  This does not apply to
   8962      diffs where things get a bit more complicated, but even here if the
   8963      region looks like it usually does, then that’s not a valid
   8964      selection as far as this function is concerned.
   8965 
   8966      If optional CONDITION is non-nil, then the selection not only has
   8967      to be valid; all selected sections additionally have to match
   8968      CONDITION, or nil is returned.  See ‘magit-section-match’ for the
   8969      forms CONDITION can take.
   8970 
   8971  -- Function: magit-region-values &optional condition multiple
   8972      Return a list of the values of the selected sections.
   8973 
   8974      Return the values that themselves would be returned by
   8975      ‘magit-region-sections’ (which see).
   8976 
   8977 
   8978 File: magit.info,  Node: Matching Sections,  Prev: Section Selection,  Up: Section Plumbing
   8979 
   8980 10.2.3 Matching Sections
   8981 ------------------------
   8982 
   8983 ‘M-x magit-describe-section-briefly’
   8984      Show information about the section at point.  This command is
   8985      intended for debugging purposes.
   8986 
   8987  -- Function: magit-section-ident section
   8988      Return an unique identifier for SECTION.  The return value has the
   8989      form ‘((TYPE . VALUE)...)’.
   8990 
   8991  -- Function: magit-get-section ident &optional root
   8992      Return the section identified by IDENT.  IDENT has to be a list as
   8993      returned by ‘magit-section-ident’.
   8994 
   8995  -- Function: magit-section-match condition &optional section
   8996      Return ‘t’ if SECTION matches CONDITION.  SECTION defaults to the
   8997      section at point.  If SECTION is not specified and there also is no
   8998      section at point, then return ‘nil’.
   8999 
   9000      CONDITION can take the following forms:
   9001         • ‘(CONDITION...)’
   9002 
   9003           matches if any of the CONDITIONs matches.
   9004 
   9005         • ‘[CLASS...]’
   9006 
   9007           matches if the section’s class is the same as the first CLASS
   9008           or a subclass of that; the section’s parent class matches the
   9009           second CLASS; and so on.
   9010 
   9011         • ‘[* CLASS...]’
   9012 
   9013           matches sections that match ‘[CLASS...]’ and also recursively
   9014           all their child sections.
   9015 
   9016         • ‘CLASS’
   9017 
   9018           matches if the section’s class is the same as CLASS or a
   9019           subclass of that; regardless of the classes of the parent
   9020           sections.
   9021 
   9022      Each CLASS should be a class symbol, identifying a class that
   9023      derives from ‘magit-section’.  For backward compatibility CLASS can
   9024      also be a "type symbol".  A section matches such a symbol if the
   9025      value of its ‘type’ slot is ‘eq’.  If a type symbol has an entry in
   9026      ‘magit--section-type-alist’, then a section also matches that type
   9027      if its class is a subclass of the class that corresponds to the
   9028      type as per that alist.
   9029 
   9030      Note that it is not necessary to specify the complete section
   9031      lineage as printed by ‘magit-describe-section-briefly’, unless of
   9032      course you want to be that precise.
   9033 
   9034  -- Function: magit-section-value-if condition &optional section
   9035      If the section at point matches CONDITION, then return its value.
   9036 
   9037      If optional SECTION is non-nil then test whether that matches
   9038      instead.  If there is no section at point and SECTION is nil, then
   9039      return nil.  If the section does not match, then return nil.
   9040 
   9041      See ‘magit-section-match’ for the forms CONDITION can take.
   9042 
   9043  -- Function: magit-section-case &rest clauses
   9044      Choose among clauses on the type of the section at point.
   9045 
   9046      Each clause looks like (CONDITION BODY...).  The type of the
   9047      section is compared against each CONDITION; the BODY forms of the
   9048      first match are evaluated sequentially and the value of the last
   9049      form is returned.  Inside BODY the symbol ‘it’ is bound to the
   9050      section at point.  If no clause succeeds or if there is no section
   9051      at point return nil.
   9052 
   9053      See ‘magit-section-match’ for the forms CONDITION can take.
   9054      Additionally a CONDITION of t is allowed in the final clause and
   9055      matches if no other CONDITION match, even if there is no section at
   9056      point.
   9057 
   9058  -- Variable: magit-root-section
   9059      The root section in the current buffer.  All other sections are
   9060      descendants of this section.  The value of this variable is set by
   9061      ‘magit-insert-section’ and you should never modify it.
   9062 
   9063    For diff related sections a few additional tools exist.
   9064 
   9065  -- Function: magit-diff-type &optional section
   9066      Return the diff type of SECTION.
   9067 
   9068      The returned type is one of the symbols ‘staged’, ‘unstaged’,
   9069      ‘committed’, or ‘undefined’.  This type serves a similar purpose as
   9070      the general type common to all sections (which is stored in the
   9071      ‘type’ slot of the corresponding ‘magit-section’ struct) but takes
   9072      additional information into account.  When the SECTION isn’t
   9073      related to diffs and the buffer containing it also isn’t a
   9074      diff-only buffer, then return nil.
   9075 
   9076      Currently the type can also be one of ‘tracked’ and ‘untracked’,
   9077      but these values are not handled explicitly in every place they
   9078      should be.  A possible fix could be to just return nil here.
   9079 
   9080      The section has to be a ‘diff’ or ‘hunk’ section, or a section
   9081      whose children are of type ‘diff’.  If optional SECTION is nil,
   9082      return the diff type for the current section.  In buffers whose
   9083      major mode is ‘magit-diff-mode’ SECTION is ignored and the type is
   9084      determined using other means.  In ‘magit-revision-mode’ buffers the
   9085      type is always ‘committed’.
   9086 
   9087  -- Function: magit-diff-scope &optional section strict
   9088      Return the diff scope of SECTION or the selected section(s).
   9089 
   9090      A diff’s "scope" describes what part of a diff is selected, it is a
   9091      symbol, one of ‘region’, ‘hunk’, ‘hunks’, ‘file’, ‘files’, or
   9092      ‘list’.  Do not confuse this with the diff "type", as returned by
   9093      ‘magit-diff-type’.
   9094 
   9095      If optional SECTION is non-nil, then return the scope of that,
   9096      ignoring the sections selected by the region.  Otherwise return the
   9097      scope of the current section, or if the region is active and
   9098      selects a valid group of diff related sections, the type of these
   9099      sections, i.e., ‘hunks’ or ‘files’.  If SECTION (or if the current
   9100      section that is nil) is a ‘hunk’ section and the region starts and
   9101      ends inside the body of a that section, then the type is ‘region’.
   9102 
   9103      If optional STRICT is non-nil then return nil if the diff type of
   9104      the section at point is ‘untracked’ or the section at point is not
   9105      actually a ‘diff’ but a ‘diffstat’ section.
   9106 
   9107 
   9108 File: magit.info,  Node: Refreshing Buffers,  Next: Conventions,  Prev: Section Plumbing,  Up: Plumbing
   9109 
   9110 10.3 Refreshing Buffers
   9111 =======================
   9112 
   9113 All commands that create a new Magit buffer or change what is being
   9114 displayed in an existing buffer do so by calling ‘magit-mode-setup’.
   9115 Among other things, that function sets the buffer local values of
   9116 ‘default-directory’ (to the top-level of the repository),
   9117 ‘magit-refresh-function’, and ‘magit-refresh-args’.
   9118 
   9119    Buffers are refreshed by calling the function that is the local value
   9120 of ‘magit-refresh-function’ (a function named ‘magit-*-refresh-buffer’,
   9121 where ‘*’ may be something like ‘diff’) with the value of
   9122 ‘magit-refresh-args’ as arguments.
   9123 
   9124  -- Macro: magit-mode-setup buffer switch-func mode refresh-func
   9125           &optional refresh-args
   9126      This function displays and selects BUFFER, turns on MODE, and
   9127      refreshes a first time.
   9128 
   9129      This function displays and optionally selects BUFFER by calling
   9130      ‘magit-mode-display-buffer’ with BUFFER, MODE and SWITCH-FUNC as
   9131      arguments.  Then it sets the local value of
   9132      ‘magit-refresh-function’ to REFRESH-FUNC and that of
   9133      ‘magit-refresh-args’ to REFRESH-ARGS.  Finally it creates the
   9134      buffer content by calling REFRESH-FUNC with REFRESH-ARGS as
   9135      arguments.
   9136 
   9137      All arguments are evaluated before switching to BUFFER.
   9138 
   9139  -- Function: magit-mode-display-buffer buffer mode &optional
   9140           switch-function
   9141      This function display BUFFER in some window and select it.  BUFFER
   9142      may be a buffer or a string, the name of a buffer.  The buffer is
   9143      returned.
   9144 
   9145      Unless BUFFER is already displayed in the selected frame, store the
   9146      previous window configuration as a buffer local value, so that it
   9147      can later be restored by ‘magit-mode-bury-buffer’.
   9148 
   9149      The buffer is displayed and selected using SWITCH-FUNCTION.  If
   9150      that is ‘nil’ then ‘pop-to-buffer’ is used if the current buffer’s
   9151      major mode derives from ‘magit-mode’.  Otherwise ‘switch-to-buffer’
   9152      is used.
   9153 
   9154  -- Variable: magit-refresh-function
   9155      The value of this buffer-local variable is the function used to
   9156      refresh the current buffer.  It is called with ‘magit-refresh-args’
   9157      as arguments.
   9158 
   9159  -- Variable: magit-refresh-args
   9160      The list of arguments used by ‘magit-refresh-function’ to refresh
   9161      the current buffer.  ‘magit-refresh-function’ is called with these
   9162      arguments.
   9163 
   9164      The value is usually set using ‘magit-mode-setup’, but in some
   9165      cases it’s also useful to provide commands that can change the
   9166      value.  For example, the ‘magit-diff-refresh’ transient can be used
   9167      to change any of the arguments used to display the diff, without
   9168      having to specify again which differences should be shown, but
   9169      ‘magit-diff-more-context’, ‘magit-diff-less-context’ and
   9170      ‘magit-diff-default-context’ change just the ‘-U<N>’ argument.  In
   9171      both case this is done by changing the value of this variable and
   9172      then calling this ‘magit-refresh-function’.
   9173 
   9174 
   9175 File: magit.info,  Node: Conventions,  Prev: Refreshing Buffers,  Up: Plumbing
   9176 
   9177 10.4 Conventions
   9178 ================
   9179 
   9180 Also see *note Completion and Confirmation::.
   9181 
   9182 * Menu:
   9183 
   9184 * Theming Faces::
   9185 
   9186 
   9187 File: magit.info,  Node: Theming Faces,  Up: Conventions
   9188 
   9189 10.4.1 Theming Faces
   9190 --------------------
   9191 
   9192 The default theme uses blue for local branches, green for remote
   9193 branches, and goldenrod (brownish yellow) for tags.  When creating a new
   9194 theme, you should probably follow that example.  If your theme already
   9195 uses other colors, then stick to that.
   9196 
   9197    In older releases these reference faces used to have a background
   9198 color and a box around them.  The basic default faces no longer do so,
   9199 to make Magit buffers much less noisy, and you should follow that
   9200 example at least with regards to boxes.  (Boxes were used in the past to
   9201 work around a conflict between the highlighting overlay and text
   9202 property backgrounds.  That’s no longer necessary because highlighting
   9203 no longer causes other background colors to disappear.)  Alternatively
   9204 you can keep the background color and/or box, but then have to take
   9205 special care to adjust ‘magit-branch-current’ accordingly.  By default
   9206 it looks mostly like ‘magit-branch-local’, but with a box (by default
   9207 the former is the only face that uses a box, exactly so that it sticks
   9208 out).  If the former also uses a box, then you have to make sure that it
   9209 differs in some other way from the latter.
   9210 
   9211    The most difficult faces to theme are those related to diffs,
   9212 headings, highlighting, and the region.  There are faces that fall into
   9213 all four groups - expect to spend some time getting this right.
   9214 
   9215    The ‘region’ face in the default theme, in both the light and dark
   9216 variants, as well as in many other themes, distributed with Emacs or by
   9217 third-parties, is very ugly.  It is common to use a background color
   9218 that really sticks out, which is ugly but if that were the only problem
   9219 then it would be acceptable.  Unfortunately many themes also set the
   9220 foreground color, which ensures that all text within the region is
   9221 readable.  Without doing that there might be cases where some foreground
   9222 color is too close to the region background color to still be readable.
   9223 But it also means that text within the region loses all syntax
   9224 highlighting.
   9225 
   9226    I consider the work that went into getting the ‘region’ face right to
   9227 be a good indicator for the general quality of a theme.  My
   9228 recommendation for the ‘region’ face is this: use a background color
   9229 slightly different from the background color of the ‘default’ face, and
   9230 do not set the foreground color at all.  So for a light theme you might
   9231 use a light (possibly tinted) gray as the background color of ‘default’
   9232 and a somewhat darker gray for the background of ‘region’.  That should
   9233 usually be enough to not collide with the foreground color of any other
   9234 face.  But if some other faces also set a light gray as background
   9235 color, then you should also make sure it doesn’t collide with those (in
   9236 some cases it might be acceptable though).
   9237 
   9238    Magit only uses the ‘region’ face when the region is "invalid" by its
   9239 own definition.  In a Magit buffer the region is used to either select
   9240 multiple sibling sections, so that commands which support it act on all
   9241 of these sections instead of just the current section, or to select
   9242 lines within a single hunk section.  In all other cases, the section is
   9243 considered invalid and Magit won’t act on it.  But such invalid sections
   9244 happen, either because the user has not moved point enough yet to make
   9245 it valid or because she wants to use a non-magit command to act on the
   9246 region, e.g., ‘kill-region’.
   9247 
   9248    So using the regular ‘region’ face for invalid sections is a feature.
   9249 It tells the user that Magit won’t be able to act on it.  It’s
   9250 acceptable if that face looks a bit odd and even (but less so) if it
   9251 collides with the background colors of section headings and other things
   9252 that have a background color.
   9253 
   9254    Magit highlights the current section.  If a section has subsections,
   9255 then all of them are highlighted.  This is done using faces that have
   9256 "highlight" in their names.  For most sections,
   9257 ‘magit-section-highlight’ is used for both the body and the heading.
   9258 Like the ‘region’ face, it should only set the background color to
   9259 something similar to that of ‘default’.  The highlight background color
   9260 must be different from both the ‘region’ background color and the
   9261 ‘default’ background color.
   9262 
   9263    For diff related sections Magit uses various faces to highlight
   9264 different parts of the selected section(s).  Note that hunk headings,
   9265 unlike all other section headings, by default have a background color,
   9266 because it is useful to have very visible separators between hunks.
   9267 That face ‘magit-diff-hunk-heading’, should be different from both
   9268 ‘magit-diff-hunk-heading-highlight’ and ‘magit-section-highlight’, as
   9269 well as from ‘magit-diff-context’ and ‘magit-diff-context-highlight’.
   9270 By default we do that by changing the foreground color.  Changing the
   9271 background color would lead to complications, and there are already
   9272 enough we cannot get around.  (Also note that it is generally a good
   9273 idea for section headings to always be bold, but only for sections that
   9274 have subsections).
   9275 
   9276    When there is a valid region selecting diff-related sibling sections,
   9277 i.e., multiple files or hunks, then the bodies of all these sections use
   9278 the respective highlight faces, but additionally the headings instead
   9279 use one of the faces ‘magit-diff-file-heading-selection’ or
   9280 ‘magit-diff-hunk-heading-selection’.  These faces have to be different
   9281 from the regular highlight variants to provide explicit visual
   9282 indication that the region is active.
   9283 
   9284    When theming diff related faces, start by setting the option
   9285 ‘magit-diff-refine-hunk’ to ‘all’.  You might personally prefer to only
   9286 refine the current hunk or not use hunk refinement at all, but some of
   9287 the users of your theme want all hunks to be refined, so you have to
   9288 cater to that.
   9289 
   9290    (Also turn on ‘magit-diff-highlight-indentation’,
   9291 ‘magit-diff-highlight-trailing’, and ‘magit-diff-paint-whitespace’; and
   9292 insert some whitespace errors into the code you use for testing.)
   9293 
   9294    For added lines you have to adjust three faces: ‘magit-diff-added’,
   9295 ‘magit-diff-added-highlight’, and ‘diff-refined-added’.  Make sure that
   9296 the latter works well with both of the former, as well as ‘smerge-other’
   9297 and ‘diff-added’.  Then do the same for the removed lines, context
   9298 lines, lines added by us, and lines added by them.  Also make sure the
   9299 respective added, removed, and context faces use approximately the same
   9300 saturation for both the highlighted and unhighlighted variants.  Also
   9301 make sure the file and diff headings work nicely with context lines
   9302 (e.g., make them look different).  Line faces should set both the
   9303 foreground and the background color.  For example, for added lines use
   9304 two different greens.
   9305 
   9306    It’s best if the foreground color of both the highlighted and the
   9307 unhighlighted variants are the same, so you will need to have to find a
   9308 color that works well on the highlight and unhighlighted background, the
   9309 refine background, and the highlight context background.  When there is
   9310 an hunk internal region, then the added- and removed-lines background
   9311 color is used only within that region.  Outside the region the
   9312 highlighted context background color is used.  This makes it easier to
   9313 see what is being staged.  With an hunk internal region the hunk heading
   9314 is shown using ‘magit-diff-hunk-heading-selection’, and so are the thin
   9315 lines that are added around the lines that fall within the region.  The
   9316 background color of that has to be distinct enough from the various
   9317 other involved background colors.
   9318 
   9319    Nobody said this would be easy.  If your theme restricts itself to a
   9320 certain set of colors, then you should make an exception here.
   9321 Otherwise it would be impossible to make the diffs look good in each and
   9322 every variation.  Actually you might want to just stick to the default
   9323 definitions for these faces.  You have been warned.  Also please note
   9324 that if you do not get this right, this will in some cases look to users
   9325 like bugs in Magit - so please do it right or not at all.
   9326 
   9327 
   9328 File: magit.info,  Node: FAQ,  Next: Debugging Tools,  Prev: Plumbing,  Up: Top
   9329 
   9330 Appendix A FAQ
   9331 **************
   9332 
   9333 The next two nodes lists frequently asked questions.  For a list of
   9334 frequently *and recently* asked questions, i.e., questions that haven’t
   9335 made it into the manual yet, see
   9336 <https://github.com/magit/magit/wiki/FAQ>.
   9337 
   9338    Please also see *note Debugging Tools::.
   9339 
   9340 * Menu:
   9341 
   9342 * FAQ - How to ...?::
   9343 * FAQ - Issues and Errors::
   9344 
   9345 
   9346 File: magit.info,  Node: FAQ - How to ...?,  Next: FAQ - Issues and Errors,  Up: FAQ
   9347 
   9348 A.1 FAQ - How to ...?
   9349 =====================
   9350 
   9351 * Menu:
   9352 
   9353 * How to pronounce Magit?::
   9354 * How to show git's output?::
   9355 * How to install the gitman info manual?::
   9356 * How to show diffs for gpg-encrypted files?::
   9357 * How does branching and pushing work?::
   9358 * Should I disable VC?::
   9359 
   9360 
   9361 File: magit.info,  Node: How to pronounce Magit?,  Next: How to show git's output?,  Up: FAQ - How to ...?
   9362 
   9363 A.1.1 How to pronounce Magit?
   9364 -----------------------------
   9365 
   9366 Either ‘mu[m's] git’ or ‘magi{c => t}’ is fine.
   9367 
   9368    The slogan is "It’s Magit!  The magical Git client", so it makes
   9369 sense to pronounce Magit like magic, while taking into account that C
   9370 and T do not sound the same.
   9371 
   9372    The German "Magie" is not pronounced the same as the English "magic",
   9373 so if you speak German then you can use the above rationale to justify
   9374 using the former pronunciation; ‘Mag{ie => it}’.
   9375 
   9376    You can also choose to use the former pronunciation just because you
   9377 like it better.
   9378 
   9379    Also see <https://magit.vc/assets/videos/magic.mp4>.  Also see
   9380 <https://emacs.stackexchange.com/questions/13696>.
   9381 
   9382 
   9383 File: magit.info,  Node: How to show git's output?,  Next: How to install the gitman info manual?,  Prev: How to pronounce Magit?,  Up: FAQ - How to ...?
   9384 
   9385 A.1.2 How to show git’s output?
   9386 -------------------------------
   9387 
   9388 To show the output of recently run git commands, press ‘$’ (or, if that
   9389 isn’t available, ‘M-x magit-process-buffer’).  This will show a buffer
   9390 containing a section per git invocation; as always press ‘TAB’ to expand
   9391 or collapse them.
   9392 
   9393    By default, git’s output is only inserted into the process buffer if
   9394 it is run for side-effects.  When the output is consumed in some way,
   9395 also inserting it into the process buffer would be too expensive.  For
   9396 debugging purposes, it’s possible to do so anyway by setting
   9397 ‘magit-git-debug’ to ‘t’.
   9398 
   9399 
   9400 File: magit.info,  Node: How to install the gitman info manual?,  Next: How to show diffs for gpg-encrypted files?,  Prev: How to show git's output?,  Up: FAQ - How to ...?
   9401 
   9402 A.1.3 How to install the gitman info manual?
   9403 --------------------------------------------
   9404 
   9405 Git’s manpages can be exported as an info manual called ‘gitman’.
   9406 Magit’s own info manual links to nodes in that manual instead of the
   9407 actual manpages because Info doesn’t support linking to manpages.
   9408 
   9409    Unfortunately some distributions do not install the ‘gitman’ manual
   9410 by default and you will have to install a separate documentation package
   9411 to get it.
   9412 
   9413    Magit patches Info adding the ability to visit links to the ‘gitman’
   9414 Info manual by instead viewing the respective manpage.  If you prefer
   9415 that approach, then set the value of ‘magit-view-git-manual-method’ to
   9416 one of the supported packages ‘man’ or ‘woman’, e.g.:
   9417 
   9418      (setq magit-view-git-manual-method 'man)
   9419 
   9420 
   9421 File: magit.info,  Node: How to show diffs for gpg-encrypted files?,  Next: How does branching and pushing work?,  Prev: How to install the gitman info manual?,  Up: FAQ - How to ...?
   9422 
   9423 A.1.4 How to show diffs for gpg-encrypted files?
   9424 ------------------------------------------------
   9425 
   9426 Git supports showing diffs for encrypted files, but has to be told to do
   9427 so.  Since Magit just uses Git to get the diffs, configuring Git also
   9428 affects the diffs displayed inside Magit.
   9429 
   9430      git config --global diff.gpg.textconv "gpg --no-tty --decrypt"
   9431      echo "*.gpg filter=gpg diff=gpg" > .gitattributes
   9432 
   9433 
   9434 File: magit.info,  Node: How does branching and pushing work?,  Next: Should I disable VC?,  Prev: How to show diffs for gpg-encrypted files?,  Up: FAQ - How to ...?
   9435 
   9436 A.1.5 How does branching and pushing work?
   9437 ------------------------------------------
   9438 
   9439 Please see *note Branching:: and
   9440 <https://emacsair.me/2016/01/17/magit-2.4>
   9441 
   9442 
   9443 File: magit.info,  Node: Should I disable VC?,  Prev: How does branching and pushing work?,  Up: FAQ - How to ...?
   9444 
   9445 A.1.6 Should I disable VC?
   9446 --------------------------
   9447 
   9448 If you don’t use VC (the built-in version control interface) then you
   9449 might be tempted to disable it, not least because we used to recommend
   9450 that you do that.
   9451 
   9452    We no longer recommend that you disable VC.  Doing so would break
   9453 useful third-party packages (such as ‘diff-hl’), which depend on VC
   9454 being enabled.
   9455 
   9456    If you choose to disable VC anyway, then you can do so by changing
   9457 the value of ‘vc-handled-backends’.
   9458 
   9459 
   9460 File: magit.info,  Node: FAQ - Issues and Errors,  Prev: FAQ - How to ...?,  Up: FAQ
   9461 
   9462 A.2 FAQ - Issues and Errors
   9463 ===========================
   9464 
   9465 * Menu:
   9466 
   9467 * Magit is slow::
   9468 * I changed several thousand files at once and now Magit is unusable::
   9469 * I am having problems committing::
   9470 * I am using MS Windows and cannot push with Magit::
   9471 * I am using macOS and SOMETHING works in shell, but not in Magit: I am using macOS and SOMETHING works in shell but not in Magit.
   9472 * Expanding a file to show the diff causes it to disappear::
   9473 * Point is wrong in the COMMIT_EDITMSG buffer::
   9474 * The mode-line information isn't always up-to-date::
   9475 * A branch and tag sharing the same name breaks SOMETHING::
   9476 * My Git hooks work on the command-line but not inside Magit::
   9477 * git-commit-mode isn't used when committing from the command-line::
   9478 * Point ends up inside invisible text when jumping to a file-visiting buffer::
   9479 * I am no longer able to save popup defaults::
   9480 
   9481 
   9482 File: magit.info,  Node: Magit is slow,  Next: I changed several thousand files at once and now Magit is unusable,  Up: FAQ - Issues and Errors
   9483 
   9484 A.2.1 Magit is slow
   9485 -------------------
   9486 
   9487 See *note Performance:: and *note I changed several thousand files at
   9488 once and now Magit is unusable::.
   9489 
   9490 
   9491 File: magit.info,  Node: I changed several thousand files at once and now Magit is unusable,  Next: I am having problems committing,  Prev: Magit is slow,  Up: FAQ - Issues and Errors
   9492 
   9493 A.2.2 I changed several thousand files at once and now Magit is unusable
   9494 ------------------------------------------------------------------------
   9495 
   9496 Magit is currently not expected to work well under such conditions.  It
   9497 sure would be nice if it did.  Reaching satisfactory performance under
   9498 such conditions will require some heavy refactoring.  This is no small
   9499 task but I hope to eventually find the time to make it happen.
   9500 
   9501    But for now we recommend you use the command line to complete this
   9502 one commit.  Also see *note Performance::.
   9503 
   9504 
   9505 File: magit.info,  Node: I am having problems committing,  Next: I am using MS Windows and cannot push with Magit,  Prev: I changed several thousand files at once and now Magit is unusable,  Up: FAQ - Issues and Errors
   9506 
   9507 A.2.3 I am having problems committing
   9508 -------------------------------------
   9509 
   9510 That likely means that Magit is having problems finding an appropriate
   9511 emacsclient executable.  See *note (with-editor)Configuring
   9512 With-Editor:: and *note (with-editor)Debugging::.
   9513 
   9514 
   9515 File: magit.info,  Node: I am using MS Windows and cannot push with Magit,  Next: I am using macOS and SOMETHING works in shell but not in Magit,  Prev: I am having problems committing,  Up: FAQ - Issues and Errors
   9516 
   9517 A.2.4 I am using MS Windows and cannot push with Magit
   9518 ------------------------------------------------------
   9519 
   9520 It’s almost certain that Magit is only incidental to this issue.  It is
   9521 much more likely that this is a configuration issue, even if you can
   9522 push on the command line.
   9523 
   9524    Detailed setup instructions can be found at
   9525 <https://github.com/magit/magit/wiki/Pushing-with-Magit-from-Windows>.
   9526 
   9527 
   9528 File: magit.info,  Node: I am using macOS and SOMETHING works in shell but not in Magit,  Next: Expanding a file to show the diff causes it to disappear,  Prev: I am using MS Windows and cannot push with Magit,  Up: FAQ - Issues and Errors
   9529 
   9530 A.2.5 I am using macOS and SOMETHING works in shell, but not in Magit
   9531 ---------------------------------------------------------------------
   9532 
   9533 This usually occurs because Emacs doesn’t have the same environment
   9534 variables as your shell.  Try installing and configuring
   9535 <https://github.com/purcell/exec-path-from-shell>.  By default it
   9536 synchronizes ‘$PATH’, which helps Magit find the same ‘git’ as the one
   9537 you are using on the shell.
   9538 
   9539    If SOMETHING is "passphrase caching with gpg-agent for commit and/or
   9540 tag signing", then you’ll also need to synchronize ‘$GPG_AGENT_INFO’.
   9541 
   9542 
   9543 File: magit.info,  Node: Expanding a file to show the diff causes it to disappear,  Next: Point is wrong in the COMMIT_EDITMSG buffer,  Prev: I am using macOS and SOMETHING works in shell but not in Magit,  Up: FAQ - Issues and Errors
   9544 
   9545 A.2.6 Expanding a file to show the diff causes it to disappear
   9546 --------------------------------------------------------------
   9547 
   9548 This is probably caused by a customization of a ‘diff.*’ Git variable.
   9549 You probably set that variable for a reason, and should therefore only
   9550 undo that setting in Magit by customizing ‘magit-git-global-arguments’.
   9551 
   9552 
   9553 File: magit.info,  Node: Point is wrong in the COMMIT_EDITMSG buffer,  Next: The mode-line information isn't always up-to-date,  Prev: Expanding a file to show the diff causes it to disappear,  Up: FAQ - Issues and Errors
   9554 
   9555 A.2.7 Point is wrong in the ‘COMMIT_EDITMSG’ buffer
   9556 ---------------------------------------------------
   9557 
   9558 Neither Magit nor ‘git-commit‘ fiddle with point in the buffer used to
   9559 write commit messages, so something else must be doing it.
   9560 
   9561    You have probably globally enabled a mode which restores point in
   9562 file-visiting buffers.  It might be a bit surprising, but when you write
   9563 a commit message, then you are actually editing a file.
   9564 
   9565    So you have to figure out which package is doing it.  ‘saveplace’,
   9566 ‘pointback’, and ‘session’ are likely candidates.  These snippets might
   9567 help:
   9568 
   9569      (setq session-name-disable-regexp "\\(?:\\`'\\.git/[A-Z_]+\\'\\)")
   9570 
   9571      (with-eval-after-load 'pointback
   9572        (lambda ()
   9573          (when (or git-commit-mode git-rebase-mode)
   9574            (pointback-mode -1))))
   9575 
   9576 
   9577 File: magit.info,  Node: The mode-line information isn't always up-to-date,  Next: A branch and tag sharing the same name breaks SOMETHING,  Prev: Point is wrong in the COMMIT_EDITMSG buffer,  Up: FAQ - Issues and Errors
   9578 
   9579 A.2.8 The mode-line information isn’t always up-to-date
   9580 -------------------------------------------------------
   9581 
   9582 Magit is not responsible for the version control information that is
   9583 being displayed in the mode-line and looks something like ‘Git-master’.
   9584 The built-in "Version Control" package, also known as "VC", updates that
   9585 information, and can be told to do so more often:
   9586 
   9587      (setq auto-revert-check-vc-info t)
   9588 
   9589    But doing so isn’t good for performance.  For more (overly
   9590 optimistic) information see *note (emacs)VC Mode Line::.
   9591 
   9592    If you don’t really care about seeing this information in the
   9593 mode-line, but just don’t want to see _incorrect_ information, then
   9594 consider simply not displaying it in the mode-line:
   9595 
   9596      (setq-default mode-line-format
   9597                    (delete '(vc-mode vc-mode) mode-line-format))
   9598 
   9599 
   9600 File: magit.info,  Node: A branch and tag sharing the same name breaks SOMETHING,  Next: My Git hooks work on the command-line but not inside Magit,  Prev: The mode-line information isn't always up-to-date,  Up: FAQ - Issues and Errors
   9601 
   9602 A.2.9 A branch and tag sharing the same name breaks SOMETHING
   9603 -------------------------------------------------------------
   9604 
   9605 Or more generally, ambiguous refnames break SOMETHING.
   9606 
   9607    Magit assumes that refs are named non-ambiguously across the
   9608 "refs/heads/", "refs/tags/", and "refs/remotes/" namespaces (i.e., all
   9609 the names remain unique when those prefixes are stripped).  We consider
   9610 ambiguous refnames unsupported and recommend that you use a
   9611 non-ambiguous naming scheme.  However, if you do work with a repository
   9612 that has ambiguous refnames, please report any issues you encounter, so
   9613 that we can investigate whether there is a simple fix.
   9614 
   9615 
   9616 File: magit.info,  Node: My Git hooks work on the command-line but not inside Magit,  Next: git-commit-mode isn't used when committing from the command-line,  Prev: A branch and tag sharing the same name breaks SOMETHING,  Up: FAQ - Issues and Errors
   9617 
   9618 A.2.10 My Git hooks work on the command-line but not inside Magit
   9619 -----------------------------------------------------------------
   9620 
   9621 When Magit calls ‘git’ it adds a few global arguments including
   9622 ‘--literal-pathspecs’ and the ‘git’ process started by Magit then passes
   9623 that setting on to other ‘git’ process it starts itself.  It does so by
   9624 setting the environment variable ‘GIT_LITERAL_PATHSPECS’, not by calling
   9625 subprocesses with the ‘--literal-pathspecs’ argument.  You can therefore
   9626 override this setting in hook scripts using ‘unset
   9627 GIT_LITERAL_PATHSPECS’.
   9628 
   9629 
   9630 File: magit.info,  Node: git-commit-mode isn't used when committing from the command-line,  Next: Point ends up inside invisible text when jumping to a file-visiting buffer,  Prev: My Git hooks work on the command-line but not inside Magit,  Up: FAQ - Issues and Errors
   9631 
   9632 A.2.11 ‘git-commit-mode’ isn’t used when committing from the command-line
   9633 -------------------------------------------------------------------------
   9634 
   9635 The reason for this is that ‘git-commit.el’ has not been loaded yet
   9636 and/or that the server has not been started yet.  These things have
   9637 always already been taken care of when you commit from Magit because in
   9638 order to do so, Magit has to be loaded and doing that involves loading
   9639 ‘git-commit’ and starting the server.
   9640 
   9641    If you want to commit from the command-line, then you have to take
   9642 care of these things yourself.  Your ‘init.el’ file should contain:
   9643 
   9644      (require 'git-commit)
   9645      (server-mode)
   9646 
   9647    Instead of ‘(require ’git-commit)‘ you may also use:
   9648 
   9649      (load "/path/to/magit-autoloads.el")
   9650 
   9651    You might want to do that because loading ‘git-commit’ causes large
   9652 parts of Magit to be loaded.
   9653 
   9654    There are also some variations of ‘(server-mode)’ that you might want
   9655 to try.  Personally I use:
   9656 
   9657      (use-package server
   9658        :config (or (server-running-p) (server-mode)))
   9659 
   9660    Now you can use:
   9661 
   9662      $ emacs&
   9663      $ EDITOR=emacsclient git commit
   9664 
   9665    However you cannot use:
   9666 
   9667      $ killall emacs
   9668      $ EDITOR="emacsclient --alternate-editor emacs" git commit
   9669 
   9670    This will actually end up using ‘emacs’, not ‘emacsclient’.  If you
   9671 do this, then you can still edit the commit message but
   9672 ‘git-commit-mode’ won’t be used and you have to exit ‘emacs’ to finish
   9673 the process.
   9674 
   9675    Tautology ahead.  If you want to be able to use ‘emacsclient’ to
   9676 connect to a running ‘emacs’ instance, even though no ‘emacs’ instance
   9677 is running, then you cannot use ‘emacsclient’ directly.
   9678 
   9679    Instead you have to create a script that does something like this:
   9680 
   9681    Try to use ‘emacsclient’ (without using ‘--alternate-editor’).  If
   9682 that succeeds, do nothing else.  Otherwise start ‘emacs &’ (and
   9683 ‘init.el’ must call ‘server-start’) and try to use ‘emacsclient’ again.
   9684 
   9685 
   9686 File: magit.info,  Node: Point ends up inside invisible text when jumping to a file-visiting buffer,  Next: I am no longer able to save popup defaults,  Prev: git-commit-mode isn't used when committing from the command-line,  Up: FAQ - Issues and Errors
   9687 
   9688 A.2.12 Point ends up inside invisible text when jumping to a file-visiting buffer
   9689 ---------------------------------------------------------------------------------
   9690 
   9691 This can happen when you type ‘RET’ on a hunk to visit the respective
   9692 file at the respective position.  One solution to this problem is to use
   9693 ‘global-reveal-mode’.  It makes sure that text around point is always
   9694 visible.  If that is too drastic for your taste, then you may instead
   9695 use ‘magit-diff-visit-file-hook’ to reveal the text, possibly using
   9696 ‘reveal-post-command’ or for Org buffers ‘org-reveal’.
   9697 
   9698 
   9699 File: magit.info,  Node: I am no longer able to save popup defaults,  Prev: Point ends up inside invisible text when jumping to a file-visiting buffer,  Up: FAQ - Issues and Errors
   9700 
   9701 A.2.13 I am no longer able to save popup defaults
   9702 -------------------------------------------------
   9703 
   9704 Magit used to use Magit-Popup to implement the transient popup menus.
   9705 Now it used Transient instead, which is Magit-Popup’s successor.
   9706 
   9707    In the older Magit-Popup menus, it was possible to save user settings
   9708 (e.g., setting the gpg signing key for commits) by using ‘C-c C-c’ in
   9709 the popup buffer.  This would dismiss the popup, but save the settings
   9710 as the defaults for future popups.
   9711 
   9712    When switching to Transient menus, this functionality is now
   9713 available via ‘C-x C-s’ instead; the ‘C-x’ prefix has other options as
   9714 well when using Transient, which will be displayed when it is typed.
   9715 See <https://magit.vc/manual/transient/Saving-Values.html#Saving-Values>
   9716 for more details.
   9717 
   9718 
   9719 File: magit.info,  Node: Debugging Tools,  Next: Keystroke Index,  Prev: FAQ,  Up: Top
   9720 
   9721 B Debugging Tools
   9722 *****************
   9723 
   9724 Magit and its dependencies provide a few debugging tools, and we
   9725 appreciate it very much if you use those tools before reporting an
   9726 issue.  Please include all relevant output when reporting an issue.
   9727 
   9728 ‘M-x magit-version’
   9729      This command shows the currently used versions of Magit, Git, and
   9730      Emacs in the echo area.  Non-interactively this just returns the
   9731      Magit version.
   9732 
   9733 ‘M-x magit-emacs-Q-command’
   9734      This command shows a debugging shell command in the echo area and
   9735      adds it to the kill ring.  Paste that command into a shell and run
   9736      it.
   9737 
   9738      This shell command starts ‘emacs’ with only ‘magit’ and its
   9739      dependencies loaded.  Neither your configuration nor other
   9740      installed packages are loaded.  This makes it easier to determine
   9741      whether some issue lays with Magit or something else.
   9742 
   9743      If you run Magit from its Git repository, then you should be able
   9744      to use ‘make emacs-Q’ instead of the output of this command.
   9745 
   9746 ‘M-x magit-toggle-git-debug’
   9747      This command toggles whether additional git errors are reported.
   9748 
   9749      Magit basically calls git for one of these two reasons: for
   9750      side-effects or to do something with its standard output.
   9751 
   9752      When git is run for side-effects then its output, including error
   9753      messages, go into the process buffer which is shown when using ‘$’.
   9754 
   9755      When git’s output is consumed in some way, then it would be too
   9756      expensive to also insert it into this buffer, but when this option
   9757      is non-nil and git returns with a non-zero exit status, then at
   9758      least its standard error is inserted into this buffer.
   9759 
   9760      This is only intended for debugging purposes.  Do not enable this
   9761      permanently, that would negatively affect performance.  Also note
   9762      that just because git exits with a non-zero exit status and prints
   9763      an error message that usually doesn’t mean that it is an error as
   9764      far as Magit is concerned, which is another reason we usually hide
   9765      these error messages.  Whether some error message is relevant in
   9766      the context of some unexpected behavior has to be judged on a case
   9767      by case basis.
   9768 
   9769 ‘M-x magit-toggle-verbose-refresh’
   9770      This command toggles whether Magit refreshes buffers verbosely.
   9771      Enabling this helps figuring out which sections are bottlenecks.
   9772      The additional output can be found in the ‘*Messages*’ buffer.
   9773 
   9774 ‘M-x magit-debug-git-executable’
   9775      This command displays a buffer containing information about the
   9776      available and used ‘git’ executable(s), and can be useful when
   9777      investigating ‘exec-path’ issues.
   9778 
   9779      Also see *note Git Executable::.
   9780 
   9781 ‘M-x with-editor-debug’
   9782      This command displays a buffer containing information about the
   9783      available and used ‘emacsclient’ executable(s), and can be useful
   9784      when investigating why Magit (or rather ‘with-editor’) cannot find
   9785      an appropriate ‘emacsclient’ executable.
   9786 
   9787      Also see *note (with-editor)Debugging::.
   9788 
   9789 Please also see *note FAQ::.
   9790 
   9791 
   9792 File: magit.info,  Node: Keystroke Index,  Next: Function and Command Index,  Prev: Debugging Tools,  Up: Top
   9793 
   9794 Appendix C Keystroke Index
   9795 **************************
   9796 
   9797 
   9798 * Menu:
   9799 
   9800 * !:                                     Running Git Manually.
   9801                                                               (line  13)
   9802 * ! !:                                   Running Git Manually.
   9803                                                               (line  17)
   9804 * ! a:                                   Running Git Manually.
   9805                                                               (line  53)
   9806 * ! b:                                   Running Git Manually.
   9807                                                               (line  56)
   9808 * ! g:                                   Running Git Manually.
   9809                                                               (line  59)
   9810 * ! k:                                   Running Git Manually.
   9811                                                               (line  50)
   9812 * ! m:                                   Running Git Manually.
   9813                                                               (line  62)
   9814 * ! p:                                   Running Git Manually.
   9815                                                               (line  25)
   9816 * ! s:                                   Running Git Manually.
   9817                                                               (line  34)
   9818 * ! S:                                   Running Git Manually.
   9819                                                               (line  38)
   9820 * $:                                     Viewing Git Output.  (line  17)
   9821 * +:                                     Log Buffer.          (line  64)
   9822 * + <1>:                                 Refreshing Diffs.    (line  65)
   9823 * -:                                     Log Buffer.          (line  67)
   9824 * - <1>:                                 Refreshing Diffs.    (line  62)
   9825 * 0:                                     Refreshing Diffs.    (line  68)
   9826 * 1:                                     Section Visibility.  (line  39)
   9827 * 2:                                     Section Visibility.  (line  39)
   9828 * 3:                                     Section Visibility.  (line  39)
   9829 * 4:                                     Section Visibility.  (line  39)
   9830 * 5:                                     Repository List.     (line 115)
   9831 * ::                                     Running Git Manually.
   9832                                                               (line  25)
   9833 * =:                                     Log Buffer.          (line  59)
   9834 * >:                                     Sparse checkouts.    (line  17)
   9835 * > a:                                   Sparse checkouts.    (line  39)
   9836 * > d:                                   Sparse checkouts.    (line  50)
   9837 * > e:                                   Sparse checkouts.    (line  21)
   9838 * > r:                                   Sparse checkouts.    (line  44)
   9839 * > s:                                   Sparse checkouts.    (line  33)
   9840 * ^:                                     Section Movement.    (line  28)
   9841 * a:                                     Applying.            (line  34)
   9842 * A:                                     Cherry Picking.      (line   9)
   9843 * A A:                                   Cherry Picking.      (line  17)
   9844 * A a:                                   Cherry Picking.      (line  23)
   9845 * A A <1>:                               Cherry Picking.      (line  85)
   9846 * A a <1>:                               Cherry Picking.      (line  91)
   9847 * A d:                                   Cherry Picking.      (line  51)
   9848 * A h:                                   Cherry Picking.      (line  40)
   9849 * A n:                                   Cherry Picking.      (line  62)
   9850 * A s:                                   Cherry Picking.      (line  72)
   9851 * A s <1>:                               Cherry Picking.      (line  88)
   9852 * B:                                     Bisecting.           (line   9)
   9853 * b:                                     Blaming.             (line 115)
   9854 * b <1>:                                 Branch Commands.     (line  13)
   9855 * b <2>:                                 Editing Rebase Sequences.
   9856                                                               (line  70)
   9857 * B B:                                   Bisecting.           (line  16)
   9858 * B b:                                   Bisecting.           (line  32)
   9859 * b b:                                   Branch Commands.     (line  47)
   9860 * b C:                                   Branch Commands.     (line  31)
   9861 * b c:                                   Branch Commands.     (line  63)
   9862 * B g:                                   Bisecting.           (line  36)
   9863 * B k:                                   Bisecting.           (line  46)
   9864 * b k:                                   Branch Commands.     (line 138)
   9865 * b l:                                   Branch Commands.     (line  69)
   9866 * B m:                                   Bisecting.           (line  40)
   9867 * b m:                                   Branch Commands.     (line 149)
   9868 * b n:                                   Branch Commands.     (line  54)
   9869 * B r:                                   Bisecting.           (line  51)
   9870 * B s:                                   Bisecting.           (line  26)
   9871 * b s:                                   Branch Commands.     (line  91)
   9872 * b S:                                   Branch Commands.     (line 118)
   9873 * b x:                                   Branch Commands.     (line 123)
   9874 * c:                                     Blaming.             (line 141)
   9875 * C:                                     Cloning Repository.  (line  20)
   9876 * c <1>:                                 Initiating a Commit. (line   9)
   9877 * c <2>:                                 Editing Rebase Sequences.
   9878                                                               (line  59)
   9879 * C >:                                   Cloning Repository.  (line  38)
   9880 * c a:                                   Initiating a Commit. (line  18)
   9881 * c A:                                   Initiating a Commit. (line  59)
   9882 * C b:                                   Cloning Repository.  (line  44)
   9883 * C C:                                   Cloning Repository.  (line  28)
   9884 * c c:                                   Initiating a Commit. (line  14)
   9885 * C d:                                   Cloning Repository.  (line  55)
   9886 * C e:                                   Cloning Repository.  (line  61)
   9887 * c e:                                   Initiating a Commit. (line  21)
   9888 * c f:                                   Initiating a Commit. (line  39)
   9889 * c F:                                   Initiating a Commit. (line  46)
   9890 * C m:                                   Cloning Repository.  (line  48)
   9891 * C s:                                   Cloning Repository.  (line  32)
   9892 * c s:                                   Initiating a Commit. (line  49)
   9893 * c S:                                   Initiating a Commit. (line  56)
   9894 * c w:                                   Initiating a Commit. (line  30)
   9895 * C-<return>:                            Visiting Files and Blobs from a Diff.
   9896                                                               (line  50)
   9897 * C-<tab>:                               Section Visibility.  (line  14)
   9898 * C-c C-a:                               Commit Pseudo Headers.
   9899                                                               (line  16)
   9900 * C-c C-b:                               Log Buffer.          (line  20)
   9901 * C-c C-b <1>:                           Refreshing Diffs.    (line  84)
   9902 * C-c C-c:                               Select from Log.     (line  21)
   9903 * C-c C-c <1>:                           Editing Commit Messages.
   9904                                                               (line  18)
   9905 * C-c C-c <2>:                           Editing Rebase Sequences.
   9906                                                               (line   7)
   9907 * C-c C-d:                               Refreshing Diffs.    (line  75)
   9908 * C-c C-d <1>:                           Editing Commit Messages.
   9909                                                               (line  54)
   9910 * C-c C-e:                               Commands Available in Diffs.
   9911                                                               (line  24)
   9912 * C-c C-f:                               Log Buffer.          (line  23)
   9913 * C-c C-f <1>:                           Refreshing Diffs.    (line  87)
   9914 * C-c C-i:                               Commit Pseudo Headers.
   9915                                                               (line  13)
   9916 * C-c C-k:                               Select from Log.     (line  26)
   9917 * C-c C-k <1>:                           Editing Commit Messages.
   9918                                                               (line  22)
   9919 * C-c C-k <2>:                           Editing Rebase Sequences.
   9920                                                               (line  11)
   9921 * C-c C-n:                               Log Buffer.          (line  26)
   9922 * C-c C-o:                               Commit Pseudo Headers.
   9923                                                               (line  28)
   9924 * C-c C-p:                               Commit Pseudo Headers.
   9925                                                               (line  31)
   9926 * C-c C-r:                               Commit Pseudo Headers.
   9927                                                               (line  19)
   9928 * C-c C-s:                               Commit Pseudo Headers.
   9929                                                               (line  22)
   9930 * C-c C-t:                               Commands Available in Diffs.
   9931                                                               (line  15)
   9932 * C-c C-t <1>:                           Commit Pseudo Headers.
   9933                                                               (line  25)
   9934 * C-c C-w:                               Using the Revision Stack.
   9935                                                               (line   7)
   9936 * C-c f:                                 Commands for Buffers Visiting Files.
   9937                                                               (line  52)
   9938 * C-c f , c:                             Commands for Buffers Visiting Files.
   9939                                                               (line  52)
   9940 * C-c f , k:                             Commands for Buffers Visiting Files.
   9941                                                               (line  52)
   9942 * C-c f , r:                             Commands for Buffers Visiting Files.
   9943                                                               (line  52)
   9944 * C-c f , x:                             Commands for Buffers Visiting Files.
   9945                                                               (line  52)
   9946 * C-c f B:                               Blaming.             (line  28)
   9947 * C-c f b:                               Blaming.             (line  28)
   9948 * C-c f B <1>:                           Commands for Buffers Visiting Files.
   9949                                                               (line  52)
   9950 * C-c f b <1>:                           Commands for Buffers Visiting Files.
   9951                                                               (line  52)
   9952 * C-c f B b:                             Blaming.             (line  28)
   9953 * C-c f B e:                             Blaming.             (line  28)
   9954 * C-c f B f:                             Blaming.             (line  28)
   9955 * C-c f B q:                             Blaming.             (line  28)
   9956 * C-c f B r:                             Blaming.             (line  28)
   9957 * C-c f c:                               Commands for Buffers Visiting Files.
   9958                                                               (line  52)
   9959 * C-c f D:                               Commands for Buffers Visiting Files.
   9960                                                               (line  52)
   9961 * C-c f d:                               Commands for Buffers Visiting Files.
   9962                                                               (line  52)
   9963 * C-c f e:                               Blaming.             (line  28)
   9964 * C-c f e <1>:                           Commands for Buffers Visiting Files.
   9965                                                               (line  52)
   9966 * C-c f f:                               Blaming.             (line  28)
   9967 * C-c f f <1>:                           Commands for Buffers Visiting Files.
   9968                                                               (line  52)
   9969 * C-c f g:                               Commands for Buffers Visiting Files.
   9970                                                               (line  52)
   9971 * C-c f G:                               Commands for Buffers Visiting Files.
   9972                                                               (line  52)
   9973 * C-c f L:                               Commands for Buffers Visiting Files.
   9974                                                               (line  52)
   9975 * C-c f l:                               Commands for Buffers Visiting Files.
   9976                                                               (line  52)
   9977 * C-c f M:                               Commands for Buffers Visiting Files.
   9978                                                               (line  52)
   9979 * C-c f m:                               Commands for Buffers Visiting Files.
   9980                                                               (line  52)
   9981 * C-c f n:                               Commands for Buffers Visiting Files.
   9982                                                               (line  52)
   9983 * C-c f p:                               Commands for Buffers Visiting Files.
   9984                                                               (line  52)
   9985 * C-c f q:                               Blaming.             (line  28)
   9986 * C-c f q <1>:                           Commands for Buffers Visiting Files.
   9987                                                               (line  52)
   9988 * C-c f r:                               Blaming.             (line  28)
   9989 * C-c f r <1>:                           Commands for Buffers Visiting Files.
   9990                                                               (line  52)
   9991 * C-c f s:                               Commands for Buffers Visiting Files.
   9992                                                               (line  52)
   9993 * C-c f s <1>:                           Commands for Buffers Visiting Files.
   9994                                                               (line  52)
   9995 * C-c f t:                               Commands for Buffers Visiting Files.
   9996                                                               (line  52)
   9997 * C-c f u:                               Commands for Buffers Visiting Files.
   9998                                                               (line  52)
   9999 * C-c f u <1>:                           Commands for Buffers Visiting Files.
  10000                                                               (line  52)
  10001 * C-c f v:                               Commands for Buffers Visiting Files.
  10002                                                               (line  52)
  10003 * C-c f V:                               Commands for Buffers Visiting Files.
  10004                                                               (line  52)
  10005 * C-c g:                                 Transient Commands.  (line  20)
  10006 * C-c M-g:                               Commands for Buffers Visiting Files.
  10007                                                               (line  58)
  10008 * C-c M-g , c:                           Commands for Buffers Visiting Files.
  10009                                                               (line  86)
  10010 * C-c M-g , k:                           Commands for Buffers Visiting Files.
  10011                                                               (line  82)
  10012 * C-c M-g , r:                           Commands for Buffers Visiting Files.
  10013                                                               (line  78)
  10014 * C-c M-g , x:                           Commands for Buffers Visiting Files.
  10015                                                               (line  74)
  10016 * C-c M-g B:                             Blaming.             (line  34)
  10017 * C-c M-g b:                             Blaming.             (line  45)
  10018 * C-c M-g B <1>:                         Commands for Buffers Visiting Files.
  10019                                                               (line 137)
  10020 * C-c M-g B b:                           Blaming.             (line  45)
  10021 * C-c M-g B e:                           Blaming.             (line  76)
  10022 * C-c M-g B f:                           Blaming.             (line  68)
  10023 * C-c M-g B q:                           Blaming.             (line  87)
  10024 * C-c M-g B r:                           Blaming.             (line  60)
  10025 * C-c M-g c:                             Commands for Buffers Visiting Files.
  10026                                                               (line 176)
  10027 * C-c M-g D:                             Commands for Buffers Visiting Files.
  10028                                                               (line  91)
  10029 * C-c M-g d:                             Commands for Buffers Visiting Files.
  10030                                                               (line 101)
  10031 * C-c M-g e:                             Blaming.             (line  76)
  10032 * C-c M-g e <1>:                         Commands for Buffers Visiting Files.
  10033                                                               (line 182)
  10034 * C-c M-g f:                             Blaming.             (line  68)
  10035 * C-c M-g g:                             Commands for Buffers Visiting Files.
  10036                                                               (line 166)
  10037 * C-c M-g G:                             Commands for Buffers Visiting Files.
  10038                                                               (line 172)
  10039 * C-c M-g L:                             Commands for Buffers Visiting Files.
  10040                                                               (line 109)
  10041 * C-c M-g l:                             Commands for Buffers Visiting Files.
  10042                                                               (line 119)
  10043 * C-c M-g M:                             Commands for Buffers Visiting Files.
  10044                                                               (line 132)
  10045 * C-c M-g n:                             Commands for Buffers Visiting Files.
  10046                                                               (line 153)
  10047 * C-c M-g p:                             Commands for Buffers Visiting Files.
  10048                                                               (line 149)
  10049 * C-c M-g q:                             Blaming.             (line  87)
  10050 * C-c M-g r:                             Blaming.             (line  60)
  10051 * C-c M-g s:                             Commands for Buffers Visiting Files.
  10052                                                               (line  63)
  10053 * C-c M-g s <1>:                         Commands for Buffers Visiting Files.
  10054                                                               (line  63)
  10055 * C-c M-g t:                             Commands for Buffers Visiting Files.
  10056                                                               (line 129)
  10057 * C-c M-g u:                             Commands for Buffers Visiting Files.
  10058                                                               (line  69)
  10059 * C-c M-g u <1>:                         Commands for Buffers Visiting Files.
  10060                                                               (line  69)
  10061 * C-c M-g v:                             Commands for Buffers Visiting Files.
  10062                                                               (line 156)
  10063 * C-c M-g V:                             Commands for Buffers Visiting Files.
  10064                                                               (line 160)
  10065 * C-c M-i:                               Commit Pseudo Headers.
  10066                                                               (line  35)
  10067 * C-c M-s:                               Editing Commit Messages.
  10068                                                               (line  33)
  10069 * C-c TAB:                               Section Visibility.  (line  14)
  10070 * C-w:                                   Common Commands.     (line  22)
  10071 * C-x g:                                 Status Buffer.       (line  23)
  10072 * C-x M-g:                               Transient Commands.  (line  20)
  10073 * C-x u:                                 Editing Rebase Sequences.
  10074                                                               (line  77)
  10075 * d:                                     Diffing.             (line  22)
  10076 * D:                                     Refreshing Diffs.    (line  16)
  10077 * d c:                                   Diffing.             (line  63)
  10078 * d d:                                   Diffing.             (line  27)
  10079 * D f:                                   Refreshing Diffs.    (line  45)
  10080 * D F:                                   Refreshing Diffs.    (line  49)
  10081 * D g:                                   Refreshing Diffs.    (line  21)
  10082 * d p:                                   Diffing.             (line  56)
  10083 * d r:                                   Diffing.             (line  30)
  10084 * D r:                                   Refreshing Diffs.    (line  41)
  10085 * d s:                                   Diffing.             (line  48)
  10086 * D s:                                   Refreshing Diffs.    (line  25)
  10087 * d t:                                   Diffing.             (line  67)
  10088 * D t:                                   Refreshing Diffs.    (line  38)
  10089 * d u:                                   Diffing.             (line  53)
  10090 * d w:                                   Diffing.             (line  43)
  10091 * D w:                                   Refreshing Diffs.    (line  31)
  10092 * DEL:                                   Log Buffer.          (line  50)
  10093 * DEL <1>:                               Commands Available in Diffs.
  10094                                                               (line  56)
  10095 * DEL <2>:                               Blaming.             (line 103)
  10096 * DEL <3>:                               Editing Rebase Sequences.
  10097                                                               (line  25)
  10098 * e:                                     Ediffing.            (line  10)
  10099 * E:                                     Ediffing.            (line  21)
  10100 * e <1>:                                 Editing Rebase Sequences.
  10101                                                               (line  46)
  10102 * E c:                                   Ediffing.            (line 100)
  10103 * E i:                                   Ediffing.            (line  94)
  10104 * E m:                                   Ediffing.            (line  33)
  10105 * E M:                                   Ediffing.            (line  48)
  10106 * E r:                                   Ediffing.            (line  25)
  10107 * E s:                                   Ediffing.            (line  87)
  10108 * E t:                                   Ediffing.            (line  79)
  10109 * E u:                                   Ediffing.            (line  91)
  10110 * E w:                                   Ediffing.            (line  97)
  10111 * E z:                                   Ediffing.            (line 103)
  10112 * f:                                     Repository List.     (line 111)
  10113 * f <1>:                                 Editing Rebase Sequences.
  10114                                                               (line  52)
  10115 * f <2>:                                 Fetching.            (line  10)
  10116 * F:                                     Pulling.             (line  10)
  10117 * f a:                                   Fetching.            (line  45)
  10118 * f C:                                   Branch Commands.     (line  31)
  10119 * F C:                                   Branch Commands.     (line  31)
  10120 * f e:                                   Fetching.            (line  34)
  10121 * F e:                                   Pulling.             (line  28)
  10122 * f m:                                   Fetching.            (line  48)
  10123 * f o:                                   Fetching.            (line  37)
  10124 * f p:                                   Fetching.            (line  15)
  10125 * F p:                                   Pulling.             (line  14)
  10126 * f r:                                   Fetching.            (line  41)
  10127 * f u:                                   Fetching.            (line  22)
  10128 * F u:                                   Pulling.             (line  21)
  10129 * g:                                     Automatic Refreshing of Magit Buffers.
  10130                                                               (line  26)
  10131 * G:                                     Automatic Refreshing of Magit Buffers.
  10132                                                               (line  34)
  10133 * H:                                     Section Types and Values.
  10134                                                               (line  14)
  10135 * I:                                     Creating Repository. (line   7)
  10136 * j:                                     Log Buffer.          (line  31)
  10137 * j <1>:                                 Commands Available in Diffs.
  10138                                                               (line  43)
  10139 * k:                                     Viewing Git Output.  (line  24)
  10140 * k <1>:                                 Applying.            (line  40)
  10141 * k <2>:                                 Editing Rebase Sequences.
  10142                                                               (line  56)
  10143 * k <3>:                                 Stashing.            (line 118)
  10144 * l:                                     Logging.             (line  30)
  10145 * L:                                     Refreshing Logs.     (line  12)
  10146 * L <1>:                                 Log Buffer.          (line   7)
  10147 * L <2>:                                 Log Margin.          (line  52)
  10148 * l <1>:                                 Editing Rebase Sequences.
  10149                                                               (line  94)
  10150 * l a:                                   Logging.             (line  61)
  10151 * l b:                                   Logging.             (line  58)
  10152 * L d:                                   Log Margin.          (line  66)
  10153 * L g:                                   Refreshing Logs.     (line  17)
  10154 * l h:                                   Logging.             (line  40)
  10155 * l H:                                   Reflog.              (line  18)
  10156 * l l:                                   Logging.             (line  35)
  10157 * l L:                                   Logging.             (line  55)
  10158 * L L:                                   Refreshing Logs.     (line  34)
  10159 * L L <1>:                               Log Margin.          (line  60)
  10160 * L l:                                   Log Margin.          (line  63)
  10161 * l o:                                   Logging.             (line  49)
  10162 * l O:                                   Reflog.              (line  15)
  10163 * l r:                                   Reflog.              (line  12)
  10164 * L s:                                   Refreshing Logs.     (line  21)
  10165 * l u:                                   Logging.             (line  43)
  10166 * L w:                                   Refreshing Logs.     (line  27)
  10167 * m:                                     Repository List.     (line 105)
  10168 * m <1>:                                 Merging.             (line  10)
  10169 * M:                                     Remote Commands.     (line  14)
  10170 * m a:                                   Merging.             (line  42)
  10171 * m a <1>:                               Merging.             (line  91)
  10172 * M a:                                   Remote Commands.     (line  48)
  10173 * M C:                                   Remote Commands.     (line  32)
  10174 * m e:                                   Merging.             (line  30)
  10175 * m i:                                   Merging.             (line  54)
  10176 * M k:                                   Remote Commands.     (line  60)
  10177 * m m:                                   Merging.             (line  18)
  10178 * m m <1>:                               Merging.             (line  86)
  10179 * m n:                                   Merging.             (line  36)
  10180 * m p:                                   Merging.             (line  75)
  10181 * M p:                                   Remote Commands.     (line  63)
  10182 * M P:                                   Remote Commands.     (line  67)
  10183 * M r:                                   Remote Commands.     (line  52)
  10184 * m s:                                   Merging.             (line  67)
  10185 * M u:                                   Remote Commands.     (line  56)
  10186 * M-1:                                   Section Visibility.  (line  45)
  10187 * M-2:                                   Section Visibility.  (line  45)
  10188 * M-3:                                   Section Visibility.  (line  45)
  10189 * M-4:                                   Section Visibility.  (line  45)
  10190 * M-<tab>:                               Section Visibility.  (line  29)
  10191 * M-n:                                   Section Movement.    (line  24)
  10192 * M-n <1>:                               Editing Commit Messages.
  10193                                                               (line  41)
  10194 * M-n <2>:                               Editing Rebase Sequences.
  10195                                                               (line  40)
  10196 * M-p:                                   Section Movement.    (line  19)
  10197 * M-p <1>:                               Editing Commit Messages.
  10198                                                               (line  36)
  10199 * M-p <2>:                               Editing Rebase Sequences.
  10200                                                               (line  37)
  10201 * M-w:                                   Blaming.             (line 134)
  10202 * M-w <1>:                               Common Commands.     (line  39)
  10203 * MM:                                    Editing Rebase Sequences.
  10204                                                               (line 102)
  10205 * Mt:                                    Editing Rebase Sequences.
  10206                                                               (line 108)
  10207 * n:                                     Section Movement.    (line  16)
  10208 * n <1>:                                 Blaming.             (line 118)
  10209 * N:                                     Blaming.             (line 121)
  10210 * n <2>:                                 Editing Rebase Sequences.
  10211                                                               (line  34)
  10212 * n <3>:                                 Minor Mode for Buffers Visiting Blobs.
  10213                                                               (line  16)
  10214 * o:                                     Submodule Transient. (line   7)
  10215 * O:                                     Subtree.             (line   9)
  10216 * o a:                                   Submodule Transient. (line  20)
  10217 * o d:                                   Submodule Transient. (line  45)
  10218 * O e:                                   Subtree.             (line  37)
  10219 * O e p:                                 Subtree.             (line  48)
  10220 * O e s:                                 Subtree.             (line  52)
  10221 * o f:                                   Submodule Transient. (line  51)
  10222 * O i:                                   Subtree.             (line  13)
  10223 * O i a:                                 Subtree.             (line  24)
  10224 * O i c:                                 Subtree.             (line  28)
  10225 * O i f:                                 Subtree.             (line  34)
  10226 * O i m:                                 Subtree.             (line  31)
  10227 * o l:                                   Submodule Transient. (line  48)
  10228 * o p:                                   Submodule Transient. (line  32)
  10229 * o r:                                   Submodule Transient. (line  26)
  10230 * o s:                                   Submodule Transient. (line  40)
  10231 * o u:                                   Submodule Transient. (line  36)
  10232 * p:                                     Section Movement.    (line  11)
  10233 * p <1>:                                 Blaming.             (line 124)
  10234 * P:                                     Blaming.             (line 127)
  10235 * p <2>:                                 Editing Rebase Sequences.
  10236                                                               (line  31)
  10237 * P <1>:                                 Pushing.             (line  10)
  10238 * p <3>:                                 Minor Mode for Buffers Visiting Blobs.
  10239                                                               (line  13)
  10240 * P C:                                   Branch Commands.     (line  31)
  10241 * P e:                                   Pushing.             (line  29)
  10242 * P m:                                   Pushing.             (line  45)
  10243 * P o:                                   Pushing.             (line  33)
  10244 * P p:                                   Pushing.             (line  15)
  10245 * P r:                                   Pushing.             (line  37)
  10246 * P t:                                   Pushing.             (line  52)
  10247 * P T:                                   Pushing.             (line  59)
  10248 * P u:                                   Pushing.             (line  22)
  10249 * q:                                     Quitting Windows.    (line   7)
  10250 * q <1>:                                 Log Buffer.          (line  14)
  10251 * q <2>:                                 Blaming.             (line 130)
  10252 * q <3>:                                 Minor Mode for Buffers Visiting Blobs.
  10253                                                               (line  19)
  10254 * r:                                     Rebasing.            (line  10)
  10255 * r <1>:                                 Editing Rebase Sequences.
  10256                                                               (line  43)
  10257 * r a:                                   Rebasing.            (line 111)
  10258 * r e:                                   Rebasing.            (line  42)
  10259 * r e <1>:                               Rebasing.            (line 107)
  10260 * r f:                                   Rebasing.            (line  79)
  10261 * r i:                                   Rebasing.            (line  76)
  10262 * r k:                                   Rebasing.            (line  91)
  10263 * r m:                                   Rebasing.            (line  83)
  10264 * r p:                                   Rebasing.            (line  28)
  10265 * r r:                                   Rebasing.            (line  97)
  10266 * r s:                                   Rebasing.            (line  47)
  10267 * r s <1>:                               Rebasing.            (line 103)
  10268 * r u:                                   Rebasing.            (line  35)
  10269 * r w:                                   Rebasing.            (line  87)
  10270 * RET:                                   Repository List.     (line 102)
  10271 * RET <1>:                               References Buffer.   (line 159)
  10272 * RET <2>:                               Visiting Files and Blobs from a Diff.
  10273                                                               (line   9)
  10274 * RET <3>:                               Blaming.             (line  91)
  10275 * RET <4>:                               Editing Rebase Sequences.
  10276                                                               (line  15)
  10277 * s:                                     Staging and Unstaging.
  10278                                                               (line  29)
  10279 * S:                                     Staging and Unstaging.
  10280                                                               (line  36)
  10281 * s <1>:                                 Editing Rebase Sequences.
  10282                                                               (line  49)
  10283 * S-<tab>:                               Section Visibility.  (line  33)
  10284 * SPC:                                   Log Buffer.          (line  41)
  10285 * SPC <1>:                               Commands Available in Diffs.
  10286                                                               (line  53)
  10287 * SPC <2>:                               Blaming.             (line  94)
  10288 * SPC <3>:                               Editing Rebase Sequences.
  10289                                                               (line  19)
  10290 * t:                                     Editing Rebase Sequences.
  10291                                                               (line  97)
  10292 * t <1>:                                 Tagging.             (line   9)
  10293 * T:                                     Notes.               (line   9)
  10294 * T a:                                   Notes.               (line  47)
  10295 * T c:                                   Notes.               (line  43)
  10296 * t k:                                   Tagging.             (line  37)
  10297 * T m:                                   Notes.               (line  35)
  10298 * t p:                                   Tagging.             (line  43)
  10299 * T p:                                   Notes.               (line  28)
  10300 * t r:                                   Tagging.             (line  18)
  10301 * T r:                                   Notes.               (line  21)
  10302 * t t:                                   Tagging.             (line  14)
  10303 * T T:                                   Notes.               (line  14)
  10304 * TAB:                                   Section Visibility.  (line  10)
  10305 * u:                                     Repository List.     (line 108)
  10306 * u <1>:                                 Staging and Unstaging.
  10307                                                               (line  42)
  10308 * U:                                     Staging and Unstaging.
  10309                                                               (line  50)
  10310 * v:                                     Applying.            (line  47)
  10311 * V:                                     Reverting.           (line   7)
  10312 * V a:                                   Reverting.           (line  35)
  10313 * V s:                                   Reverting.           (line  32)
  10314 * V V:                                   Reverting.           (line  15)
  10315 * V v:                                   Reverting.           (line  20)
  10316 * V V <1>:                               Reverting.           (line  29)
  10317 * W:                                     Plain Patches.       (line   7)
  10318 * w:                                     Maildir Patches.     (line   9)
  10319 * w a:                                   Plain Patches.       (line  20)
  10320 * w a <1>:                               Maildir Patches.     (line  23)
  10321 * w a <2>:                               Maildir Patches.     (line  38)
  10322 * W c:                                   Plain Patches.       (line  12)
  10323 * w m:                                   Maildir Patches.     (line  20)
  10324 * W s:                                   Plain Patches.       (line  26)
  10325 * w s:                                   Maildir Patches.     (line  34)
  10326 * w w:                                   Maildir Patches.     (line  14)
  10327 * w w <1>:                               Maildir Patches.     (line  31)
  10328 * x:                                     Editing Rebase Sequences.
  10329                                                               (line  62)
  10330 * x <1>:                                 Resetting.           (line   9)
  10331 * X f:                                   Resetting.           (line  44)
  10332 * X h:                                   Resetting.           (line  24)
  10333 * X i:                                   Resetting.           (line  33)
  10334 * X k:                                   Resetting.           (line  28)
  10335 * X m:                                   Resetting.           (line  15)
  10336 * X s:                                   Resetting.           (line  19)
  10337 * X w:                                   Resetting.           (line  39)
  10338 * X w <1>:                               Wip Modes.           (line  64)
  10339 * Y:                                     Cherries.            (line  18)
  10340 * y:                                     References Buffer.   (line   7)
  10341 * y <1>:                                 Editing Rebase Sequences.
  10342                                                               (line  74)
  10343 * y c:                                   References Buffer.   (line  25)
  10344 * y o:                                   References Buffer.   (line  30)
  10345 * y r:                                   References Buffer.   (line  34)
  10346 * y y:                                   References Buffer.   (line  21)
  10347 * z:                                     Stashing.            (line   9)
  10348 * Z:                                     Worktree.            (line   9)
  10349 * z a:                                   Stashing.            (line  52)
  10350 * z b:                                   Stashing.            (line 105)
  10351 * z B:                                   Stashing.            (line 110)
  10352 * Z b:                                   Worktree.            (line  13)
  10353 * Z c:                                   Worktree.            (line  16)
  10354 * z f:                                   Stashing.            (line 115)
  10355 * Z g:                                   Worktree.            (line  26)
  10356 * z i:                                   Stashing.            (line  20)
  10357 * z I:                                   Stashing.            (line  42)
  10358 * z k:                                   Stashing.            (line  98)
  10359 * Z k:                                   Worktree.            (line  22)
  10360 * z l:                                   Stashing.            (line 121)
  10361 * Z m:                                   Worktree.            (line  19)
  10362 * z p:                                   Stashing.            (line  74)
  10363 * z v:                                   Stashing.            (line 102)
  10364 * z w:                                   Stashing.            (line  24)
  10365 * z W:                                   Stashing.            (line  46)
  10366 * z x:                                   Stashing.            (line  30)
  10367 * z z:                                   Stashing.            (line  14)
  10368 * z Z:                                   Stashing.            (line  36)
  10369 
  10370 
  10371 File: magit.info,  Node: Function and Command Index,  Next: Variable Index,  Prev: Keystroke Index,  Up: Top
  10372 
  10373 Appendix D Function and Command Index
  10374 *************************************
  10375 
  10376 
  10377 * Menu:
  10378 
  10379 * bug-reference-mode:                    Commit Mode and Hooks.
  10380                                                               (line  48)
  10381 * forward-line:                          Editing Rebase Sequences.
  10382                                                               (line  34)
  10383 * git-commit-ack:                        Commit Pseudo Headers.
  10384                                                               (line  16)
  10385 * git-commit-cc:                         Commit Pseudo Headers.
  10386                                                               (line  28)
  10387 * git-commit-check-style-conventions:    Commit Message Conventions.
  10388                                                               (line  33)
  10389 * git-commit-insert-pseudo-header:       Commit Pseudo Headers.
  10390                                                               (line  13)
  10391 * git-commit-next-message:               Editing Commit Messages.
  10392                                                               (line  41)
  10393 * git-commit-prev-message:               Editing Commit Messages.
  10394                                                               (line  36)
  10395 * git-commit-propertize-diff:            Commit Mode and Hooks.
  10396                                                               (line  40)
  10397 * git-commit-reported:                   Commit Pseudo Headers.
  10398                                                               (line  31)
  10399 * git-commit-review:                     Commit Pseudo Headers.
  10400                                                               (line  19)
  10401 * git-commit-save-message:               Editing Commit Messages.
  10402                                                               (line  33)
  10403 * git-commit-save-message <1>:           Commit Mode and Hooks.
  10404                                                               (line  26)
  10405 * git-commit-setup-changelog-support:    Commit Mode and Hooks.
  10406                                                               (line  29)
  10407 * git-commit-signoff:                    Commit Pseudo Headers.
  10408                                                               (line  22)
  10409 * git-commit-suggested:                  Commit Pseudo Headers.
  10410                                                               (line  35)
  10411 * git-commit-test:                       Commit Pseudo Headers.
  10412                                                               (line  25)
  10413 * git-commit-turn-on-auto-fill:          Commit Mode and Hooks.
  10414                                                               (line  33)
  10415 * git-commit-turn-on-flyspell:           Commit Mode and Hooks.
  10416                                                               (line  36)
  10417 * git-rebase-backward-line:              Editing Rebase Sequences.
  10418                                                               (line  31)
  10419 * git-rebase-break:                      Editing Rebase Sequences.
  10420                                                               (line  70)
  10421 * git-rebase-edit:                       Editing Rebase Sequences.
  10422                                                               (line  46)
  10423 * git-rebase-exec:                       Editing Rebase Sequences.
  10424                                                               (line  62)
  10425 * git-rebase-fixup:                      Editing Rebase Sequences.
  10426                                                               (line  52)
  10427 * git-rebase-insert:                     Editing Rebase Sequences.
  10428                                                               (line  74)
  10429 * git-rebase-kill-line:                  Editing Rebase Sequences.
  10430                                                               (line  56)
  10431 * git-rebase-label:                      Editing Rebase Sequences.
  10432                                                               (line  94)
  10433 * git-rebase-merge:                      Editing Rebase Sequences.
  10434                                                               (line 102)
  10435 * git-rebase-merge-toggle-editmsg:       Editing Rebase Sequences.
  10436                                                               (line 108)
  10437 * git-rebase-move-line-down:             Editing Rebase Sequences.
  10438                                                               (line  40)
  10439 * git-rebase-move-line-up:               Editing Rebase Sequences.
  10440                                                               (line  37)
  10441 * git-rebase-pick:                       Editing Rebase Sequences.
  10442                                                               (line  59)
  10443 * git-rebase-reset:                      Editing Rebase Sequences.
  10444                                                               (line  97)
  10445 * git-rebase-reword:                     Editing Rebase Sequences.
  10446                                                               (line  43)
  10447 * git-rebase-show-commit:                Editing Rebase Sequences.
  10448                                                               (line  15)
  10449 * git-rebase-show-or-scroll-down:        Editing Rebase Sequences.
  10450                                                               (line  25)
  10451 * git-rebase-show-or-scroll-up:          Editing Rebase Sequences.
  10452                                                               (line  19)
  10453 * git-rebase-squash:                     Editing Rebase Sequences.
  10454                                                               (line  49)
  10455 * git-rebase-undo:                       Editing Rebase Sequences.
  10456                                                               (line  77)
  10457 * ido-enter-magit-status:                Status Buffer.       (line  96)
  10458 * magit-add-section-hook:                Section Hooks.       (line  20)
  10459 * magit-after-save-refresh-status:       Automatic Refreshing of Magit Buffers.
  10460                                                               (line  55)
  10461 * magit-am:                              Maildir Patches.     (line   9)
  10462 * magit-am-abort:                        Maildir Patches.     (line  38)
  10463 * magit-am-apply-maildir:                Maildir Patches.     (line  20)
  10464 * magit-am-apply-patches:                Maildir Patches.     (line  14)
  10465 * magit-am-continue:                     Maildir Patches.     (line  31)
  10466 * magit-am-skip:                         Maildir Patches.     (line  34)
  10467 * magit-apply:                           Applying.            (line  34)
  10468 * magit-bisect:                          Bisecting.           (line   9)
  10469 * magit-bisect-bad:                      Bisecting.           (line  32)
  10470 * magit-bisect-good:                     Bisecting.           (line  36)
  10471 * magit-bisect-mark:                     Bisecting.           (line  40)
  10472 * magit-bisect-reset:                    Bisecting.           (line  51)
  10473 * magit-bisect-run:                      Bisecting.           (line  26)
  10474 * magit-bisect-skip:                     Bisecting.           (line  46)
  10475 * magit-bisect-start:                    Bisecting.           (line  16)
  10476 * magit-blame:                           Blaming.             (line  28)
  10477 * magit-blame <1>:                       Blaming.             (line  34)
  10478 * magit-blame <2>:                       Blaming.             (line 115)
  10479 * magit-blame <3>:                       Commands for Buffers Visiting Files.
  10480                                                               (line  52)
  10481 * magit-blame <4>:                       Commands for Buffers Visiting Files.
  10482                                                               (line 137)
  10483 * magit-blame-addition:                  Blaming.             (line  28)
  10484 * magit-blame-addition <1>:              Blaming.             (line  45)
  10485 * magit-blame-additions:                 Commands for Buffers Visiting Files.
  10486                                                               (line  52)
  10487 * magit-blame-copy-hash:                 Blaming.             (line 134)
  10488 * magit-blame-cycle-style:               Blaming.             (line 141)
  10489 * magit-blame-echo:                      Blaming.             (line  28)
  10490 * magit-blame-echo <1>:                  Blaming.             (line  76)
  10491 * magit-blame-echo <2>:                  Commands for Buffers Visiting Files.
  10492                                                               (line  52)
  10493 * magit-blame-next-chunk:                Blaming.             (line 118)
  10494 * magit-blame-next-chunk-same-commit:    Blaming.             (line 121)
  10495 * magit-blame-previous-chunk:            Blaming.             (line 124)
  10496 * magit-blame-previous-chunk-same-commit: Blaming.            (line 127)
  10497 * magit-blame-quit:                      Blaming.             (line  28)
  10498 * magit-blame-quit <1>:                  Blaming.             (line  87)
  10499 * magit-blame-quit <2>:                  Blaming.             (line 130)
  10500 * magit-blame-quit <3>:                  Commands for Buffers Visiting Files.
  10501                                                               (line  52)
  10502 * magit-blame-removal:                   Blaming.             (line  28)
  10503 * magit-blame-removal <1>:               Blaming.             (line  60)
  10504 * magit-blame-removal <2>:               Commands for Buffers Visiting Files.
  10505                                                               (line  52)
  10506 * magit-blame-reverse:                   Blaming.             (line  28)
  10507 * magit-blame-reverse <1>:               Blaming.             (line  68)
  10508 * magit-blame-reverse <2>:               Commands for Buffers Visiting Files.
  10509                                                               (line  52)
  10510 * magit-blob-next:                       Commands for Buffers Visiting Files.
  10511                                                               (line  52)
  10512 * magit-blob-next <1>:                   Commands for Buffers Visiting Files.
  10513                                                               (line 153)
  10514 * magit-blob-next <2>:                   Minor Mode for Buffers Visiting Blobs.
  10515                                                               (line  16)
  10516 * magit-blob-previous:                   Commands for Buffers Visiting Files.
  10517                                                               (line  52)
  10518 * magit-blob-previous <1>:               Commands for Buffers Visiting Files.
  10519                                                               (line 149)
  10520 * magit-blob-previous <2>:               Minor Mode for Buffers Visiting Blobs.
  10521                                                               (line  13)
  10522 * magit-blob-visit-file:                 Commands for Buffers Visiting Files.
  10523                                                               (line  52)
  10524 * magit-blob-visit-file <1>:             Commands for Buffers Visiting Files.
  10525                                                               (line 160)
  10526 * magit-branch:                          Branch Commands.     (line  13)
  10527 * magit-branch-and-checkout:             Branch Commands.     (line  63)
  10528 * magit-branch-checkout:                 Branch Commands.     (line  69)
  10529 * magit-branch-configure:                Branch Commands.     (line  31)
  10530 * magit-branch-create:                   Branch Commands.     (line  54)
  10531 * magit-branch-delete:                   Branch Commands.     (line 138)
  10532 * magit-branch-or-checkout:              Branch Commands.     (line 257)
  10533 * magit-branch-orphan:                   Branch Commands.     (line 253)
  10534 * magit-branch-rename:                   Branch Commands.     (line 149)
  10535 * magit-branch-reset:                    Branch Commands.     (line 123)
  10536 * magit-branch-shelve:                   Auxiliary Branch Commands.
  10537                                                               (line   9)
  10538 * magit-branch-spinoff:                  Branch Commands.     (line  91)
  10539 * magit-branch-spinout:                  Branch Commands.     (line 118)
  10540 * magit-branch-unshelve:                 Auxiliary Branch Commands.
  10541                                                               (line  19)
  10542 * magit-builtin-completing-read:         Support for Completion Frameworks.
  10543                                                               (line  41)
  10544 * magit-bundle:                          Bundle.              (line   8)
  10545 * magit-call-git:                        Calling Git for Effect.
  10546                                                               (line  28)
  10547 * magit-call-process:                    Calling Git for Effect.
  10548                                                               (line  31)
  10549 * magit-cancel-section:                  Creating Sections.   (line  69)
  10550 * magit-checkout:                        Branch Commands.     (line  47)
  10551 * magit-cherry:                          Cherries.            (line  18)
  10552 * magit-cherry-apply:                    Cherry Picking.      (line  23)
  10553 * magit-cherry-copy:                     Cherry Picking.      (line  17)
  10554 * magit-cherry-donate:                   Cherry Picking.      (line  51)
  10555 * magit-cherry-harvest:                  Cherry Picking.      (line  40)
  10556 * magit-cherry-pick:                     Cherry Picking.      (line   9)
  10557 * magit-cherry-spinoff:                  Cherry Picking.      (line  72)
  10558 * magit-cherry-spinout:                  Cherry Picking.      (line  62)
  10559 * magit-clone:                           Cloning Repository.  (line  20)
  10560 * magit-clone-bare:                      Cloning Repository.  (line  44)
  10561 * magit-clone-mirror:                    Cloning Repository.  (line  48)
  10562 * magit-clone-regular:                   Cloning Repository.  (line  28)
  10563 * magit-clone-shallow:                   Cloning Repository.  (line  32)
  10564 * magit-clone-shallow-exclude:           Cloning Repository.  (line  61)
  10565 * magit-clone-shallow-since:             Cloning Repository.  (line  55)
  10566 * magit-clone-sparse:                    Cloning Repository.  (line  38)
  10567 * magit-commit:                          Initiating a Commit. (line   9)
  10568 * magit-commit <1>:                      Commands for Buffers Visiting Files.
  10569                                                               (line  52)
  10570 * magit-commit <2>:                      Commands for Buffers Visiting Files.
  10571                                                               (line 176)
  10572 * magit-commit-amend:                    Initiating a Commit. (line  18)
  10573 * magit-commit-augment:                  Initiating a Commit. (line  59)
  10574 * magit-commit-create:                   Initiating a Commit. (line  14)
  10575 * magit-commit-extend:                   Initiating a Commit. (line  21)
  10576 * magit-commit-fixup:                    Initiating a Commit. (line  39)
  10577 * magit-commit-instant-fixup:            Initiating a Commit. (line  46)
  10578 * magit-commit-instant-squash:           Initiating a Commit. (line  56)
  10579 * magit-commit-reword:                   Initiating a Commit. (line  30)
  10580 * magit-commit-squash:                   Initiating a Commit. (line  49)
  10581 * magit-completing-read:                 Support for Completion Frameworks.
  10582                                                               (line  57)
  10583 * magit-copy-buffer-revision:            Common Commands.     (line  39)
  10584 * magit-copy-section-value:              Common Commands.     (line  22)
  10585 * magit-current-section:                 Section Selection.   (line   6)
  10586 * magit-cycle-margin-style:              Log Margin.          (line  63)
  10587 * magit-debug-git-executable:            Git Executable.      (line  55)
  10588 * magit-debug-git-executable <1>:        Debugging Tools.     (line  57)
  10589 * magit-define-section-jumper:           Creating Sections.   (line  74)
  10590 * magit-describe-section:                Section Types and Values.
  10591                                                               (line  14)
  10592 * magit-describe-section-briefly:        Section Types and Values.
  10593                                                               (line  17)
  10594 * magit-describe-section-briefly <1>:    Matching Sections.   (line   7)
  10595 * magit-diff:                            Diffing.             (line  22)
  10596 * magit-diff <1>:                        Commands for Buffers Visiting Files.
  10597                                                               (line  52)
  10598 * magit-diff <2>:                        Commands for Buffers Visiting Files.
  10599                                                               (line  91)
  10600 * magit-diff-buffer-file:                Commands for Buffers Visiting Files.
  10601                                                               (line  52)
  10602 * magit-diff-buffer-file <1>:            Commands for Buffers Visiting Files.
  10603                                                               (line 101)
  10604 * magit-diff-default-context:            Refreshing Diffs.    (line  68)
  10605 * magit-diff-dwim:                       Diffing.             (line  27)
  10606 * magit-diff-edit-hunk-commit:           Commands Available in Diffs.
  10607                                                               (line  24)
  10608 * magit-diff-flip-revs:                  Refreshing Diffs.    (line  45)
  10609 * magit-diff-less-context:               Refreshing Diffs.    (line  62)
  10610 * magit-diff-more-context:               Refreshing Diffs.    (line  65)
  10611 * magit-diff-paths:                      Diffing.             (line  56)
  10612 * magit-diff-range:                      Diffing.             (line  30)
  10613 * magit-diff-refresh:                    Refreshing Diffs.    (line  16)
  10614 * magit-diff-refresh <1>:                Refreshing Diffs.    (line  21)
  10615 * magit-diff-save-default-arguments:     Refreshing Diffs.    (line  31)
  10616 * magit-diff-scope:                      Matching Sections.   (line 110)
  10617 * magit-diff-set-default-arguments:      Refreshing Diffs.    (line  25)
  10618 * magit-diff-show-or-scroll-down:        Log Buffer.          (line  50)
  10619 * magit-diff-show-or-scroll-down <1>:    Blaming.             (line 103)
  10620 * magit-diff-show-or-scroll-up:          Log Buffer.          (line  41)
  10621 * magit-diff-show-or-scroll-up <1>:      Blaming.             (line  94)
  10622 * magit-diff-staged:                     Diffing.             (line  48)
  10623 * magit-diff-switch-range-type:          Refreshing Diffs.    (line  41)
  10624 * magit-diff-toggle-file-filter:         Refreshing Diffs.    (line  49)
  10625 * magit-diff-toggle-refine-hunk:         Refreshing Diffs.    (line  38)
  10626 * magit-diff-trace-definition:           Commands Available in Diffs.
  10627                                                               (line  15)
  10628 * magit-diff-type:                       Matching Sections.   (line  88)
  10629 * magit-diff-unstaged:                   Diffing.             (line  53)
  10630 * magit-diff-visit-file:                 Visiting Files and Blobs from a Diff.
  10631                                                               (line   9)
  10632 * magit-diff-visit-file-other-frame:     Visiting Files and Blobs from a Diff.
  10633                                                               (line  71)
  10634 * magit-diff-visit-file-other-window:    Visiting Files and Blobs from a Diff.
  10635                                                               (line  70)
  10636 * magit-diff-visit-file-worktree:        Visiting Files and Blobs from a Diff.
  10637                                                               (line  50)
  10638 * magit-diff-visit-worktree-file-other-frame: Visiting Files and Blobs from a Diff.
  10639                                                               (line  73)
  10640 * magit-diff-visit-worktree-file-other-window: Visiting Files and Blobs from a Diff.
  10641                                                               (line  72)
  10642 * magit-diff-while-committing:           Refreshing Diffs.    (line  75)
  10643 * magit-diff-while-committing <1>:       Editing Commit Messages.
  10644                                                               (line  54)
  10645 * magit-diff-working-tree:               Diffing.             (line  43)
  10646 * magit-disable-section-inserter:        Per-Repository Configuration.
  10647                                                               (line  31)
  10648 * magit-discard:                         Applying.            (line  40)
  10649 * magit-dispatch:                        Transient Commands.  (line  20)
  10650 * magit-display-buffer:                  Switching Buffers.   (line   6)
  10651 * magit-display-buffer-fullcolumn-most-v1: Switching Buffers. (line  68)
  10652 * magit-display-buffer-fullframe-status-topleft-v1: Switching Buffers.
  10653                                                               (line  59)
  10654 * magit-display-buffer-fullframe-status-v1: Switching Buffers.
  10655                                                               (line  54)
  10656 * magit-display-buffer-same-window-except-diff-v1: Switching Buffers.
  10657                                                               (line  49)
  10658 * magit-display-buffer-traditional:      Switching Buffers.   (line  42)
  10659 * magit-display-repository-buffer:       Common Commands.     (line   9)
  10660 * magit-display-repository-buffer <1>:   Commands for Buffers Visiting Files.
  10661                                                               (line  52)
  10662 * magit-display-repository-buffer <2>:   Commands for Buffers Visiting Files.
  10663                                                               (line 172)
  10664 * magit-ediff:                           Ediffing.            (line  21)
  10665 * magit-ediff-compare:                   Ediffing.            (line  25)
  10666 * magit-ediff-dwim:                      Ediffing.            (line  10)
  10667 * magit-ediff-resolve-all:               Ediffing.            (line  48)
  10668 * magit-ediff-resolve-rest:              Ediffing.            (line  33)
  10669 * magit-ediff-show-commit:               Ediffing.            (line 100)
  10670 * magit-ediff-show-staged:               Ediffing.            (line  94)
  10671 * magit-ediff-show-stash:                Ediffing.            (line 103)
  10672 * magit-ediff-show-unstaged:             Ediffing.            (line  91)
  10673 * magit-ediff-show-working-tree:         Ediffing.            (line  97)
  10674 * magit-ediff-stage:                     Ediffing.            (line  87)
  10675 * magit-edit-line-commit:                Commands for Buffers Visiting Files.
  10676                                                               (line  52)
  10677 * magit-edit-line-commit <1>:            Commands for Buffers Visiting Files.
  10678                                                               (line 182)
  10679 * magit-emacs-Q-command:                 Debugging Tools.     (line  16)
  10680 * magit-fetch:                           Fetching.            (line  10)
  10681 * magit-fetch-all:                       Fetching.            (line  45)
  10682 * magit-fetch-branch:                    Fetching.            (line  37)
  10683 * magit-fetch-from-pushremote:           Fetching.            (line  15)
  10684 * magit-fetch-from-upstream:             Fetching.            (line  22)
  10685 * magit-fetch-modules:                   Submodule Transient. (line  51)
  10686 * magit-fetch-other:                     Fetching.            (line  34)
  10687 * magit-fetch-refspec:                   Fetching.            (line  41)
  10688 * magit-file-checkout:                   Resetting.           (line  44)
  10689 * magit-file-checkout <1>:               Commands for Buffers Visiting Files.
  10690                                                               (line  52)
  10691 * magit-file-checkout <2>:               Commands for Buffers Visiting Files.
  10692                                                               (line  86)
  10693 * magit-file-delete:                     Commands for Buffers Visiting Files.
  10694                                                               (line  52)
  10695 * magit-file-delete <1>:                 Commands for Buffers Visiting Files.
  10696                                                               (line  82)
  10697 * magit-file-dispatch:                   Commands for Buffers Visiting Files.
  10698                                                               (line  52)
  10699 * magit-file-dispatch <1>:               Commands for Buffers Visiting Files.
  10700                                                               (line  58)
  10701 * magit-file-rename:                     Commands for Buffers Visiting Files.
  10702                                                               (line  52)
  10703 * magit-file-rename <1>:                 Commands for Buffers Visiting Files.
  10704                                                               (line  78)
  10705 * magit-file-untrack:                    Commands for Buffers Visiting Files.
  10706                                                               (line  52)
  10707 * magit-file-untrack <1>:                Commands for Buffers Visiting Files.
  10708                                                               (line  74)
  10709 * magit-find-file:                       General-Purpose Visit Commands.
  10710                                                               (line   9)
  10711 * magit-find-file <1>:                   Commands for Buffers Visiting Files.
  10712                                                               (line  52)
  10713 * magit-find-file <2>:                   Commands for Buffers Visiting Files.
  10714                                                               (line 156)
  10715 * magit-find-file-other-frame:           General-Purpose Visit Commands.
  10716                                                               (line  19)
  10717 * magit-find-file-other-window:          General-Purpose Visit Commands.
  10718                                                               (line  14)
  10719 * magit-generate-buffer-name-default-function: Naming Buffers.
  10720                                                               (line  16)
  10721 * magit-get-section:                     Matching Sections.   (line  14)
  10722 * magit-git:                             Calling Git for Effect.
  10723                                                               (line  46)
  10724 * magit-git-command:                     Running Git Manually.
  10725                                                               (line  25)
  10726 * magit-git-command-topdir:              Running Git Manually.
  10727                                                               (line  17)
  10728 * magit-git-exit-code:                   Getting a Value from Git.
  10729                                                               (line  10)
  10730 * magit-git-failure:                     Getting a Value from Git.
  10731                                                               (line  17)
  10732 * magit-git-false:                       Getting a Value from Git.
  10733                                                               (line  25)
  10734 * magit-git-insert:                      Getting a Value from Git.
  10735                                                               (line  29)
  10736 * magit-git-items:                       Getting a Value from Git.
  10737                                                               (line  41)
  10738 * magit-git-lines:                       Getting a Value from Git.
  10739                                                               (line  37)
  10740 * magit-git-mergetool:                   Running Git Manually.
  10741                                                               (line  62)
  10742 * magit-git-mergetool <1>:               Ediffing.            (line  79)
  10743 * magit-git-str:                         Getting a Value from Git.
  10744                                                               (line  75)
  10745 * magit-git-string:                      Getting a Value from Git.
  10746                                                               (line  32)
  10747 * magit-git-success:                     Getting a Value from Git.
  10748                                                               (line  13)
  10749 * magit-git-true:                        Getting a Value from Git.
  10750                                                               (line  21)
  10751 * magit-git-wash:                        Calling Git for Effect.
  10752                                                               (line  50)
  10753 * magit-go-backward:                     Log Buffer.          (line  20)
  10754 * magit-go-backward <1>:                 Refreshing Diffs.    (line  84)
  10755 * magit-go-forward:                      Log Buffer.          (line  23)
  10756 * magit-go-forward <1>:                  Refreshing Diffs.    (line  87)
  10757 * magit-hunk-set-window-start:           Section Movement.    (line  45)
  10758 * magit-ido-completing-read:             Support for Completion Frameworks.
  10759                                                               (line  46)
  10760 * magit-init:                            Creating Repository. (line   7)
  10761 * magit-insert-am-sequence:              Status Sections.     (line  25)
  10762 * magit-insert-assumed-unchanged-files:  Status Sections.     (line  98)
  10763 * magit-insert-bisect-log:               Status Sections.     (line  39)
  10764 * magit-insert-bisect-output:            Status Sections.     (line  33)
  10765 * magit-insert-bisect-rest:              Status Sections.     (line  36)
  10766 * magit-insert-diff-filter-header:       Status Header Sections.
  10767                                                               (line  35)
  10768 * magit-insert-error-header:             Status Header Sections.
  10769                                                               (line  26)
  10770 * magit-insert-head-branch-header:       Status Header Sections.
  10771                                                               (line  38)
  10772 * magit-insert-heading:                  Creating Sections.   (line  41)
  10773 * magit-insert-ignored-files:            Status Sections.     (line  83)
  10774 * magit-insert-local-branches:           References Sections. (line  16)
  10775 * magit-insert-merge-log:                Status Sections.     (line  17)
  10776 * magit-insert-modules:                  Status Module Sections.
  10777                                                               (line  12)
  10778 * magit-insert-modules-overview:         Status Module Sections.
  10779                                                               (line  30)
  10780 * magit-insert-modules-unpulled-from-pushremote: Status Module Sections.
  10781                                                               (line  45)
  10782 * magit-insert-modules-unpulled-from-upstream: Status Module Sections.
  10783                                                               (line  40)
  10784 * magit-insert-modules-unpushed-to-pushremote: Status Module Sections.
  10785                                                               (line  55)
  10786 * magit-insert-modules-unpushed-to-upstream: Status Module Sections.
  10787                                                               (line  50)
  10788 * magit-insert-push-branch-header:       Status Header Sections.
  10789                                                               (line  45)
  10790 * magit-insert-rebase-sequence:          Status Sections.     (line  21)
  10791 * magit-insert-recent-commits:           Status Sections.     (line 110)
  10792 * magit-insert-remote-branches:          References Sections. (line  19)
  10793 * magit-insert-remote-header:            Status Header Sections.
  10794                                                               (line  58)
  10795 * magit-insert-repo-header:              Status Header Sections.
  10796                                                               (line  55)
  10797 * magit-insert-section:                  Creating Sections.   (line   6)
  10798 * magit-insert-sequencer-sequence:       Status Sections.     (line  29)
  10799 * magit-insert-skip-worktree-files:      Status Sections.     (line  92)
  10800 * magit-insert-staged-changes:           Status Sections.     (line  53)
  10801 * magit-insert-stashes:                  Status Sections.     (line  56)
  10802 * magit-insert-status-headers:           Status Header Sections.
  10803                                                               (line  12)
  10804 * magit-insert-tags:                     References Sections. (line  22)
  10805 * magit-insert-tags-header:              Status Header Sections.
  10806                                                               (line  49)
  10807 * magit-insert-tracked-files:            Status Sections.     (line  80)
  10808 * magit-insert-unpulled-cherries:        Status Sections.     (line 119)
  10809 * magit-insert-unpulled-from-pushremote: Status Sections.     (line  66)
  10810 * magit-insert-unpulled-from-upstream:   Status Sections.     (line  62)
  10811 * magit-insert-unpulled-or-recent-commits: Status Sections.   (line 104)
  10812 * magit-insert-unpushed-cherries:        Status Sections.     (line 125)
  10813 * magit-insert-unpushed-to-pushremote:   Status Sections.     (line  74)
  10814 * magit-insert-unpushed-to-upstream:     Status Sections.     (line  70)
  10815 * magit-insert-unstaged-changes:         Status Sections.     (line  50)
  10816 * magit-insert-untracked-files:          Status Sections.     (line  42)
  10817 * magit-insert-upstream-branch-header:   Status Header Sections.
  10818                                                               (line  41)
  10819 * magit-insert-user-header:              Status Header Sections.
  10820                                                               (line  65)
  10821 * magit-jump-to-diffstat-or-diff:        Commands Available in Diffs.
  10822                                                               (line  43)
  10823 * magit-kill-this-buffer:                Minor Mode for Buffers Visiting Blobs.
  10824                                                               (line  19)
  10825 * magit-list-repositories:               Repository List.     (line   6)
  10826 * magit-list-submodules:                 Listing Submodules.  (line  13)
  10827 * magit-list-submodules <1>:             Submodule Transient. (line  48)
  10828 * magit-log:                             Logging.             (line  30)
  10829 * magit-log <1>:                         Commands for Buffers Visiting Files.
  10830                                                               (line  52)
  10831 * magit-log <2>:                         Commands for Buffers Visiting Files.
  10832                                                               (line 109)
  10833 * magit-log-all:                         Logging.             (line  61)
  10834 * magit-log-all-branches:                Logging.             (line  58)
  10835 * magit-log-branches:                    Logging.             (line  55)
  10836 * magit-log-buffer-file:                 Commands for Buffers Visiting Files.
  10837                                                               (line  52)
  10838 * magit-log-buffer-file <1>:             Commands for Buffers Visiting Files.
  10839                                                               (line 119)
  10840 * magit-log-bury-buffer:                 Log Buffer.          (line  14)
  10841 * magit-log-current:                     Logging.             (line  35)
  10842 * magit-log-double-commit-limit:         Log Buffer.          (line  64)
  10843 * magit-log-half-commit-limit:           Log Buffer.          (line  67)
  10844 * magit-log-head:                        Logging.             (line  40)
  10845 * magit-log-maybe-show-more-commits:     Section Movement.    (line  58)
  10846 * magit-log-maybe-update-blob-buffer:    Section Movement.    (line  72)
  10847 * magit-log-maybe-update-revision-buffer: Section Movement.   (line  65)
  10848 * magit-log-merged:                      Commands for Buffers Visiting Files.
  10849                                                               (line  52)
  10850 * magit-log-merged <1>:                  Commands for Buffers Visiting Files.
  10851                                                               (line 132)
  10852 * magit-log-move-to-parent:              Log Buffer.          (line  26)
  10853 * magit-log-move-to-revision:            Log Buffer.          (line  31)
  10854 * magit-log-other:                       Logging.             (line  49)
  10855 * magit-log-refresh:                     Refreshing Logs.     (line  12)
  10856 * magit-log-refresh <1>:                 Refreshing Logs.     (line  17)
  10857 * magit-log-refresh <2>:                 Log Buffer.          (line   7)
  10858 * magit-log-related:                     Logging.             (line  43)
  10859 * magit-log-save-default-arguments:      Refreshing Logs.     (line  27)
  10860 * magit-log-select-pick:                 Select from Log.     (line  21)
  10861 * magit-log-select-quit:                 Select from Log.     (line  26)
  10862 * magit-log-set-default-arguments:       Refreshing Logs.     (line  21)
  10863 * magit-log-toggle-commit-limit:         Log Buffer.          (line  59)
  10864 * magit-log-trace-definition:            Commands for Buffers Visiting Files.
  10865                                                               (line  52)
  10866 * magit-log-trace-definition <1>:        Commands for Buffers Visiting Files.
  10867                                                               (line 129)
  10868 * magit-margin-settings:                 Log Margin.          (line  52)
  10869 * magit-maybe-set-dedicated:             Switching Buffers.   (line  89)
  10870 * magit-merge:                           Merging.             (line  10)
  10871 * magit-merge <1>:                       Merging.             (line  86)
  10872 * magit-merge-abort:                     Merging.             (line  91)
  10873 * magit-merge-absorb:                    Merging.             (line  42)
  10874 * magit-merge-editmsg:                   Merging.             (line  30)
  10875 * magit-merge-into:                      Merging.             (line  54)
  10876 * magit-merge-nocommit:                  Merging.             (line  36)
  10877 * magit-merge-plain:                     Merging.             (line  18)
  10878 * magit-merge-preview:                   Merging.             (line  75)
  10879 * magit-merge-squash:                    Merging.             (line  67)
  10880 * magit-mode-bury-buffer:                Quitting Windows.    (line   7)
  10881 * magit-mode-display-buffer:             Refreshing Buffers.  (line  32)
  10882 * magit-mode-quit-window:                Quitting Windows.    (line  34)
  10883 * magit-mode-setup:                      Refreshing Buffers.  (line  17)
  10884 * magit-notes:                           Notes.               (line   9)
  10885 * magit-notes-edit:                      Notes.               (line  14)
  10886 * magit-notes-merge:                     Notes.               (line  35)
  10887 * magit-notes-merge-abort:               Notes.               (line  47)
  10888 * magit-notes-merge-commit:              Notes.               (line  43)
  10889 * magit-notes-prune:                     Notes.               (line  28)
  10890 * magit-notes-remove:                    Notes.               (line  21)
  10891 * magit-patch:                           Plain Patches.       (line   7)
  10892 * magit-patch-apply:                     Plain Patches.       (line  20)
  10893 * magit-patch-apply <1>:                 Maildir Patches.     (line  23)
  10894 * magit-patch-create:                    Plain Patches.       (line  12)
  10895 * magit-patch-save:                      Plain Patches.       (line  26)
  10896 * magit-pop-revision-stack:              Using the Revision Stack.
  10897                                                               (line   7)
  10898 * magit-process:                         Viewing Git Output.  (line  17)
  10899 * magit-process-file:                    Getting a Value from Git.
  10900                                                               (line  57)
  10901 * magit-process-git:                     Getting a Value from Git.
  10902                                                               (line  50)
  10903 * magit-process-kill:                    Viewing Git Output.  (line  24)
  10904 * magit-pull:                            Pulling.             (line  10)
  10905 * magit-pull-branch:                     Pulling.             (line  28)
  10906 * magit-pull-from-pushremote:            Pulling.             (line  14)
  10907 * magit-pull-from-upstream:              Pulling.             (line  21)
  10908 * magit-push:                            Pushing.             (line  10)
  10909 * magit-push-current:                    Pushing.             (line  29)
  10910 * magit-push-current-to-pushremote:      Pushing.             (line  15)
  10911 * magit-push-current-to-upstream:        Pushing.             (line  22)
  10912 * magit-push-implicitly:                 Pushing.             (line  74)
  10913 * magit-push-matching:                   Pushing.             (line  45)
  10914 * magit-push-other:                      Pushing.             (line  33)
  10915 * magit-push-refspecs:                   Pushing.             (line  37)
  10916 * magit-push-tag:                        Pushing.             (line  59)
  10917 * magit-push-tags:                       Pushing.             (line  52)
  10918 * magit-push-to-remote:                  Pushing.             (line  91)
  10919 * magit-rebase:                          Rebasing.            (line  10)
  10920 * magit-rebase-abort:                    Rebasing.            (line 111)
  10921 * magit-rebase-autosquash:               Rebasing.            (line  79)
  10922 * magit-rebase-branch:                   Rebasing.            (line  42)
  10923 * magit-rebase-continue:                 Rebasing.            (line  97)
  10924 * magit-rebase-edit:                     Rebasing.            (line 107)
  10925 * magit-rebase-edit-commit:              Rebasing.            (line  83)
  10926 * magit-rebase-interactive:              Rebasing.            (line  76)
  10927 * magit-rebase-onto-pushremote:          Rebasing.            (line  28)
  10928 * magit-rebase-onto-upstream:            Rebasing.            (line  35)
  10929 * magit-rebase-remove-commit:            Rebasing.            (line  91)
  10930 * magit-rebase-reword-commit:            Rebasing.            (line  87)
  10931 * magit-rebase-skip:                     Rebasing.            (line 103)
  10932 * magit-rebase-subset:                   Rebasing.            (line  47)
  10933 * magit-reflog-current:                  Reflog.              (line  12)
  10934 * magit-reflog-head:                     Reflog.              (line  18)
  10935 * magit-reflog-other:                    Reflog.              (line  15)
  10936 * magit-refresh:                         Automatic Refreshing of Magit Buffers.
  10937                                                               (line  26)
  10938 * magit-refresh-all:                     Automatic Refreshing of Magit Buffers.
  10939                                                               (line  34)
  10940 * magit-refs-set-show-commit-count:      References Buffer.   (line  34)
  10941 * magit-region-sections:                 Section Selection.   (line   9)
  10942 * magit-region-values:                   Section Selection.   (line  35)
  10943 * magit-remote:                          Remote Commands.     (line  14)
  10944 * magit-remote-add:                      Remote Commands.     (line  48)
  10945 * magit-remote-configure:                Remote Commands.     (line  32)
  10946 * magit-remote-prune:                    Remote Commands.     (line  63)
  10947 * magit-remote-prune-refspecs:           Remote Commands.     (line  67)
  10948 * magit-remote-remove:                   Remote Commands.     (line  60)
  10949 * magit-remote-rename:                   Remote Commands.     (line  52)
  10950 * magit-remote-set-url:                  Remote Commands.     (line  56)
  10951 * magit-repolist-column-branch:          Repository List.     (line  51)
  10952 * magit-repolist-column-branches:        Repository List.     (line  58)
  10953 * magit-repolist-column-flag:            Repository List.     (line  64)
  10954 * magit-repolist-column-flags:           Repository List.     (line  76)
  10955 * magit-repolist-column-ident:           Repository List.     (line  40)
  10956 * magit-repolist-column-path:            Repository List.     (line  44)
  10957 * magit-repolist-column-stashes:         Repository List.     (line  61)
  10958 * magit-repolist-column-unpulled-from-pushremote: Repository List.
  10959                                                               (line  87)
  10960 * magit-repolist-column-unpulled-from-upstream: Repository List.
  10961                                                               (line  83)
  10962 * magit-repolist-column-unpushed-to-pushremote: Repository List.
  10963                                                               (line  95)
  10964 * magit-repolist-column-unpushed-to-upstream: Repository List.
  10965                                                               (line  91)
  10966 * magit-repolist-column-upstream:        Repository List.     (line  54)
  10967 * magit-repolist-column-version:         Repository List.     (line  47)
  10968 * magit-repolist-fetch:                  Repository List.     (line 111)
  10969 * magit-repolist-find-file-other-frame:  Repository List.     (line 115)
  10970 * magit-repolist-mark:                   Repository List.     (line 105)
  10971 * magit-repolist-status:                 Repository List.     (line 102)
  10972 * magit-repolist-unmark:                 Repository List.     (line 108)
  10973 * magit-reset-hard:                      Resetting.           (line  24)
  10974 * magit-reset-index:                     Staging and Unstaging.
  10975                                                               (line  78)
  10976 * magit-reset-index <1>:                 Resetting.           (line  33)
  10977 * magit-reset-keep:                      Resetting.           (line  28)
  10978 * magit-reset-mixed:                     Resetting.           (line  15)
  10979 * magit-reset-quickly:                   Resetting.           (line   9)
  10980 * magit-reset-soft:                      Resetting.           (line  19)
  10981 * magit-reset-worktree:                  Resetting.           (line  39)
  10982 * magit-reset-worktree <1>:              Wip Modes.           (line  64)
  10983 * magit-restore-window-configuration:    Quitting Windows.    (line  24)
  10984 * magit-reverse:                         Applying.            (line  47)
  10985 * magit-reverse-in-index:                Staging and Unstaging.
  10986                                                               (line  58)
  10987 * magit-revert:                          Reverting.           (line   7)
  10988 * magit-revert-and-commit:               Reverting.           (line  15)
  10989 * magit-revert-no-commit:                Reverting.           (line  20)
  10990 * magit-run:                             Running Git Manually.
  10991                                                               (line  13)
  10992 * magit-run-git:                         Calling Git for Effect.
  10993                                                               (line  34)
  10994 * magit-run-git-async:                   Calling Git for Effect.
  10995                                                               (line  59)
  10996 * magit-run-git-gui:                     Running Git Manually.
  10997                                                               (line  59)
  10998 * magit-run-git-with-editor:             Calling Git for Effect.
  10999                                                               (line  71)
  11000 * magit-run-git-with-input:              Calling Git for Effect.
  11001                                                               (line  37)
  11002 * magit-run-gitk:                        Running Git Manually.
  11003                                                               (line  50)
  11004 * magit-run-gitk-all:                    Running Git Manually.
  11005                                                               (line  53)
  11006 * magit-run-gitk-branches:               Running Git Manually.
  11007                                                               (line  56)
  11008 * magit-save-window-configuration:       Switching Buffers.   (line  80)
  11009 * magit-section-backward:                Section Movement.    (line  11)
  11010 * magit-section-backward-siblings:       Section Movement.    (line  19)
  11011 * magit-section-case:                    Matching Sections.   (line  66)
  11012 * magit-section-cycle:                   Section Visibility.  (line  14)
  11013 * magit-section-cycle-diffs:             Section Visibility.  (line  29)
  11014 * magit-section-cycle-global:            Section Visibility.  (line  33)
  11015 * magit-section-forward:                 Section Movement.    (line  16)
  11016 * magit-section-forward-siblings:        Section Movement.    (line  24)
  11017 * magit-section-hide:                    Section Visibility.  (line  55)
  11018 * magit-section-hide-children:           Section Visibility.  (line  67)
  11019 * magit-section-ident:                   Matching Sections.   (line  10)
  11020 * magit-section-match:                   Matching Sections.   (line  18)
  11021 * magit-section-set-window-start:        Section Movement.    (line  52)
  11022 * magit-section-show:                    Section Visibility.  (line  52)
  11023 * magit-section-show-children:           Section Visibility.  (line  62)
  11024 * magit-section-show-headings:           Section Visibility.  (line  58)
  11025 * magit-section-show-level-1:            Section Visibility.  (line  39)
  11026 * magit-section-show-level-1-all:        Section Visibility.  (line  45)
  11027 * magit-section-show-level-2:            Section Visibility.  (line  39)
  11028 * magit-section-show-level-2-all:        Section Visibility.  (line  45)
  11029 * magit-section-show-level-3:            Section Visibility.  (line  39)
  11030 * magit-section-show-level-3-all:        Section Visibility.  (line  45)
  11031 * magit-section-show-level-4:            Section Visibility.  (line  39)
  11032 * magit-section-show-level-4-all:        Section Visibility.  (line  45)
  11033 * magit-section-toggle:                  Section Visibility.  (line  10)
  11034 * magit-section-toggle-children:         Section Visibility.  (line  70)
  11035 * magit-section-up:                      Section Movement.    (line  28)
  11036 * magit-section-value-if:                Matching Sections.   (line  57)
  11037 * magit-sequence-abort:                  Cherry Picking.      (line  91)
  11038 * magit-sequence-abort <1>:              Reverting.           (line  35)
  11039 * magit-sequence-continue:               Cherry Picking.      (line  85)
  11040 * magit-sequence-continue <1>:           Reverting.           (line  29)
  11041 * magit-sequence-skip:                   Cherry Picking.      (line  88)
  11042 * magit-sequence-skip <1>:               Reverting.           (line  32)
  11043 * magit-shell-command:                   Running Git Manually.
  11044                                                               (line  38)
  11045 * magit-shell-command-topdir:            Running Git Manually.
  11046                                                               (line  34)
  11047 * magit-show-commit:                     Diffing.             (line  63)
  11048 * magit-show-commit <1>:                 Blaming.             (line  91)
  11049 * magit-show-refs:                       References Buffer.   (line   7)
  11050 * magit-show-refs-current:               References Buffer.   (line  25)
  11051 * magit-show-refs-head:                  References Buffer.   (line  21)
  11052 * magit-show-refs-other:                 References Buffer.   (line  30)
  11053 * magit-snapshot-both:                   Stashing.            (line  36)
  11054 * magit-snapshot-index:                  Stashing.            (line  42)
  11055 * magit-snapshot-worktree:               Stashing.            (line  46)
  11056 * magit-sparse-checkout:                 Sparse checkouts.    (line  17)
  11057 * magit-sparse-checkout-add:             Sparse checkouts.    (line  39)
  11058 * magit-sparse-checkout-disable:         Sparse checkouts.    (line  50)
  11059 * magit-sparse-checkout-enable:          Sparse checkouts.    (line  21)
  11060 * magit-sparse-checkout-reapply:         Sparse checkouts.    (line  44)
  11061 * magit-sparse-checkout-set:             Sparse checkouts.    (line  33)
  11062 * magit-stage:                           Staging and Unstaging.
  11063                                                               (line  29)
  11064 * magit-stage-buffer-file:               Commands for Buffers Visiting Files.
  11065                                                               (line  52)
  11066 * magit-stage-buffer-file <1>:           Commands for Buffers Visiting Files.
  11067                                                               (line  63)
  11068 * magit-stage-file:                      Staging from File-Visiting Buffers.
  11069                                                               (line  11)
  11070 * magit-stage-file <1>:                  Commands for Buffers Visiting Files.
  11071                                                               (line  52)
  11072 * magit-stage-file <2>:                  Commands for Buffers Visiting Files.
  11073                                                               (line  63)
  11074 * magit-stage-modified:                  Staging and Unstaging.
  11075                                                               (line  36)
  11076 * magit-start-git:                       Calling Git for Effect.
  11077                                                               (line  82)
  11078 * magit-start-process:                   Calling Git for Effect.
  11079                                                               (line 100)
  11080 * magit-stash:                           Stashing.            (line   9)
  11081 * magit-stash-apply:                     Stashing.            (line  52)
  11082 * magit-stash-both:                      Stashing.            (line  14)
  11083 * magit-stash-branch:                    Stashing.            (line 105)
  11084 * magit-stash-branch-here:               Stashing.            (line 110)
  11085 * magit-stash-clear:                     Stashing.            (line 118)
  11086 * magit-stash-drop:                      Stashing.            (line  98)
  11087 * magit-stash-format-patch:              Stashing.            (line 115)
  11088 * magit-stash-index:                     Stashing.            (line  20)
  11089 * magit-stash-keep-index:                Stashing.            (line  30)
  11090 * magit-stash-list:                      Stashing.            (line 121)
  11091 * magit-stash-pop:                       Stashing.            (line  74)
  11092 * magit-stash-show:                      Diffing.             (line  67)
  11093 * magit-stash-show <1>:                  Stashing.            (line 102)
  11094 * magit-stash-worktree:                  Stashing.            (line  24)
  11095 * magit-stashes-maybe-update-stash-buffer: Section Movement.  (line  92)
  11096 * magit-status:                          Status Buffer.       (line  23)
  11097 * magit-status-here:                     Commands for Buffers Visiting Files.
  11098                                                               (line  52)
  11099 * magit-status-here <1>:                 Commands for Buffers Visiting Files.
  11100                                                               (line 166)
  11101 * magit-status-maybe-update-blob-buffer: Section Movement.    (line  87)
  11102 * magit-status-maybe-update-revision-buffer: Section Movement.
  11103                                                               (line  77)
  11104 * magit-status-maybe-update-stash-buffer: Section Movement.   (line  82)
  11105 * magit-status-quick:                    Status Buffer.       (line  70)
  11106 * magit-submodule:                       Submodule Transient. (line   7)
  11107 * magit-submodule-add:                   Submodule Transient. (line  20)
  11108 * magit-submodule-fetch:                 Fetching.            (line  48)
  11109 * magit-submodule-populate:              Submodule Transient. (line  32)
  11110 * magit-submodule-register:              Submodule Transient. (line  26)
  11111 * magit-submodule-synchronize:           Submodule Transient. (line  40)
  11112 * magit-submodule-unpopulate:            Submodule Transient. (line  45)
  11113 * magit-submodule-update:                Submodule Transient. (line  36)
  11114 * magit-subtree:                         Subtree.             (line   9)
  11115 * magit-subtree-add:                     Subtree.             (line  24)
  11116 * magit-subtree-add-commit:              Subtree.             (line  28)
  11117 * magit-subtree-export:                  Subtree.             (line  37)
  11118 * magit-subtree-import:                  Subtree.             (line  13)
  11119 * magit-subtree-merge:                   Subtree.             (line  31)
  11120 * magit-subtree-pull:                    Subtree.             (line  34)
  11121 * magit-subtree-push:                    Subtree.             (line  48)
  11122 * magit-subtree-split:                   Subtree.             (line  52)
  11123 * magit-switch-to-repository-buffer:     Common Commands.     (line   6)
  11124 * magit-switch-to-repository-buffer-other-frame: Common Commands.
  11125                                                               (line   8)
  11126 * magit-switch-to-repository-buffer-other-window: Common Commands.
  11127                                                               (line   7)
  11128 * magit-tag:                             Tagging.             (line   9)
  11129 * magit-tag-create:                      Tagging.             (line  14)
  11130 * magit-tag-delete:                      Tagging.             (line  37)
  11131 * magit-tag-prune:                       Tagging.             (line  43)
  11132 * magit-tag-release:                     Tagging.             (line  18)
  11133 * magit-toggle-buffer-lock:              Modes and Buffers.   (line  18)
  11134 * magit-toggle-git-debug:                Debugging Tools.     (line  29)
  11135 * magit-toggle-margin:                   Refreshing Logs.     (line  34)
  11136 * magit-toggle-margin <1>:               Log Margin.          (line  60)
  11137 * magit-toggle-margin-details:           Log Margin.          (line  66)
  11138 * magit-toggle-verbose-refresh:          Debugging Tools.     (line  52)
  11139 * magit-unstage:                         Staging and Unstaging.
  11140                                                               (line  42)
  11141 * magit-unstage-all:                     Staging and Unstaging.
  11142                                                               (line  50)
  11143 * magit-unstage-buffer-file:             Commands for Buffers Visiting Files.
  11144                                                               (line  52)
  11145 * magit-unstage-buffer-file <1>:         Commands for Buffers Visiting Files.
  11146                                                               (line  69)
  11147 * magit-unstage-file:                    Staging from File-Visiting Buffers.
  11148                                                               (line  18)
  11149 * magit-unstage-file <1>:                Commands for Buffers Visiting Files.
  11150                                                               (line  52)
  11151 * magit-unstage-file <2>:                Commands for Buffers Visiting Files.
  11152                                                               (line  69)
  11153 * magit-version:                         Git Executable.      (line  59)
  11154 * magit-version <1>:                     Debugging Tools.     (line  11)
  11155 * magit-visit-ref:                       References Buffer.   (line 159)
  11156 * magit-wip-commit:                      Wip Modes.           (line  85)
  11157 * magit-wip-log:                         Wip Modes.           (line  47)
  11158 * magit-wip-log-current:                 Wip Modes.           (line  55)
  11159 * magit-worktree:                        Worktree.            (line   9)
  11160 * magit-worktree-branch:                 Worktree.            (line  16)
  11161 * magit-worktree-checkout:               Worktree.            (line  13)
  11162 * magit-worktree-delete:                 Worktree.            (line  22)
  11163 * magit-worktree-move:                   Worktree.            (line  19)
  11164 * magit-worktree-status:                 Worktree.            (line  26)
  11165 * scroll-down:                           Commands Available in Diffs.
  11166                                                               (line  56)
  11167 * scroll-up:                             Commands Available in Diffs.
  11168                                                               (line  53)
  11169 * with-editor-cancel:                    Editing Commit Messages.
  11170                                                               (line  22)
  11171 * with-editor-cancel <1>:                Editing Rebase Sequences.
  11172                                                               (line  11)
  11173 * with-editor-debug:                     Debugging Tools.     (line  64)
  11174 * with-editor-finish:                    Editing Commit Messages.
  11175                                                               (line  18)
  11176 * with-editor-finish <1>:                Editing Rebase Sequences.
  11177                                                               (line   7)
  11178 * with-editor-usage-message:             Commit Mode and Hooks.
  11179                                                               (line  51)
  11180 
  11181 
  11182 File: magit.info,  Node: Variable Index,  Prev: Function and Command Index,  Up: Top
  11183 
  11184 Appendix E Variable Index
  11185 *************************
  11186 
  11187 
  11188 * Menu:
  11189 
  11190 * auto-revert-buffer-list-filter:        Automatic Reverting of File-Visiting Buffers.
  11191                                                               (line  73)
  11192 * auto-revert-interval:                  Automatic Reverting of File-Visiting Buffers.
  11193                                                               (line  69)
  11194 * auto-revert-mode:                      Automatic Reverting of File-Visiting Buffers.
  11195                                                               (line  57)
  11196 * auto-revert-stop-on-user-input:        Automatic Reverting of File-Visiting Buffers.
  11197                                                               (line  65)
  11198 * auto-revert-use-notify:                Automatic Reverting of File-Visiting Buffers.
  11199                                                               (line  46)
  11200 * auto-revert-verbose:                   Automatic Reverting of File-Visiting Buffers.
  11201                                                               (line  94)
  11202 * branch.autoSetupMerge:                 Branch Git Variables.
  11203                                                               (line  71)
  11204 * branch.autoSetupRebase:                Branch Git Variables.
  11205                                                               (line  85)
  11206 * branch.NAME.description:               Branch Git Variables.
  11207                                                               (line  42)
  11208 * branch.NAME.merge:                     Branch Git Variables.
  11209                                                               (line  10)
  11210 * branch.NAME.pushRemote:                Branch Git Variables.
  11211                                                               (line  29)
  11212 * branch.NAME.rebase:                    Branch Git Variables.
  11213                                                               (line  20)
  11214 * branch.NAME.remote:                    Branch Git Variables.
  11215                                                               (line  15)
  11216 * core.notesRef:                         Notes.               (line  53)
  11217 * git-commit-finish-query-functions:     Commit Message Conventions.
  11218                                                               (line  18)
  11219 * git-commit-known-pseudo-headers:       Commit Pseudo Headers.
  11220                                                               (line   9)
  11221 * git-commit-major-mode:                 Commit Mode and Hooks.
  11222                                                               (line  12)
  11223 * git-commit-post-finish-hook:           Commit Mode and Hooks.
  11224                                                               (line  54)
  11225 * git-commit-setup-hook:                 Commit Mode and Hooks.
  11226                                                               (line  21)
  11227 * git-commit-style-convention-checks:    Commit Message Conventions.
  11228                                                               (line  38)
  11229 * git-commit-summary-max-length:         Commit Message Conventions.
  11230                                                               (line  13)
  11231 * git-rebase-auto-advance:               Editing Rebase Sequences.
  11232                                                               (line  80)
  11233 * git-rebase-confirm-cancel:             Editing Rebase Sequences.
  11234                                                               (line  86)
  11235 * git-rebase-show-instructions:          Editing Rebase Sequences.
  11236                                                               (line  83)
  11237 * global-auto-revert-mode:               Automatic Reverting of File-Visiting Buffers.
  11238                                                               (line  21)
  11239 * magit-auto-revert-immediately:         Automatic Reverting of File-Visiting Buffers.
  11240                                                               (line  30)
  11241 * magit-auto-revert-mode:                Automatic Reverting of File-Visiting Buffers.
  11242                                                               (line  17)
  11243 * magit-auto-revert-tracked-only:        Automatic Reverting of File-Visiting Buffers.
  11244                                                               (line  51)
  11245 * magit-bisect-show-graph:               Bisecting.           (line  57)
  11246 * magit-blame-disable-modes:             Blaming.             (line 165)
  11247 * magit-blame-echo-style:                Blaming.             (line 151)
  11248 * magit-blame-goto-chunk-hook:           Blaming.             (line 170)
  11249 * magit-blame-read-only:                 Blaming.             (line 161)
  11250 * magit-blame-styles:                    Blaming.             (line 147)
  11251 * magit-blame-time-format:               Blaming.             (line 157)
  11252 * magit-branch-adjust-remote-upstream-alist: Branch Commands. (line 202)
  11253 * magit-branch-direct-configure:         Branch Commands.     (line  19)
  11254 * magit-branch-prefer-remote-upstream:   Branch Commands.     (line 158)
  11255 * magit-branch-read-upstream-first:      Branch Commands.     (line 153)
  11256 * magit-buffer-name-format:              Naming Buffers.      (line  25)
  11257 * magit-bury-buffer-function:            Quitting Windows.    (line  16)
  11258 * magit-cherry-margin:                   Cherries.            (line  21)
  11259 * magit-clone-always-transient:          Cloning Repository.  (line  12)
  11260 * magit-clone-default-directory:         Cloning Repository.  (line  84)
  11261 * magit-clone-name-alist:                Cloning Repository.  (line  94)
  11262 * magit-clone-set-remote-head:           Cloning Repository.  (line  66)
  11263 * magit-clone-set-remote.pushDefault:    Cloning Repository.  (line  75)
  11264 * magit-clone-url-format:                Cloning Repository.  (line 114)
  11265 * magit-commit-ask-to-stage:             Initiating a Commit. (line  65)
  11266 * magit-commit-diff-inhibit-same-window: Initiating a Commit. (line  97)
  11267 * magit-commit-extend-override-date:     Initiating a Commit. (line  72)
  11268 * magit-commit-reword-override-date:     Initiating a Commit. (line  75)
  11269 * magit-commit-show-diff:                Initiating a Commit. (line  69)
  11270 * magit-commit-squash-confirm:           Initiating a Commit. (line  78)
  11271 * magit-completing-read-function:        Support for Completion Frameworks.
  11272                                                               (line  27)
  11273 * magit-define-global-key-bindings:      Global Bindings.     (line   6)
  11274 * magit-diff-adjust-tab-width:           Diff Options.        (line  17)
  11275 * magit-diff-buffer-file-locked:         Commands for Buffers Visiting Files.
  11276                                                               (line 104)
  11277 * magit-diff-extra-stat-arguments:       Diff Options.        (line 112)
  11278 * magit-diff-hide-trailing-cr-characters: Diff Options.       (line  77)
  11279 * magit-diff-highlight-hunk-region-functions: Diff Options.   (line  80)
  11280 * magit-diff-highlight-indentation:      Diff Options.        (line  63)
  11281 * magit-diff-highlight-trailing:         Diff Options.        (line  59)
  11282 * magit-diff-paint-whitespace:           Diff Options.        (line  38)
  11283 * magit-diff-paint-whitespace-lines:     Diff Options.        (line  52)
  11284 * magit-diff-refine-hunk:                Diff Options.        (line   6)
  11285 * magit-diff-refine-ignore-whitespace:   Diff Options.        (line  13)
  11286 * magit-diff-unmarked-lines-keep-foreground: Diff Options.    (line 105)
  11287 * magit-diff-visit-previous-blob:        Visiting Files and Blobs from a Diff.
  11288                                                               (line  38)
  11289 * magit-direct-use-buffer-arguments:     Transient Arguments and Buffer Variables.
  11290                                                               (line  73)
  11291 * magit-display-buffer-function:         Switching Buffers.   (line  25)
  11292 * magit-display-buffer-noselect:         Switching Buffers.   (line  17)
  11293 * magit-dwim-selection:                  Completion and Confirmation.
  11294                                                               (line  42)
  11295 * magit-ediff-dwim-resolve-function:     Ediffing.            (line 105)
  11296 * magit-ediff-dwim-show-on-hunks:        Ediffing.            (line 111)
  11297 * magit-ediff-quit-hook:                 Ediffing.            (line 124)
  11298 * magit-ediff-show-stash-with-index:     Ediffing.            (line 118)
  11299 * magit-generate-buffer-name-function:   Naming Buffers.      (line   6)
  11300 * magit-git-debug:                       Viewing Git Output.  (line  26)
  11301 * magit-git-debug <1>:                   Getting a Value from Git.
  11302                                                               (line  68)
  11303 * magit-git-executable:                  Git Executable.      (line  26)
  11304 * magit-git-global-arguments:            Global Git Arguments.
  11305                                                               (line   6)
  11306 * magit-keep-region-overlay:             The Selection.       (line  52)
  11307 * magit-list-refs-sortby:                Additional Completion Options.
  11308                                                               (line   6)
  11309 * magit-log-auto-more:                   Log Buffer.          (line  69)
  11310 * magit-log-buffer-file-locked:          Commands for Buffers Visiting Files.
  11311                                                               (line 124)
  11312 * magit-log-margin:                      Log Margin.          (line  12)
  11313 * magit-log-margin-show-committer-date:  Log Margin.          (line  44)
  11314 * magit-log-section-commit-count:        Status Sections.     (line 114)
  11315 * magit-log-select-margin:               Select from Log.     (line  28)
  11316 * magit-log-show-color-graph-limit:      Log Buffer.          (line  78)
  11317 * magit-log-show-refname-after-summary:  Log Buffer.          (line  74)
  11318 * magit-log-show-signatures-limit:       Log Buffer.          (line  84)
  11319 * magit-log-trace-definition-function:   Commands Available in Diffs.
  11320                                                               (line  17)
  11321 * magit-module-sections-hook:            Status Module Sections.
  11322                                                               (line  19)
  11323 * magit-module-sections-nested:          Status Module Sections.
  11324                                                               (line  22)
  11325 * magit-no-confirm:                      Action Confirmation. (line  18)
  11326 * magit-pop-revision-stack-format:       Using the Revision Stack.
  11327                                                               (line  34)
  11328 * magit-post-clone-hook:                 Cloning Repository.  (line 133)
  11329 * magit-post-commit-hook:                Initiating a Commit. (line  86)
  11330 * magit-post-display-buffer-hook:        Switching Buffers.   (line  85)
  11331 * magit-pre-display-buffer-hook:         Switching Buffers.   (line  76)
  11332 * magit-prefer-remote-upstream:          Branch Git Variables.
  11333                                                               (line 109)
  11334 * magit-prefix-use-buffer-arguments:     Transient Arguments and Buffer Variables.
  11335                                                               (line  65)
  11336 * magit-process-extreme-logging:         Viewing Git Output.  (line  56)
  11337 * magit-process-raise-error:             Calling Git for Effect.
  11338                                                               (line 125)
  11339 * magit-pull-or-fetch:                   Fetching.            (line  51)
  11340 * magit-reflog-margin:                   Reflog.              (line  20)
  11341 * magit-refresh-args:                    Refreshing Buffers.  (line  52)
  11342 * magit-refresh-buffer-hook:             Automatic Refreshing of Magit Buffers.
  11343                                                               (line  41)
  11344 * magit-refresh-function:                Refreshing Buffers.  (line  47)
  11345 * magit-refresh-status-buffer:           Automatic Refreshing of Magit Buffers.
  11346                                                               (line  46)
  11347 * magit-refs-filter-alist:               References Buffer.   (line 137)
  11348 * magit-refs-focus-column-width:         References Buffer.   (line  75)
  11349 * magit-refs-margin:                     References Buffer.   (line  89)
  11350 * magit-refs-margin-for-tags:            References Buffer.   (line 112)
  11351 * magit-refs-pad-commit-counts:          References Buffer.   (line  45)
  11352 * magit-refs-primary-column-width:       References Buffer.   (line  63)
  11353 * magit-refs-sections-hook:              References Sections. (line  13)
  11354 * magit-refs-show-commit-count:          References Buffer.   (line  36)
  11355 * magit-refs-show-remote-prefix:         References Buffer.   (line  57)
  11356 * magit-remote-add-set-remote.pushDefault: Remote Commands.   (line  83)
  11357 * magit-remote-direct-configure:         Remote Commands.     (line  20)
  11358 * magit-remote-git-executable:           Git Executable.      (line  32)
  11359 * magit-repolist-columns:                Repository List.     (line  12)
  11360 * magit-repository-directories:          Status Buffer.       (line  57)
  11361 * magit-revision-filter-files-on-follow: Revision Buffer.     (line  55)
  11362 * magit-revision-insert-related-refs:    Revision Buffer.     (line   6)
  11363 * magit-revision-show-gravatars:         Revision Buffer.     (line  15)
  11364 * magit-revision-use-hash-sections:      Revision Buffer.     (line  31)
  11365 * magit-root-section:                    Matching Sections.   (line  81)
  11366 * magit-save-repository-buffers:         Automatic Saving of File-Visiting Buffers.
  11367                                                               (line  13)
  11368 * magit-section-cache-visibility:        Section Visibility.  (line  95)
  11369 * magit-section-initial-visibility-alist: Section Visibility. (line  79)
  11370 * magit-section-movement-hook:           Section Movement.    (line  41)
  11371 * magit-section-set-visibility-hook:     Section Visibility.  (line 105)
  11372 * magit-section-show-child-count:        Section Options.     (line   9)
  11373 * magit-section-visibility-indicator:    Section Visibility.  (line 122)
  11374 * magit-shell-command-verbose-prompt:    Running Git Manually.
  11375                                                               (line  43)
  11376 * magit-stashes-margin:                  Stashing.            (line 123)
  11377 * magit-status-headers-hook:             Status Header Sections.
  11378                                                               (line  17)
  11379 * magit-status-margin:                   Status Options.      (line   6)
  11380 * magit-status-sections-hook:            Status Sections.     (line  10)
  11381 * magit-submodule-list-columns:          Listing Submodules.  (line  20)
  11382 * magit-this-process:                    Calling Git for Effect.
  11383                                                               (line 121)
  11384 * magit-uniquify-buffer-names:           Naming Buffers.      (line  65)
  11385 * magit-unstage-committed:               Staging and Unstaging.
  11386                                                               (line  52)
  11387 * magit-update-other-window-delay:       Section Movement.    (line  97)
  11388 * magit-visit-ref-behavior:              References Buffer.   (line 168)
  11389 * magit-wip-after-apply-mode:            Legacy Wip Modes.    (line  18)
  11390 * magit-wip-after-apply-mode-lighter:    Legacy Wip Modes.    (line  54)
  11391 * magit-wip-after-save-local-mode-lighter: Legacy Wip Modes.  (line  51)
  11392 * magit-wip-after-save-mode:             Legacy Wip Modes.    (line  13)
  11393 * magit-wip-before-change-mode:          Legacy Wip Modes.    (line  31)
  11394 * magit-wip-before-change-mode-lighter:  Legacy Wip Modes.    (line  57)
  11395 * magit-wip-initial-backup-mode:         Legacy Wip Modes.    (line  35)
  11396 * magit-wip-initial-backup-mode-lighter: Legacy Wip Modes.    (line  60)
  11397 * magit-wip-merge-branch:                Wip Graph.           (line   6)
  11398 * magit-wip-mode:                        Wip Modes.           (line  30)
  11399 * magit-wip-mode-lighter:                Wip Modes.           (line  98)
  11400 * magit-wip-namespace:                   Wip Modes.           (line  91)
  11401 * notes.displayRef:                      Notes.               (line  57)
  11402 * pull.rebase:                           Branch Git Variables.
  11403                                                               (line  50)
  11404 * remote.NAME.fetch:                     Remote Git Variables.
  11405                                                               (line  14)
  11406 * remote.NAME.push:                      Remote Git Variables.
  11407                                                               (line  23)
  11408 * remote.NAME.pushurl:                   Remote Git Variables.
  11409                                                               (line  18)
  11410 * remote.NAME.tagOpts:                   Remote Git Variables.
  11411                                                               (line  27)
  11412 * remote.NAME.url:                       Remote Git Variables.
  11413                                                               (line  10)
  11414 * remote.pushDefault:                    Branch Git Variables.
  11415                                                               (line  62)
  11416 
  11417 
  11418 
  11419 Tag Table:
  11420 Node: Top774
  11421 Node: Introduction6566
  11422 Node: Installation11282
  11423 Node: Installing from Melpa11612
  11424 Node: Installing from the Git Repository12687
  11425 Node: Post-Installation Tasks15501
  11426 Node: Getting Started16786
  11427 Node: Interface Concepts22597
  11428 Node: Modes and Buffers22976
  11429 Node: Switching Buffers24687
  11430 Node: Naming Buffers29426
  11431 Node: Quitting Windows32501
  11432 Node: Automatic Refreshing of Magit Buffers34436
  11433 Node: Automatic Saving of File-Visiting Buffers37317
  11434 Node: Automatic Reverting of File-Visiting Buffers38501
  11435 Node: Risk of Reverting Automatically43486
  11436 Node: Sections45868
  11437 Node: Section Movement46794
  11438 Node: Section Visibility51668
  11439 Node: Section Hooks58355
  11440 Node: Section Types and Values60761
  11441 Node: Section Options62176
  11442 Node: Transient Commands62647
  11443 Node: Transient Arguments and Buffer Variables64123
  11444 Node: Completion Confirmation and the Selection71140
  11445 Node: Action Confirmation71586
  11446 Node: Completion and Confirmation80091
  11447 Node: The Selection83276
  11448 Node: The hunk-internal region86174
  11449 Node: Support for Completion Frameworks87263
  11450 Node: Additional Completion Options92148
  11451 Node: Mouse Support92746
  11452 Node: Running Git93322
  11453 Node: Viewing Git Output93567
  11454 Node: Git Process Status96271
  11455 Node: Running Git Manually97236
  11456 Node: Git Executable99926
  11457 Node: Global Git Arguments102934
  11458 Node: Inspecting103739
  11459 Node: Status Buffer104896
  11460 Node: Status Sections109907
  11461 Node: Status Header Sections115434
  11462 Node: Status Module Sections118053
  11463 Node: Status Options120550
  11464 Node: Repository List121913
  11465 Node: Logging126691
  11466 Node: Refreshing Logs129533
  11467 Node: Log Buffer130954
  11468 Node: Log Margin135777
  11469 Node: Select from Log138930
  11470 Node: Reflog141140
  11471 Node: Cherries142777
  11472 Node: Diffing144615
  11473 Node: Refreshing Diffs147649
  11474 Node: Commands Available in Diffs151338
  11475 Node: Diff Options153851
  11476 Node: Revision Buffer159314
  11477 Node: Ediffing162634
  11478 Node: References Buffer168684
  11479 Node: References Sections179278
  11480 Node: Bisecting180135
  11481 Node: Visiting Files and Blobs182446
  11482 Node: General-Purpose Visit Commands182974
  11483 Node: Visiting Files and Blobs from a Diff183927
  11484 Node: Blaming187371
  11485 Node: Manipulating194359
  11486 Node: Creating Repository194701
  11487 Node: Cloning Repository195238
  11488 Node: Staging and Unstaging201679
  11489 Node: Staging from File-Visiting Buffers205660
  11490 Node: Applying206766
  11491 Node: Committing208839
  11492 Node: Initiating a Commit209422
  11493 Node: Editing Commit Messages214612
  11494 Node: Using the Revision Stack217385
  11495 Node: Commit Pseudo Headers220430
  11496 Node: Commit Mode and Hooks221725
  11497 Node: Commit Message Conventions224583
  11498 Node: Branching226570
  11499 Node: The Two Remotes226796
  11500 Node: Branch Commands229449
  11501 Node: Branch Git Variables242299
  11502 Node: Auxiliary Branch Commands247673
  11503 Node: Merging248789
  11504 Node: Resolving Conflicts252945
  11505 Node: Rebasing258319
  11506 Node: Editing Rebase Sequences263108
  11507 Node: Information About In-Progress Rebase267324
  11508 Ref: Information About In-Progress Rebase-Footnote-1276437
  11509 Node: Cherry Picking277033
  11510 Node: Reverting281367
  11511 Node: Resetting282786
  11512 Node: Stashing284612
  11513 Node: Transferring290993
  11514 Node: Remotes291215
  11515 Node: Remote Commands291367
  11516 Node: Remote Git Variables295406
  11517 Node: Fetching296677
  11518 Node: Pulling299123
  11519 Node: Pushing300149
  11520 Node: Plain Patches304440
  11521 Node: Maildir Patches305911
  11522 Node: Miscellaneous307390
  11523 Node: Tagging307736
  11524 Node: Notes309629
  11525 Node: Submodules311964
  11526 Node: Listing Submodules312182
  11527 Node: Submodule Transient314330
  11528 Node: Subtree316817
  11529 Node: Worktree318748
  11530 Node: Sparse checkouts319824
  11531 Node: Bundle322600
  11532 Node: Common Commands322975
  11533 Node: Wip Modes325603
  11534 Node: Wip Graph330494
  11535 Node: Legacy Wip Modes332807
  11536 Node: Commands for Buffers Visiting Files335694
  11537 Node: Minor Mode for Buffers Visiting Blobs343921
  11538 Node: Customizing344719
  11539 Node: Per-Repository Configuration346315
  11540 Node: Essential Settings348569
  11541 Node: Safety348915
  11542 Node: Performance350676
  11543 Ref: Log Performance353639
  11544 Ref: Diff Performance354944
  11545 Ref: Refs Buffer Performance356285
  11546 Ref: Committing Performance356860
  11547 Node: Microsoft Windows Performance357842
  11548 Node: MacOS Performance359033
  11549 Ref: MacOS Performance-Footnote-1360056
  11550 Node: Global Bindings360138
  11551 Node: Plumbing362366
  11552 Node: Calling Git363195
  11553 Node: Getting a Value from Git364720
  11554 Node: Calling Git for Effect368448
  11555 Node: Section Plumbing374342
  11556 Node: Creating Sections374570
  11557 Node: Section Selection378466
  11558 Node: Matching Sections380262
  11559 Node: Refreshing Buffers386183
  11560 Node: Conventions389327
  11561 Node: Theming Faces389519
  11562 Node: FAQ397624
  11563 Node: FAQ - How to ...?398062
  11564 Node: How to pronounce Magit?398419
  11565 Node: How to show git's output?399222
  11566 Node: How to install the gitman info manual?400008
  11567 Node: How to show diffs for gpg-encrypted files?400978
  11568 Node: How does branching and pushing work?401574
  11569 Node: Should I disable VC?401907
  11570 Node: FAQ - Issues and Errors402510
  11571 Node: Magit is slow403455
  11572 Node: I changed several thousand files at once and now Magit is unusable403748
  11573 Node: I am having problems committing404474
  11574 Node: I am using MS Windows and cannot push with Magit404955
  11575 Node: I am using macOS and SOMETHING works in shell but not in Magit405573
  11576 Node: Expanding a file to show the diff causes it to disappear406407
  11577 Node: Point is wrong in the COMMIT_EDITMSG buffer406995
  11578 Node: The mode-line information isn't always up-to-date408040
  11579 Node: A branch and tag sharing the same name breaks SOMETHING409103
  11580 Node: My Git hooks work on the command-line but not inside Magit409990
  11581 Node: git-commit-mode isn't used when committing from the command-line410836
  11582 Node: Point ends up inside invisible text when jumping to a file-visiting buffer413107
  11583 Node: I am no longer able to save popup defaults413956
  11584 Node: Debugging Tools414937
  11585 Node: Keystroke Index418111
  11586 Node: Function and Command Index459725
  11587 Node: Variable Index517926
  11588 
  11589 End Tag Table
  11590 
  11591 
  11592 Local Variables:
  11593 coding: utf-8
  11594 End: