config

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

magit.info (540323B)


      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 strickly
    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         • ": " is appended to PROMPT.
   2175 
   2176         • PROMPT is modified to end with \" (default DEF|FALLBACK): \"
   2177           provided that DEF or FALLBACK is non-nil, that neither
   2178           ‘ivy-mode’ nor ‘helm-mode’ is enabled, and that
   2179           ‘magit-completing-read-function’ is set to its default value
   2180           of ‘magit-builtin-completing-read’.
   2181 
   2182 
   2183 File: magit.info,  Node: Additional Completion Options,  Prev: Support for Completion Frameworks,  Up: Completion Confirmation and the Selection
   2184 
   2185 4.5.6 Additional Completion Options
   2186 -----------------------------------
   2187 
   2188  -- User Option: magit-list-refs-sortby
   2189      For many commands that read a ref or refs from the user, the value
   2190      of this option can be used to control the order of the refs.  Valid
   2191      values include any key accepted by the ‘--sort’ flag of ‘git
   2192      for-each-ref’.  By default, refs are sorted alphabetically by their
   2193      full name (e.g., "refs/heads/master").
   2194 
   2195 
   2196 File: magit.info,  Node: Mouse Support,  Next: Running Git,  Prev: Completion Confirmation and the Selection,  Up: Interface Concepts
   2197 
   2198 4.6 Mouse Support
   2199 =================
   2200 
   2201 Double clicking on a section heading toggles the visibility of its body,
   2202 if any.  Likewise clicking in the left fringe toggles the visibility of
   2203 the appropriate section.
   2204 
   2205    A context menu is provided but has to be enabled explicitly.  In
   2206 Emacs 28 and greater, enable the global mode ‘context-menu-mode’.  If
   2207 you use an older Emacs release, set
   2208 ‘magit-section-show-context-menu-for-emacs<28’.
   2209 
   2210 
   2211 File: magit.info,  Node: Running Git,  Prev: Mouse Support,  Up: Interface Concepts
   2212 
   2213 4.7 Running Git
   2214 ===============
   2215 
   2216 * Menu:
   2217 
   2218 * Viewing Git Output::
   2219 * Git Process Status::
   2220 * Running Git Manually::
   2221 * Git Executable::
   2222 * Global Git Arguments::
   2223 
   2224 
   2225 File: magit.info,  Node: Viewing Git Output,  Next: Git Process Status,  Up: Running Git
   2226 
   2227 4.7.1 Viewing Git Output
   2228 ------------------------
   2229 
   2230 Magit runs Git either for side-effects (e.g., when pushing) or to get
   2231 some value (e.g., the name of the current branch).
   2232 
   2233    When Git is run for side-effects, the process output is logged in a
   2234 per-repository log buffer, which can be consulted using the
   2235 ‘magit-process’ command when things don’t go as expected.
   2236 
   2237    The output/errors for up to ‘magit-process-log-max’ Git commands are
   2238 retained.
   2239 
   2240 ‘$’ (‘magit-process’)
   2241      This commands displays the process buffer for the current
   2242      repository.
   2243 
   2244    Inside that buffer, the usual key bindings for navigating and showing
   2245 sections are available.  There is one additional command.
   2246 
   2247 ‘k’ (‘magit-process-kill’)
   2248      This command kills the process represented by the section at point.
   2249 
   2250  -- Variable: magit-git-debug
   2251      This option controls whether additional reporting of git errors is
   2252      enabled.
   2253 
   2254      Magit basically calls git for one of these two reasons: for
   2255      side-effects or to do something with its standard output.
   2256 
   2257      When git is run for side-effects then its output, including error
   2258      messages, go into the process buffer which is shown when using ‘$’.
   2259 
   2260      When git’s output is consumed in some way, then it would be too
   2261      expensive to also insert it into this buffer, but when this option
   2262      is non-nil and git returns with a non-zero exit status, then at
   2263      least its standard error is inserted into this buffer.
   2264 
   2265      This is only intended for debugging purposes.  Do not enable this
   2266      permanently, that would negatively affect performance.
   2267 
   2268      This is only intended for debugging purposes.  Do not enable this
   2269      permanently, that would negatively affect performance.  Also note
   2270      that just because git exits with a non-zero exit status and prints
   2271      an error message that usually doesn’t mean that it is an error as
   2272      far as Magit is concerned, which is another reason we usually hide
   2273      these error messages.  Whether some error message is relevant in
   2274      the context of some unexpected behavior has to be judged on a case
   2275      by case basis.
   2276 
   2277      The command ‘magit-toggle-git-debug’ changes the value of this
   2278      variable.
   2279 
   2280  -- Variable: magit-process-extreme-logging
   2281      This option controls whether ‘magit-process-file’ logs to the
   2282      ‘*Messages*’ buffer.
   2283 
   2284      Only intended for temporary use when you try to figure out how
   2285      Magit uses Git behind the scene.  Output that normally goes to the
   2286      magit-process buffer continues to go there.  Not all output goes to
   2287      either of these two buffers.
   2288 
   2289 
   2290 File: magit.info,  Node: Git Process Status,  Next: Running Git Manually,  Prev: Viewing Git Output,  Up: Running Git
   2291 
   2292 4.7.2 Git Process Status
   2293 ------------------------
   2294 
   2295 When a Git process is running for side-effects, Magit displays an
   2296 indicator in the mode line, using the ‘magit-mode-line-process’ face.
   2297 
   2298    If the Git process exits successfully, the process indicator is
   2299 removed from the mode line immediately.
   2300 
   2301    In the case of a Git error, the process indicator is not removed, but
   2302 is instead highlighted with the ‘magit-mode-line-process-error’ face,
   2303 and the error details from the process buffer are provided as a tooltip
   2304 for mouse users.  This error indicator persists in the mode line until
   2305 the next magit buffer refresh.
   2306 
   2307    If you do not wish process errors to be indicated in the mode line,
   2308 customize the ‘magit-process-display-mode-line-error’ user option.
   2309 
   2310    Process errors are additionally indicated at the top of the status
   2311 buffer.
   2312 
   2313 
   2314 File: magit.info,  Node: Running Git Manually,  Next: Git Executable,  Prev: Git Process Status,  Up: Running Git
   2315 
   2316 4.7.3 Running Git Manually
   2317 --------------------------
   2318 
   2319 While Magit provides many Emacs commands to interact with Git, it does
   2320 not cover everything.  In those cases your existing Git knowledge will
   2321 come in handy.  Magit provides some commands for running arbitrary Git
   2322 commands by typing them into the minibuffer, instead of having to switch
   2323 to a shell.
   2324 
   2325 ‘!’ (‘magit-run’)
   2326      This transient prefix command binds the following suffix commands
   2327      and displays them in a temporary buffer until a suffix is invoked.
   2328 
   2329 ‘! !’ (‘magit-git-command-topdir’)
   2330      This command reads a command from the user and executes it in the
   2331      top-level directory of the current working tree.
   2332 
   2333      The string "git " is used as initial input when prompting the user
   2334      for the command.  It can be removed to run another command.
   2335 
   2336 ‘:’ (‘magit-git-command’)
   2337 ‘! p’
   2338      This command reads a command from the user and executes it in
   2339      ‘default-directory’.  With a prefix argument the command is
   2340      executed in the top-level directory of the current working tree
   2341      instead.
   2342 
   2343      The string "git " is used as initial input when prompting the user
   2344      for the command.  It can be removed to run another command.
   2345 
   2346 ‘! s’ (‘magit-shell-command-topdir’)
   2347      This command reads a command from the user and executes it in the
   2348      top-level directory of the current working tree.
   2349 
   2350 ‘! S’ (‘magit-shell-command’)
   2351      This command reads a command from the user and executes it in
   2352      ‘default-directory’.  With a prefix argument the command is
   2353      executed in the top-level directory of the current working tree
   2354      instead.
   2355 
   2356  -- User Option: magit-shell-command-verbose-prompt
   2357      Whether the prompt, used by the above commands when reading a shell
   2358      command, shows the directory in which it will be run.
   2359 
   2360    These suffix commands start external gui tools.
   2361 
   2362 ‘! k’ (‘magit-run-gitk’)
   2363      This command runs ‘gitk’ in the current repository.
   2364 
   2365 ‘! a’ (‘magit-run-gitk-all’)
   2366      This command runs ‘gitk --all’ in the current repository.
   2367 
   2368 ‘! b’ (‘magit-run-gitk-branches’)
   2369      This command runs ‘gitk --branches’ in the current repository.
   2370 
   2371 ‘! g’ (‘magit-run-git-gui’)
   2372      This command runs ‘git gui’ in the current repository.
   2373 
   2374 ‘! m’ (‘magit-git-mergetool’)
   2375      This command runs ‘git mergetool --gui’ in the current repository.
   2376 
   2377      With a prefix argument this acts as a transient prefix command,
   2378      allowing the user to select the mergetool and change some settings.
   2379 
   2380 
   2381 File: magit.info,  Node: Git Executable,  Next: Global Git Arguments,  Prev: Running Git Manually,  Up: Running Git
   2382 
   2383 4.7.4 Git Executable
   2384 --------------------
   2385 
   2386 When Magit calls Git, then it may do so using the absolute path to the
   2387 ‘git’ executable, or using just its name.
   2388 
   2389    When running ‘git’ locally and the ‘system-type’ is ‘windows-nt’ (any
   2390 Windows version) or ‘darwin’ (macOS) then ‘magit-git-executable’ is set
   2391 to an absolute path when Magit is loaded.
   2392 
   2393    On Windows it is necessary to use an absolute path because Git comes
   2394 with several wrapper scripts for the actual ‘git’ binary, which are also
   2395 placed on ‘$PATH’, and using one of these wrappers instead of the binary
   2396 would degrade performance horribly.  For some macOS users using just the
   2397 name of the executable also performs horribly, so we avoid doing that on
   2398 that platform as well.  On other platforms, using just the name seems to
   2399 work just fine.
   2400 
   2401    Using an absolute path when running ‘git’ on a remote machine over
   2402 Tramp, would be problematic to use an absolute path that is suitable on
   2403 the local machine, so a separate option is used to control the name or
   2404 path that is used on remote machines.
   2405 
   2406  -- User Option: magit-git-executable
   2407      The ‘git’ executable used by Magit on the local host.  This should
   2408      be either the absolute path to the executable, or the string "git"
   2409      to let Emacs find the executable itself, using the standard
   2410      mechanism for doing such things.
   2411 
   2412  -- User Option: magit-remote-git-executable
   2413      The ‘git’ executable used by Magit on remote machines over Tramp.
   2414      Normally this should be just the string "git".  Consider
   2415      customizing ‘tramp-remote-path’ instead of this option.
   2416 
   2417    If Emacs is unable to find the correct executable, then you can work
   2418 around that by explicitly setting the value of one of these two options.
   2419 Doing that should be considered a kludge; it is better to make sure that
   2420 the order in ‘exec-path’ or ‘tramp-remote-path’ is correct.
   2421 
   2422    Note that ‘exec-path’ is set based on the value of the ‘PATH’
   2423 environment variable that is in effect when Emacs is started.  If you
   2424 set ‘PATH’ in your shell’s init files, then that only has an effect on
   2425 Emacs if you start it from that shell (because the environment of a
   2426 process is only passed to its child processes, not to arbitrary other
   2427 processes).  If that is not how you start Emacs, then the
   2428 ‘exec-path-from-shell’ package can help; though honestly I consider that
   2429 a kludge too.
   2430 
   2431    The command ‘magit-debug-git-executable’ can be useful to find out
   2432 where Emacs is searching for ‘git’.
   2433 
   2434 ‘M-x magit-debug-git-executable’
   2435      This command displays a buffer with information about
   2436      ‘magit-git-executable’ and ‘magit-remote-git-executable’.
   2437 
   2438 ‘M-x magit-version’
   2439      This command shows the currently used versions of Magit, Git, and
   2440      Emacs in the echo area.  Non-interactively this just returns the
   2441      Magit version.
   2442 
   2443 
   2444 File: magit.info,  Node: Global Git Arguments,  Prev: Git Executable,  Up: Running Git
   2445 
   2446 4.7.5 Global Git Arguments
   2447 --------------------------
   2448 
   2449  -- User Option: magit-git-global-arguments
   2450      The arguments set here are used every time the git executable is
   2451      run as a subprocess.  They are placed right after the executable
   2452      itself and before the git command - as in ‘git HERE... COMMAND
   2453      REST’.  For valid arguments see *note (gitman)git::.
   2454 
   2455      Be careful what you add here, especially if you are using Tramp to
   2456      connect to servers with ancient Git versions.  Never remove
   2457      anything that is part of the default value, unless you really know
   2458      what you are doing.  And think very hard before adding something;
   2459      it will be used every time Magit runs Git for any purpose.
   2460 
   2461 
   2462 File: magit.info,  Node: Inspecting,  Next: Manipulating,  Prev: Interface Concepts,  Up: Top
   2463 
   2464 5 Inspecting
   2465 ************
   2466 
   2467 The functionality provided by Magit can be roughly divided into three
   2468 groups: inspecting existing data, manipulating existing data or adding
   2469 new data, and transferring data.  Of course that is a rather crude
   2470 distinction that often falls short, but it’s more useful than no
   2471 distinction at all.  This section is concerned with inspecting data, the
   2472 next two with manipulating and transferring it.  Then follows a section
   2473 about miscellaneous functionality, which cannot easily be fit into this
   2474 distinction.
   2475 
   2476    Of course other distinctions make sense too, e.g., Git’s distinction
   2477 between porcelain and plumbing commands, which for the most part is
   2478 equivalent to Emacs’ distinction between interactive commands and
   2479 non-interactive functions.  All of the sections mentioned before are
   2480 mainly concerned with the porcelain – Magit’s plumbing layer is
   2481 described later.
   2482 
   2483 * Menu:
   2484 
   2485 * Status Buffer::
   2486 * Repository List::
   2487 * Logging::
   2488 * Diffing::
   2489 * Ediffing::
   2490 * References Buffer::
   2491 * Bisecting::
   2492 * Visiting Files and Blobs::
   2493 * Blaming::
   2494 
   2495 
   2496 File: magit.info,  Node: Status Buffer,  Next: Repository List,  Up: Inspecting
   2497 
   2498 5.1 Status Buffer
   2499 =================
   2500 
   2501 While other Magit buffers contain, e.g., one particular diff or one
   2502 particular log, the status buffer contains the diffs for staged and
   2503 unstaged changes, logs for unpushed and unpulled commits, lists of
   2504 stashes and untracked files, and information related to the current
   2505 branch.
   2506 
   2507    During certain incomplete operations – for example when a merge
   2508 resulted in a conflict – additional information is displayed that helps
   2509 proceeding with or aborting the operation.
   2510 
   2511    The command ‘magit-status’ displays the status buffer belonging to
   2512 the current repository in another window.  This command is used so often
   2513 that it should be bound globally.  We recommend using ‘C-x g’:
   2514 
   2515      (global-set-key (kbd "C-x g") 'magit-status)
   2516 
   2517 ‘C-x g’ (‘magit-status’)
   2518      When invoked from within an existing Git repository, then this
   2519      command shows the status of that repository in a buffer.
   2520 
   2521      If the current directory isn’t located within a Git repository,
   2522      then this command prompts for an existing repository or an
   2523      arbitrary directory, depending on the option
   2524      ‘magit-repository-directories’, and the status for the selected
   2525      repository is shown instead.
   2526 
   2527         • If that option specifies any existing repositories, then the
   2528           user is asked to select one of them.
   2529 
   2530         • Otherwise the user is asked to select an arbitrary directory
   2531           using regular file-name completion.  If the selected directory
   2532           is the top-level directory of an existing working tree, then
   2533           the status buffer for that is shown.
   2534 
   2535         • Otherwise the user is offered to initialize the selected
   2536           directory as a new repository.  After creating the repository
   2537           its status buffer is shown.
   2538 
   2539      These fallback behaviors can also be forced using one or more
   2540      prefix arguments:
   2541 
   2542         • With two prefix arguments (or more precisely a numeric prefix
   2543           value of 16 or greater) an arbitrary directory is read, which
   2544           is then acted on as described above.  The same could be
   2545           accomplished using the command ‘magit-init’.
   2546 
   2547         • With a single prefix argument an existing repository is read
   2548           from the user, or if no repository can be found based on the
   2549           value of ‘magit-repository-directories’, then the behavior is
   2550           the same as with two prefix arguments.
   2551 
   2552  -- User Option: magit-repository-directories
   2553      List of directories that are Git repositories or contain Git
   2554      repositories.
   2555 
   2556      Each element has the form ‘(DIRECTORY . DEPTH)’.  DIRECTORY has to
   2557      be a directory or a directory file-name, a string.  DEPTH, an
   2558      integer, specifies the maximum depth to look for Git repositories.
   2559      If it is 0, then only add DIRECTORY itself.
   2560 
   2561      This option controls which repositories are being listed by
   2562      ‘magit-list-repositories’.  It also affects ‘magit-status’ (which
   2563      see) in potentially surprising ways (see above).
   2564 
   2565  -- Command: magit-status-quick
   2566      This command is an alternative to ‘magit-status’ that usually
   2567      avoids refreshing the status buffer.
   2568 
   2569      If the status buffer of the current Git repository exists but isn’t
   2570      being displayed in the selected frame, then it is displayed without
   2571      being refreshed.
   2572 
   2573      If the status buffer is being displayed in the selected frame, then
   2574      this command refreshes it.
   2575 
   2576      Prefix arguments have the same meaning as for ‘magit-status’, and
   2577      additionally cause the buffer to be refresh.
   2578 
   2579      To use this command add this to your init file:
   2580 
   2581           (global-set-key (kbd "C-x g") 'magit-status-quick).
   2582 
   2583      If you do that and then for once want to redisplay the buffer and
   2584      also immediately refresh it, then type ‘C-x g’ followed by ‘g’.
   2585 
   2586      A possible alternative command is
   2587      ‘magit-display-repository-buffer’.  It supports displaying any
   2588      existing Magit buffer that belongs to the current repository; not
   2589      just the status buffer.
   2590 
   2591  -- Command: ido-enter-magit-status
   2592      From an Ido prompt used to open a file, instead drop into
   2593      ‘magit-status’.  This is similar to ‘ido-magic-delete-char’, which,
   2594      despite its name, usually causes a Dired buffer to be created.
   2595 
   2596      To make this command available, use something like:
   2597 
   2598           (add-hook 'ido-setup-hook
   2599                     (lambda ()
   2600                       (define-key ido-completion-map
   2601                         (kbd \"C-x g\") 'ido-enter-magit-status)))
   2602 
   2603      Starting with Emacs 25.1 the Ido keymaps are defined just once
   2604      instead of every time Ido is invoked, so now you can modify it like
   2605      pretty much every other keymap:
   2606 
   2607           (define-key ido-common-completion-map
   2608             (kbd \"C-x g\") 'ido-enter-magit-status)
   2609 
   2610 * Menu:
   2611 
   2612 * Status Sections::
   2613 * Status Header Sections::
   2614 * Status Module Sections::
   2615 * Status Options::
   2616 
   2617 
   2618 File: magit.info,  Node: Status Sections,  Next: Status Header Sections,  Up: Status Buffer
   2619 
   2620 5.1.1 Status Sections
   2621 ---------------------
   2622 
   2623 The contents of status buffers is controlled using the hook
   2624 ‘magit-status-sections-hook’.  See *note Section Hooks:: to learn about
   2625 such hooks and how to customize them.
   2626 
   2627  -- User Option: magit-status-sections-hook
   2628      Hook run to insert sections into a status buffer.
   2629 
   2630    The first function on that hook by default is
   2631 ‘magit-insert-status-headers’; it is described in the next section.  By
   2632 default the following functions are also members of that hook:
   2633 
   2634  -- Function: magit-insert-merge-log
   2635      Insert section for the on-going merge.  Display the heads that are
   2636      being merged.  If no merge is in progress, do nothing.
   2637 
   2638  -- Function: magit-insert-rebase-sequence
   2639      Insert section for the on-going rebase sequence.  If no such
   2640      sequence is in progress, do nothing.
   2641 
   2642  -- Function: magit-insert-am-sequence
   2643      Insert section for the on-going patch applying sequence.  If no
   2644      such sequence is in progress, do nothing.
   2645 
   2646  -- Function: magit-insert-sequencer-sequence
   2647      Insert section for the on-going cherry-pick or revert sequence.  If
   2648      no such sequence is in progress, do nothing.
   2649 
   2650  -- Function: magit-insert-bisect-output
   2651      While bisecting, insert section with output from ‘git bisect’.
   2652 
   2653  -- Function: magit-insert-bisect-rest
   2654      While bisecting, insert section visualizing the bisect state.
   2655 
   2656  -- Function: magit-insert-bisect-log
   2657      While bisecting, insert section logging bisect progress.
   2658 
   2659  -- Function: magit-insert-untracked-files
   2660      Maybe insert a list or tree of untracked files.
   2661 
   2662      Do so depending on the value of ‘status.showUntrackedFiles’.  Note
   2663      that even if the value is ‘all’, Magit still initially only shows
   2664      directories.  But the directory sections can then be expanded using
   2665      ‘TAB’.
   2666 
   2667  -- Function: magit-insert-unstaged-changes
   2668      Insert section showing unstaged changes.
   2669 
   2670  -- Function: magit-insert-staged-changes
   2671      Insert section showing staged changes.
   2672 
   2673  -- Function: magit-insert-stashes &optional ref heading
   2674      Insert the ‘stashes’ section showing reflog for "refs/stash".  If
   2675      optional REF is non-nil show reflog for that instead.  If optional
   2676      HEADING is non-nil use that as section heading instead of
   2677      "Stashes:".
   2678 
   2679  -- Function: magit-insert-unpulled-from-upstream
   2680      Insert section showing commits that haven’t been pulled from the
   2681      upstream branch yet.
   2682 
   2683  -- Function: magit-insert-unpulled-from-pushremote
   2684      Insert section showing commits that haven’t been pulled from the
   2685      push-remote branch yet.
   2686 
   2687  -- Function: magit-insert-unpushed-to-upstream
   2688      Insert section showing commits that haven’t been pushed to the
   2689      upstream yet.
   2690 
   2691  -- Function: magit-insert-unpushed-to-pushremote
   2692      Insert section showing commits that haven’t been pushed to the
   2693      push-remote yet.
   2694 
   2695    The following functions can also be added to the above hook:
   2696 
   2697  -- Function: magit-insert-tracked-files
   2698      Insert a tree of tracked files.
   2699 
   2700  -- Function: magit-insert-ignored-files
   2701      Insert a tree of ignored files.  Its possible to limit the logs in
   2702      the current buffer to a certain directory using ‘D = f <DIRECTORY>
   2703      RET g’.  If you do that, then that that also affects this command.
   2704 
   2705      The log filter can be used to limit to multiple files.  In that
   2706      case this function only respects the first of the files and only if
   2707      it is a directory.
   2708 
   2709  -- Function: magit-insert-skip-worktree-files
   2710      Insert a tree of skip-worktree files.  If the first element of
   2711      ‘magit-buffer-diff-files’ is a directory, then limit the list to
   2712      files below that.  The value of that variable can be set using ‘D
   2713      -- DIRECTORY RET g’.
   2714 
   2715  -- Function: magit-insert-assumed-unchanged-files
   2716      Insert a tree of files that are assumed to be unchanged.  If the
   2717      first element of ‘magit-buffer-diff-files’ is a directory, then
   2718      limit the list to files below that.  The value of that variable can
   2719      be set using ‘D -- DIRECTORY RET g’.
   2720 
   2721  -- Function: magit-insert-unpulled-or-recent-commits
   2722      Insert section showing unpulled or recent commits.  If an upstream
   2723      is configured for the current branch and it is ahead of the current
   2724      branch, then show the missing commits.  Otherwise, show the last
   2725      ‘magit-log-section-commit-count’ commits.
   2726 
   2727  -- Function: magit-insert-recent-commits
   2728      Insert section showing the last ‘magit-log-section-commit-count’
   2729      commits.
   2730 
   2731  -- User Option: magit-log-section-commit-count
   2732      How many recent commits ‘magit-insert-recent-commits’ and
   2733      ‘magit-insert-unpulled-or-recent-commits’ (provided there are no
   2734      unpulled commits) show.
   2735 
   2736  -- Function: magit-insert-unpulled-cherries
   2737      Insert section showing unpulled commits.  Like
   2738      ‘magit-insert-unpulled-commits’ but prefix each commit that has not
   2739      been applied yet (i.e., a commit with a patch-id not shared with
   2740      any local commit) with "+", and all others with "-".
   2741 
   2742  -- Function: magit-insert-unpushed-cherries
   2743      Insert section showing unpushed commits.  Like
   2744      ‘magit-insert-unpushed-commits’ but prefix each commit which has
   2745      not been applied to upstream yet (i.e., a commit with a patch-id
   2746      not shared with any upstream commit) with "+" and all others with
   2747      "-".
   2748 
   2749    See *note References Buffer:: for some more section inserters, which
   2750 could be used here.
   2751 
   2752 
   2753 File: magit.info,  Node: Status Header Sections,  Next: Status Module Sections,  Prev: Status Sections,  Up: Status Buffer
   2754 
   2755 5.1.2 Status Header Sections
   2756 ----------------------------
   2757 
   2758 The contents of status buffers is controlled using the hook
   2759 ‘magit-status-sections-hook’ (see *note Status Sections::).
   2760 
   2761    By default ‘magit-insert-status-headers’ is the first member of that
   2762 hook variable.
   2763 
   2764  -- Function: magit-insert-status-headers
   2765      Insert headers sections appropriate for ‘magit-status-mode’
   2766      buffers.  The sections are inserted by running the functions on the
   2767      hook ‘magit-status-headers-hook’.
   2768 
   2769  -- User Option: magit-status-headers-hook
   2770      Hook run to insert headers sections into the status buffer.
   2771 
   2772      This hook is run by ‘magit-insert-status-headers’, which in turn
   2773      has to be a member of ‘magit-status-sections-hook’ to be used at
   2774      all.
   2775 
   2776    By default the following functions are members of the above hook:
   2777 
   2778  -- Function: magit-insert-error-header
   2779      Insert a header line showing the message about the Git error that
   2780      just occurred.
   2781 
   2782      This function is only aware of the last error that occur when Git
   2783      was run for side-effects.  If, for example, an error occurs while
   2784      generating a diff, then that error won’t be inserted.  Refreshing
   2785      the status buffer causes this section to disappear again.
   2786 
   2787  -- Function: magit-insert-diff-filter-header
   2788      Insert a header line showing the effective diff filters.
   2789 
   2790  -- Function: magit-insert-head-branch-header
   2791      Insert a header line about the current branch or detached ‘HEAD’.
   2792 
   2793  -- Function: magit-insert-upstream-branch-header
   2794      Insert a header line about the branch that is usually pulled into
   2795      the current branch.
   2796 
   2797  -- Function: magit-insert-push-branch-header
   2798      Insert a header line about the branch that the current branch is
   2799      usually pushed to.
   2800 
   2801  -- Function: magit-insert-tags-header
   2802      Insert a header line about the current and/or next tag, along with
   2803      the number of commits between the tag and ‘HEAD’.
   2804 
   2805    The following functions can also be added to the above hook:
   2806 
   2807  -- Function: magit-insert-repo-header
   2808      Insert a header line showing the path to the repository top-level.
   2809 
   2810  -- Function: magit-insert-remote-header
   2811      Insert a header line about the remote of the current branch.
   2812 
   2813      If no remote is configured for the current branch, then fall back
   2814      showing the "origin" remote, or if that does not exist the first
   2815      remote in alphabetic order.
   2816 
   2817  -- Function: magit-insert-user-header
   2818      Insert a header line about the current user.
   2819 
   2820 
   2821 File: magit.info,  Node: Status Module Sections,  Next: Status Options,  Prev: Status Header Sections,  Up: Status Buffer
   2822 
   2823 5.1.3 Status Module Sections
   2824 ----------------------------
   2825 
   2826 The contents of status buffers is controlled using the hook
   2827 ‘magit-status-sections-hook’ (see *note Status Sections::).
   2828 
   2829    By default ‘magit-insert-modules’ is _not_ a member of that hook
   2830 variable.
   2831 
   2832  -- Function: magit-insert-modules
   2833      Insert submodule sections.
   2834 
   2835      Hook ‘magit-module-sections-hook’ controls which module sections
   2836      are inserted, and option ‘magit-module-sections-nested’ controls
   2837      whether they are wrapped in an additional section.
   2838 
   2839  -- User Option: magit-module-sections-hook
   2840      Hook run by ‘magit-insert-modules’.
   2841 
   2842  -- User Option: magit-module-sections-nested
   2843      This option controls whether ‘magit-insert-modules’ wraps inserted
   2844      sections in an additional section.
   2845 
   2846      If this is non-nil, then only a single top-level section is
   2847      inserted.  If it is nil, then all sections listed in
   2848      ‘magit-module-sections-hook’ become top-level sections.
   2849 
   2850  -- Function: magit-insert-modules-overview
   2851      Insert sections for all submodules.  For each section insert the
   2852      path, the branch, and the output of ‘git describe --tags’, or,
   2853      failing that, the abbreviated HEAD commit hash.
   2854 
   2855      Press ‘RET’ on such a submodule section to show its own status
   2856      buffer.  Press ‘RET’ on the "Modules" section to display a list of
   2857      submodules in a separate buffer.  This shows additional information
   2858      not displayed in the super-repository’s status buffer.
   2859 
   2860  -- Function: magit-insert-modules-unpulled-from-upstream
   2861      Insert sections for modules that haven’t been pulled from the
   2862      upstream yet.  These sections can be expanded to show the
   2863      respective commits.
   2864 
   2865  -- Function: magit-insert-modules-unpulled-from-pushremote
   2866      Insert sections for modules that haven’t been pulled from the
   2867      push-remote yet.  These sections can be expanded to show the
   2868      respective commits.
   2869 
   2870  -- Function: magit-insert-modules-unpushed-to-upstream
   2871      Insert sections for modules that haven’t been pushed to the
   2872      upstream yet.  These sections can be expanded to show the
   2873      respective commits.
   2874 
   2875  -- Function: magit-insert-modules-unpushed-to-pushremote
   2876      Insert sections for modules that haven’t been pushed to the
   2877      push-remote yet.  These sections can be expanded to show the
   2878      respective commits.
   2879 
   2880 
   2881 File: magit.info,  Node: Status Options,  Prev: Status Module Sections,  Up: Status Buffer
   2882 
   2883 5.1.4 Status Options
   2884 --------------------
   2885 
   2886  -- User Option: magit-status-margin
   2887      This option specifies whether the margin is initially shown in
   2888      Magit-Status mode buffers and how it is formatted.
   2889 
   2890      The value has the form ‘(INIT STYLE WIDTH AUTHOR AUTHOR-WIDTH)’.
   2891 
   2892         • If INIT is non-nil, then the margin is shown initially.
   2893         • STYLE controls how to format the author or committer date.  It
   2894           can be one of ‘age’ (to show the age of the commit),
   2895           ‘age-abbreviated’ (to abbreviate the time unit to a
   2896           character), or a string (suitable for ‘format-time-string’) to
   2897           show the actual date.  Option
   2898           ‘magit-log-margin-show-committer-date’ controls which date is
   2899           being displayed.
   2900         • WIDTH controls the width of the margin.  This exists for
   2901           forward compatibility and currently the value should not be
   2902           changed.
   2903         • AUTHOR controls whether the name of the author is also shown
   2904           by default.
   2905         • AUTHOR-WIDTH has to be an integer.  When the name of the
   2906           author is shown, then this specifies how much space is used to
   2907           do so.
   2908 
   2909    Also see the proceeding section for more options concerning status
   2910 buffers.
   2911 
   2912 
   2913 File: magit.info,  Node: Repository List,  Next: Logging,  Prev: Status Buffer,  Up: Inspecting
   2914 
   2915 5.2 Repository List
   2916 ===================
   2917 
   2918  -- Command: magit-list-repositories
   2919      This command displays a list of repositories in a separate buffer.
   2920 
   2921      The option ‘magit-repository-directories’ controls which
   2922      repositories are displayed.
   2923 
   2924  -- User Option: magit-repolist-columns
   2925      This option controls what columns are displayed by the command
   2926      ‘magit-list-repositories’ and how they are displayed.
   2927 
   2928      Each element has the form ‘(HEADER WIDTH FORMAT PROPS)’.
   2929 
   2930      HEADER is the string displayed in the header.  WIDTH is the width
   2931      of the column.  FORMAT is a function that is called with one
   2932      argument, the repository identification (usually its basename), and
   2933      with ‘default-directory’ bound to the toplevel of its working tree.
   2934      It has to return a string to be inserted or nil.  PROPS is an alist
   2935      that supports the keys ‘:right-align’, ‘:pad-right’ and ‘:sort’.
   2936 
   2937      The ‘:sort’ function has a weird interface described in the
   2938      docstring of ‘tabulated-list--get-sort’.  Alternatively ‘<’ and
   2939      ‘magit-repolist-version<’ can be used as those functions are
   2940      automatically replaced with functions that satisfy the interface.
   2941      Set ‘:sort’ to ‘nil’ to inhibit sorting; if unspecified, then the
   2942      column is sortable using the default sorter.
   2943 
   2944      You may wish to display a range of numeric columns using just one
   2945      character per column and without any padding between columns, in
   2946      which case you should use an appropriate HEADER, set WIDTH to 1,
   2947      and set ‘:pad-right’ to 9.  ‘+’ is substituted for numbers higher
   2948      than 9.
   2949 
   2950 The following functions can be added to the above option:
   2951 
   2952  -- Function: magit-repolist-column-ident
   2953      This function inserts the identification of the repository.
   2954      Usually this is just its basename.
   2955 
   2956  -- Function: magit-repolist-column-path
   2957      This function inserts the absolute path of the repository.
   2958 
   2959  -- Function: magit-repolist-column-version
   2960      This function inserts a description of the repository’s ‘HEAD’
   2961      revision.
   2962 
   2963  -- Function: magit-repolist-column-branch
   2964      This function inserts the name of the current branch.
   2965 
   2966  -- Function: magit-repolist-column-upstream
   2967      This function inserts the name of the upstream branch of the
   2968      current branch.
   2969 
   2970  -- Function: magit-repolist-column-branches
   2971      This function inserts the number of branches.
   2972 
   2973  -- Function: magit-repolist-column-stashes
   2974      This function inserts the number of stashes.
   2975 
   2976  -- Function: magit-repolist-column-flag
   2977      This function inserts a flag as specified by
   2978      ‘magit-repolist-column-flag-alist’.
   2979 
   2980      By default this indicates whether there are uncommitted changes.
   2981 
   2982         • ‘N’ if there is at least one untracked file.
   2983         • ‘U’ if there is at least one unstaged file.
   2984         • ‘S’ if there is at least one staged file.
   2985 
   2986      Only the first one of these that applies is shown.
   2987 
   2988  -- Function: magit-repolist-column-flags
   2989      This functions insert all flags as specified by
   2990      ‘magit-repolist-column-flag-alist’.
   2991 
   2992      This is an alternative to function ‘magit-repolist-column-flag’,
   2993      which only lists the first one found.
   2994 
   2995  -- Function: magit-repolist-column-unpulled-from-upstream
   2996      This function inserts the number of upstream commits not in the
   2997      current branch.
   2998 
   2999  -- Function: magit-repolist-column-unpulled-from-pushremote
   3000      This function inserts the number of commits in the push branch but
   3001      not the current branch.
   3002 
   3003  -- Function: magit-repolist-column-unpushed-to-upstream
   3004      This function inserts the number of commits in the current branch
   3005      but not its upstream.
   3006 
   3007  -- Function: magit-repolist-column-unpushed-to-pushremote
   3008      This function inserts the number of commits in the current branch
   3009      but not its push branch.
   3010 
   3011 The following commands are available in repolist buffers:
   3012 
   3013 ‘<RET>’ (‘magit-repolist-status’)
   3014      This command shows the status for the repository at point.
   3015 
   3016 ‘m’ (‘magit-repolist-mark’)
   3017      This command marks the repository at point.
   3018 
   3019 ‘u’ (‘magit-repolist-unmark’)
   3020      This command unmarks the repository at point.
   3021 
   3022 ‘f’ (‘magit-repolist-fetch’)
   3023      This command fetches all marked repositories.  If no repositories
   3024      are marked, then it offers to fetch all displayed repositories.
   3025 
   3026 ‘5’ (‘magit-repolist-find-file-other-frame’)
   3027      This command reads a relative file-name (without completion) and
   3028      opens the respective file in each marked repository in a new frame.
   3029      If no repositories are marked, then it offers to do this for all
   3030      displayed repositories.
   3031 
   3032 
   3033 File: magit.info,  Node: Logging,  Next: Diffing,  Prev: Repository List,  Up: Inspecting
   3034 
   3035 5.3 Logging
   3036 ===========
   3037 
   3038 The status buffer contains logs for the unpushed and unpulled commits,
   3039 but that obviously isn’t enough.  The transient prefix command
   3040 ‘magit-log’, on ‘l’, features several suffix commands, which show a
   3041 specific log in a separate log buffer.
   3042 
   3043    Like other transient prefix commands, ‘magit-log’ also features
   3044 several infix arguments that can be changed before invoking one of the
   3045 suffix commands.  However, in the case of the log transient, these
   3046 arguments may be taken from those currently in use in the current
   3047 repository’s log buffer, depending on the value of
   3048 ‘magit-prefix-use-buffer-arguments’ (see *note Transient Arguments and
   3049 Buffer Variables::).
   3050 
   3051    For information about the various arguments, see *note
   3052 (gitman)git-log::.
   3053 
   3054    The switch ‘++order=VALUE’ is converted to one of
   3055 ‘--author-date-order’, ‘--date-order’, or ‘--topo-order’ before being
   3056 passed to ‘git log’.
   3057 
   3058    The log transient also features several reflog commands.  See *note
   3059 Reflog::.
   3060 
   3061 ‘l’ (‘magit-log’)
   3062      This transient prefix command binds the following suffix commands
   3063      along with the appropriate infix arguments and displays them in a
   3064      temporary buffer until a suffix is invoked.
   3065 
   3066 ‘l l’ (‘magit-log-current’)
   3067      Show log for the current branch.  When ‘HEAD’ is detached or with a
   3068      prefix argument, show log for one or more revs read from the
   3069      minibuffer.
   3070 
   3071 ‘l h’ (‘magit-log-head’)
   3072      Show log for ‘HEAD’.
   3073 
   3074 ‘l u’ (‘magit-log-related’)
   3075      Show log for the current branch, its upstream and its push target.
   3076      When the upstream is a local branch, then also show its own
   3077      upstream.  When ‘HEAD’ is detached, then show log for that, the
   3078      previously checked out branch and its upstream and push-target.
   3079 
   3080 ‘l o’ (‘magit-log-other’)
   3081      Show log for one or more revs read from the minibuffer.  The user
   3082      can input any revision or revisions separated by a space, or even
   3083      ranges, but only branches, tags, and a representation of the commit
   3084      at point are available as completion candidates.
   3085 
   3086 ‘l L’ (‘magit-log-branches’)
   3087      Show log for all local branches and ‘HEAD’.
   3088 
   3089 ‘l b’ (‘magit-log-all-branches’)
   3090      Show log for all local and remote branches and ‘HEAD’.
   3091 
   3092 ‘l a’ (‘magit-log-all’)
   3093      Show log for all references and ‘HEAD’.
   3094 
   3095    Two additional commands that show the log for the file or blob that
   3096 is being visited in the current buffer exists, see *note Commands for
   3097 Buffers Visiting Files::.  The command ‘magit-cherry’ also shows a log,
   3098 see *note Cherries::.
   3099 
   3100 * Menu:
   3101 
   3102 * Refreshing Logs::
   3103 * Log Buffer::
   3104 * Log Margin::
   3105 * Select from Log::
   3106 * Reflog::
   3107 * Cherries::
   3108 
   3109 
   3110 File: magit.info,  Node: Refreshing Logs,  Next: Log Buffer,  Up: Logging
   3111 
   3112 5.3.1 Refreshing Logs
   3113 ---------------------
   3114 
   3115 The transient prefix command ‘magit-log-refresh’, on ‘L’, can be used to
   3116 change the log arguments used in the current buffer, without changing
   3117 which log is shown.  This works in dedicated log buffers, but also in
   3118 the status buffer.
   3119 
   3120 ‘L’ (‘magit-log-refresh’)
   3121      This transient prefix command binds the following suffix commands
   3122      along with the appropriate infix arguments and displays them in a
   3123      temporary buffer until a suffix is invoked.
   3124 
   3125 ‘L g’ (‘magit-log-refresh’)
   3126      This suffix command sets the local log arguments for the current
   3127      buffer.
   3128 
   3129 ‘L s’ (‘magit-log-set-default-arguments’)
   3130      This suffix command sets the default log arguments for buffers of
   3131      the same type as that of the current buffer.  Other existing
   3132      buffers of the same type are not affected because their local
   3133      values have already been initialized.
   3134 
   3135 ‘L w’ (‘magit-log-save-default-arguments’)
   3136      This suffix command sets the default log arguments for buffers of
   3137      the same type as that of the current buffer, and saves the value
   3138      for future sessions.  Other existing buffers of the same type are
   3139      not affected because their local values have already been
   3140      initialized.
   3141 
   3142 ‘L L’ (‘magit-toggle-margin’)
   3143      Show or hide the margin.
   3144 
   3145 
   3146 File: magit.info,  Node: Log Buffer,  Next: Log Margin,  Prev: Refreshing Logs,  Up: Logging
   3147 
   3148 5.3.2 Log Buffer
   3149 ----------------
   3150 
   3151 ‘L’ (‘magit-log-refresh’)
   3152      This transient prefix command binds the following suffix commands
   3153      along with the appropriate infix arguments and displays them in a
   3154      temporary buffer until a suffix is invoked.
   3155 
   3156      See *note Refreshing Logs::.
   3157 
   3158 ‘q’ (‘magit-log-bury-buffer’)
   3159      Bury the current buffer or the revision buffer in the same frame.
   3160      Like ‘magit-mode-bury-buffer’ (which see) but with a negative
   3161      prefix argument instead bury the revision buffer, provided it is
   3162      displayed in the current frame.
   3163 
   3164 ‘C-c C-b’ (‘magit-go-backward’)
   3165      Move backward in current buffer’s history.
   3166 
   3167 ‘C-c C-f’ (‘magit-go-forward’)
   3168      Move forward in current buffer’s history.
   3169 
   3170 ‘C-c C-n’ (‘magit-log-move-to-parent’)
   3171      Move to a parent of the current commit.  By default, this is the
   3172      first parent, but a numeric prefix can be used to specify another
   3173      parent.
   3174 
   3175 ‘j’ (‘magit-log-move-to-revision’)
   3176      Read a revision and move to it in current log buffer.
   3177 
   3178      If the chosen reference or revision isn’t being displayed in the
   3179      current log buffer, then inform the user about that and do nothing
   3180      else.
   3181 
   3182      If invoked outside any log buffer, then display the log buffer of
   3183      the current repository first; creating it if necessary.
   3184 
   3185 ‘<SPC>’ (‘magit-diff-show-or-scroll-up’)
   3186      Update the commit or diff buffer for the thing at point.
   3187 
   3188      Either show the commit or stash at point in the appropriate buffer,
   3189      or if that buffer is already being displayed in the current frame
   3190      and contains information about that commit or stash, then instead
   3191      scroll the buffer up.  If there is no commit or stash at point,
   3192      then prompt for a commit.
   3193 
   3194 ‘<DEL>’ (‘magit-diff-show-or-scroll-down’)
   3195      Update the commit or diff buffer for the thing at point.
   3196 
   3197      Either show the commit or stash at point in the appropriate buffer,
   3198      or if that buffer is already being displayed in the current frame
   3199      and contains information about that commit or stash, then instead
   3200      scroll the buffer down.  If there is no commit or stash at point,
   3201      then prompt for a commit.
   3202 
   3203 ‘=’ (‘magit-log-toggle-commit-limit’)
   3204      Toggle the number of commits the current log buffer is limited to.
   3205      If the number of commits is currently limited, then remove that
   3206      limit.  Otherwise set it to 256.
   3207 
   3208 ‘+’ (‘magit-log-double-commit-limit’)
   3209      Double the number of commits the current log buffer is limited to.
   3210 
   3211 ‘-’ (‘magit-log-half-commit-limit’)
   3212      Half the number of commits the current log buffer is limited to.
   3213 
   3214  -- User Option: magit-log-auto-more
   3215      Insert more log entries automatically when moving past the last
   3216      entry.  Only considered when moving past the last entry with
   3217      ‘magit-goto-*-section’ commands.
   3218 
   3219  -- User Option: magit-log-show-refname-after-summary
   3220      Whether to show the refnames after the commit summaries.  This is
   3221      useful if you use really long branch names.
   3222 
   3223  -- User Option: magit-log-show-color-graph-limit
   3224      When showing more commits than specified by this option, then the
   3225      ‘--color’ argument, if specified, is silently dropped.  This is
   3226      necessary because the ‘ansi-color’ library, which is used to turn
   3227      control sequences into faces, is just too slow.
   3228 
   3229  -- User Option: magit-log-show-signatures-limit
   3230      When showing more commits than specified by this option, then the
   3231      ‘--show-signature’ argument, if specified, is silently dropped.
   3232      This is necessary because checking the signature of a large number
   3233      of commits is just too slow.
   3234 
   3235    Magit displays references in logs a bit differently from how Git does
   3236 it.
   3237 
   3238    Local branches are blue and remote branches are green.  Of course
   3239 that depends on the used theme, as do the colors used for other types of
   3240 references.  The current branch has a box around it, as do remote
   3241 branches that are their respective remote’s ‘HEAD’ branch.
   3242 
   3243    If a local branch and its push-target point at the same commit, then
   3244 their names are combined to preserve space and to make that relationship
   3245 visible.  For example:
   3246 
   3247      origin/feature
   3248      [green][blue-]
   3249 
   3250      instead of
   3251 
   3252      feature origin/feature
   3253      [blue-] [green-------]
   3254 
   3255    Also note that while the transient features the ‘--show-signature’
   3256 argument, that won’t actually be used when enabled, because Magit
   3257 defaults to use just one line per commit.  Instead the commit colorized
   3258 to indicate the validity of the signed commit object, using the faces
   3259 named ‘magit-signature-*’ (which see).
   3260 
   3261    For a description of ‘magit-log-margin’ see *note Log Margin::.
   3262 
   3263 
   3264 File: magit.info,  Node: Log Margin,  Next: Select from Log,  Prev: Log Buffer,  Up: Logging
   3265 
   3266 5.3.3 Log Margin
   3267 ----------------
   3268 
   3269 In buffers which show one or more logs, it is possible to show
   3270 additional information about each commit in the margin.  The options
   3271 used to configure the margin are named ‘magit-INFIX-margin’, where INFIX
   3272 is the same as in the respective major-mode ‘magit-INFIX-mode’.  In
   3273 regular log buffers that would be ‘magit-log-margin’.
   3274 
   3275  -- User Option: magit-log-margin
   3276      This option specifies whether the margin is initially shown in
   3277      Magit-Log mode buffers and how it is formatted.
   3278 
   3279      The value has the form ‘(INIT STYLE WIDTH AUTHOR AUTHOR-WIDTH)’.
   3280 
   3281         • If INIT is non-nil, then the margin is shown initially.
   3282         • STYLE controls how to format the author or committer date.  It
   3283           can be one of ‘age’ (to show the age of the commit),
   3284           ‘age-abbreviated’ (to abbreviate the time unit to a
   3285           character), or a string (suitable for ‘format-time-string’) to
   3286           show the actual date.  Option
   3287           ‘magit-log-margin-show-committer-date’ controls which date is
   3288           being displayed.
   3289         • WIDTH controls the width of the margin.  This exists for
   3290           forward compatibility and currently the value should not be
   3291           changed.
   3292         • AUTHOR controls whether the name of the author is also shown
   3293           by default.
   3294         • AUTHOR-WIDTH has to be an integer.  When the name of the
   3295           author is shown, then this specifies how much space is used to
   3296           do so.
   3297 
   3298    You can change the STYLE and AUTHOR-WIDTH of all ‘magit-INFIX-margin’
   3299 options to the same values by customizing ‘magit-log-margin’ *before*
   3300 ‘magit’ is loaded.  If you do that, then the respective values for the
   3301 other options will default to what you have set for that variable.
   3302 Likewise if you set INIT in ‘magit-log-margin’ to ‘nil’, then that is
   3303 used in the default of all other options.  But setting it to ‘t’, i.e.
   3304 re-enforcing the default for that option, does not carry to other
   3305 options.
   3306 
   3307  -- User Option: magit-log-margin-show-committer-date
   3308      This option specifies whether to show the committer date in the
   3309      margin.  This option only controls whether the committer date is
   3310      displayed instead of the author date.  Whether some date is
   3311      displayed in the margin and whether the margin is displayed at all
   3312      is controlled by other options.
   3313 
   3314 ‘L’ (‘magit-margin-settings’)
   3315      This transient prefix command binds the following suffix commands,
   3316      each of which changes the appearance of the margin in some way.
   3317 
   3318    In some buffers that support the margin, ‘L’ is instead bound to
   3319 ‘magit-log-refresh’, but that transient features the same commands, and
   3320 then some other unrelated commands.
   3321 
   3322 ‘L L’ (‘magit-toggle-margin’)
   3323      This command shows or hides the margin.
   3324 
   3325 ‘L l’ (‘magit-cycle-margin-style’)
   3326      This command cycles the style used for the margin.
   3327 
   3328 ‘L d’ (‘magit-toggle-margin-details’)
   3329      This command shows or hides details in the margin.
   3330 
   3331 
   3332 File: magit.info,  Node: Select from Log,  Next: Reflog,  Prev: Log Margin,  Up: Logging
   3333 
   3334 5.3.4 Select from Log
   3335 ---------------------
   3336 
   3337 When the user has to select a recent commit that is reachable from
   3338 ‘HEAD’, using regular completion would be inconvenient (because most
   3339 humans cannot remember hashes or "HEAD~5", at least not without double
   3340 checking).  Instead a log buffer is used to select the commit, which has
   3341 the advantage that commits are presented in order and with the commit
   3342 message.
   3343 
   3344    Such selection logs are used when selecting the beginning of a rebase
   3345 and when selecting the commit to be squashed into.
   3346 
   3347    In addition to the key bindings available in all log buffers, the
   3348 following additional key bindings are available in selection log
   3349 buffers:
   3350 
   3351 ‘C-c C-c’ (‘magit-log-select-pick’)
   3352      Select the commit at point and act on it.  Call
   3353      ‘magit-log-select-pick-function’ with the selected commit as
   3354      argument.
   3355 
   3356 ‘C-c C-k’ (‘magit-log-select-quit’)
   3357      Abort selecting a commit, don’t act on any commit.
   3358 
   3359  -- User Option: magit-log-select-margin
   3360      This option specifies whether the margin is initially shown in
   3361      Magit-Log-Select mode buffers and how it is formatted.
   3362 
   3363      The value has the form ‘(INIT STYLE WIDTH AUTHOR AUTHOR-WIDTH)’.
   3364 
   3365         • If INIT is non-nil, then the margin is shown initially.
   3366         • STYLE controls how to format the author or committer date.  It
   3367           can be one of ‘age’ (to show the age of the commit),
   3368           ‘age-abbreviated’ (to abbreviate the time unit to a
   3369           character), or a string (suitable for ‘format-time-string’) to
   3370           show the actual date.  Option
   3371           ‘magit-log-margin-show-committer-date’ controls which date is
   3372           being displayed.
   3373         • WIDTH controls the width of the margin.  This exists for
   3374           forward compatibility and currently the value should not be
   3375           changed.
   3376         • AUTHOR controls whether the name of the author is also shown
   3377           by default.
   3378         • AUTHOR-WIDTH has to be an integer.  When the name of the
   3379           author is shown, then this specifies how much space is used to
   3380           do so.
   3381 
   3382 
   3383 File: magit.info,  Node: Reflog,  Next: Cherries,  Prev: Select from Log,  Up: Logging
   3384 
   3385 5.3.5 Reflog
   3386 ------------
   3387 
   3388 Also see *note (gitman)git-reflog::.
   3389 
   3390    These reflog commands are available from the log transient.  See
   3391 *note Logging::.
   3392 
   3393 ‘l r’ (‘magit-reflog-current’)
   3394      Display the reflog of the current branch.
   3395 
   3396 ‘l O’ (‘magit-reflog-other’)
   3397      Display the reflog of a branch or another ref.
   3398 
   3399 ‘l H’ (‘magit-reflog-head’)
   3400      Display the ‘HEAD’ reflog.
   3401 
   3402  -- User Option: magit-reflog-margin
   3403      This option specifies whether the margin is initially shown in
   3404      Magit-Reflog mode buffers and how it is formatted.
   3405 
   3406      The value has the form ‘(INIT STYLE WIDTH AUTHOR AUTHOR-WIDTH)’.
   3407 
   3408         • If INIT is non-nil, then the margin is shown initially.
   3409         • STYLE controls how to format the author or committer date.  It
   3410           can be one of ‘age’ (to show the age of the commit),
   3411           ‘age-abbreviated’ (to abbreviate the time unit to a
   3412           character), or a string (suitable for ‘format-time-string’) to
   3413           show the actual date.  Option
   3414           ‘magit-log-margin-show-committer-date’ controls which date is
   3415           being displayed.
   3416         • WIDTH controls the width of the margin.  This exists for
   3417           forward compatibility and currently the value should not be
   3418           changed.
   3419         • AUTHOR controls whether the name of the author is also shown
   3420           by default.
   3421         • AUTHOR-WIDTH has to be an integer.  When the name of the
   3422           author is shown, then this specifies how much space is used to
   3423           do so.
   3424 
   3425 
   3426 File: magit.info,  Node: Cherries,  Prev: Reflog,  Up: Logging
   3427 
   3428 5.3.6 Cherries
   3429 --------------
   3430 
   3431 Cherries are commits that haven’t been applied upstream (yet), and are
   3432 usually visualized using a log.  Each commit is prefixed with ‘-’ if it
   3433 has an equivalent in the upstream and ‘+’ if it does not, i.e., if it is
   3434 a cherry.
   3435 
   3436    The command ‘magit-cherry’ shows cherries for a single branch, but
   3437 the references buffer (see *note References Buffer::) can show cherries
   3438 for multiple "upstreams" at once.
   3439 
   3440    Also see *note (gitman)git-reflog::.
   3441 
   3442 ‘Y’ (‘magit-cherry’)
   3443      Show commits that are in a certain branch but that have not been
   3444      merged in the upstream branch.
   3445 
   3446  -- User Option: magit-cherry-margin
   3447      This option specifies whether the margin is initially shown in
   3448      Magit-Cherry mode buffers and how it is formatted.
   3449 
   3450      The value has the form ‘(INIT STYLE WIDTH AUTHOR AUTHOR-WIDTH)’.
   3451 
   3452         • If INIT is non-nil, then the margin is shown initially.
   3453         • STYLE controls how to format the author or committer date.  It
   3454           can be one of ‘age’ (to show the age of the commit),
   3455           ‘age-abbreviated’ (to abbreviate the time unit to a
   3456           character), or a string (suitable for ‘format-time-string’) to
   3457           show the actual date.  Option
   3458           ‘magit-log-margin-show-committer-date’ controls which date is
   3459           being displayed.
   3460         • WIDTH controls the width of the margin.  This exists for
   3461           forward compatibility and currently the value should not be
   3462           changed.
   3463         • AUTHOR controls whether the name of the author is also shown
   3464           by default.
   3465         • AUTHOR-WIDTH has to be an integer.  When the name of the
   3466           author is shown, then this specifies how much space is used to
   3467           do so.
   3468 
   3469 
   3470 File: magit.info,  Node: Diffing,  Next: Ediffing,  Prev: Logging,  Up: Inspecting
   3471 
   3472 5.4 Diffing
   3473 ===========
   3474 
   3475 The status buffer contains diffs for the staged and unstaged commits,
   3476 but that obviously isn’t enough.  The transient prefix command
   3477 ‘magit-diff’, on ‘d’, features several suffix commands, which show a
   3478 specific diff in a separate diff buffer.
   3479 
   3480    Like other transient prefix commands, ‘magit-diff’ also features
   3481 several infix arguments that can be changed before invoking one of the
   3482 suffix commands.  However, in the case of the diff transient, these
   3483 arguments may be taken from those currently in use in the current
   3484 repository’s diff buffer, depending on the value of
   3485 ‘magit-prefix-use-buffer-arguments’ (see *note Transient Arguments and
   3486 Buffer Variables::).
   3487 
   3488    Also see *note (gitman)git-diff::.
   3489 
   3490 ‘d’ (‘magit-diff’)
   3491      This transient prefix command binds the following suffix commands
   3492      along with the appropriate infix arguments and displays them in a
   3493      temporary buffer until a suffix is invoked.
   3494 
   3495 ‘d d’ (‘magit-diff-dwim’)
   3496      Show changes for the thing at point.
   3497 
   3498 ‘d r’ (‘magit-diff-range’)
   3499      Show differences between two commits.
   3500 
   3501      RANGE should be a range (A..B or A...B) but can also be a single
   3502      commit.  If one side of the range is omitted, then it defaults to
   3503      ‘HEAD’.  If just a commit is given, then changes in the working
   3504      tree relative to that commit are shown.
   3505 
   3506      If the region is active, use the revisions on the first and last
   3507      line of the region.  With a prefix argument, instead of diffing the
   3508      revisions, choose a revision to view changes along, starting at the
   3509      common ancestor of both revisions (i.e., use a "..." range).
   3510 
   3511 ‘d w’ (‘magit-diff-working-tree’)
   3512      Show changes between the current working tree and the ‘HEAD’
   3513      commit.  With a prefix argument show changes between the working
   3514      tree and a commit read from the minibuffer.
   3515 
   3516 ‘d s’ (‘magit-diff-staged’)
   3517      Show changes between the index and the ‘HEAD’ commit.  With a
   3518      prefix argument show changes between the index and a commit read
   3519      from the minibuffer.
   3520 
   3521 ‘d u’ (‘magit-diff-unstaged’)
   3522      Show changes between the working tree and the index.
   3523 
   3524 ‘d p’ (‘magit-diff-paths’)
   3525      Show changes between any two files on disk.
   3526 
   3527    All of the above suffix commands update the repository’s diff buffer.
   3528 The diff transient also features two commands which show differences in
   3529 another buffer:
   3530 
   3531 ‘d c’ (‘magit-show-commit’)
   3532      Show the commit at point.  If there is no commit at point or with a
   3533      prefix argument, prompt for a commit.
   3534 
   3535 ‘d t’ (‘magit-stash-show’)
   3536      Show all diffs of a stash in a buffer.
   3537 
   3538    Two additional commands that show the diff for the file or blob that
   3539 is being visited in the current buffer exists, see *note Commands for
   3540 Buffers Visiting Files::.
   3541 
   3542 * Menu:
   3543 
   3544 * Refreshing Diffs::
   3545 * Commands Available in Diffs::
   3546 * Diff Options::
   3547 * Revision Buffer::
   3548 
   3549 
   3550 File: magit.info,  Node: Refreshing Diffs,  Next: Commands Available in Diffs,  Up: Diffing
   3551 
   3552 5.4.1 Refreshing Diffs
   3553 ----------------------
   3554 
   3555 The transient prefix command ‘magit-diff-refresh’, on ‘D’, can be used
   3556 to change the diff arguments used in the current buffer, without
   3557 changing which diff is shown.  This works in dedicated diff buffers, but
   3558 also in the status buffer.
   3559 
   3560    (There is one exception; diff arguments cannot be changed in buffers
   3561 created by ‘magit-merge-preview’ because the underlying Git command does
   3562 not support these arguments.)
   3563 
   3564 ‘D’ (‘magit-diff-refresh’)
   3565      This transient prefix command binds the following suffix commands
   3566      along with the appropriate infix arguments and displays them in a
   3567      temporary buffer until a suffix is invoked.
   3568 
   3569 ‘D g’ (‘magit-diff-refresh’)
   3570      This suffix command sets the local diff arguments for the current
   3571      buffer.
   3572 
   3573 ‘D s’ (‘magit-diff-set-default-arguments’)
   3574      This suffix command sets the default diff arguments for buffers of
   3575      the same type as that of the current buffer.  Other existing
   3576      buffers of the same type are not affected because their local
   3577      values have already been initialized.
   3578 
   3579 ‘D w’ (‘magit-diff-save-default-arguments’)
   3580      This suffix command sets the default diff arguments for buffers of
   3581      the same type as that of the current buffer, and saves the value
   3582      for future sessions.  Other existing buffers of the same type are
   3583      not affected because their local values have already been
   3584      initialized.
   3585 
   3586 ‘D t’ (‘magit-diff-toggle-refine-hunk’)
   3587      This command toggles hunk refinement on or off.
   3588 
   3589 ‘D r’ (‘magit-diff-switch-range-type’)
   3590      This command converts the diff range type from "revA..revB" to
   3591      "revB...revA", or vice versa.
   3592 
   3593 ‘D f’ (‘magit-diff-flip-revs’)
   3594      This command swaps revisions in the diff range from "revA..revB" to
   3595      "revB..revA", or vice versa.
   3596 
   3597 ‘D F’ (‘magit-diff-toggle-file-filter’)
   3598      This command toggles the file restriction of the diffs in the
   3599      current buffer, allowing you to quickly switch between viewing all
   3600      the changes in the commit and the restricted subset.  As a special
   3601      case, when this command is called from a log buffer, it toggles the
   3602      file restriction in the repository’s revision buffer, which is
   3603      useful when you display a revision from a log buffer that is
   3604      restricted to a file or files.
   3605 
   3606    In addition to the above transient, which allows changing any of the
   3607 supported arguments, there also exist some commands that change only a
   3608 particular argument.
   3609 
   3610 ‘-’ (‘magit-diff-less-context’)
   3611      This command decreases the context for diff hunks by COUNT lines.
   3612 
   3613 ‘+’ (‘magit-diff-more-context’)
   3614      This command increases the context for diff hunks by COUNT lines.
   3615 
   3616 ‘0’ (‘magit-diff-default-context’)
   3617      This command resets the context for diff hunks to the default
   3618      height.
   3619 
   3620    The following commands quickly change what diff is being displayed
   3621 without having to using one of the diff transient.
   3622 
   3623 ‘C-c C-d’ (‘magit-diff-while-committing’)
   3624      While committing, this command shows the changes that are about to
   3625      be committed.  While amending, invoking the command again toggles
   3626      between showing just the new changes or all the changes that will
   3627      be committed.
   3628 
   3629      This binding is available in the diff buffer as well as the commit
   3630      message buffer.
   3631 
   3632 ‘C-c C-b’ (‘magit-go-backward’)
   3633      This command moves backward in current buffer’s history.
   3634 
   3635 ‘C-c C-f’ (‘magit-go-forward’)
   3636      This command moves forward in current buffer’s history.
   3637 
   3638 
   3639 File: magit.info,  Node: Commands Available in Diffs,  Next: Diff Options,  Prev: Refreshing Diffs,  Up: Diffing
   3640 
   3641 5.4.2 Commands Available in Diffs
   3642 ---------------------------------
   3643 
   3644 Some commands are only available if point is inside a diff.
   3645 
   3646    ‘magit-diff-visit-file’ and related commands visit the appropriate
   3647 version of the file that the diff at point is about.  Likewise
   3648 ‘magit-diff-visit-worktree-file’ and related commands visit the worktree
   3649 version of the file that the diff at point is about.  See *note Visiting
   3650 Files and Blobs from a Diff:: for more information and the key bindings.
   3651 
   3652 ‘C-c C-t’ (‘magit-diff-trace-definition’)
   3653      This command shows a log for the definition at point.
   3654 
   3655  -- User Option: magit-log-trace-definition-function
   3656      The function specified by this option is used by
   3657      ‘magit-log-trace-definition’ to determine the function at point.
   3658      For major-modes that have special needs, you could set the local
   3659      value using the mode’s hook.
   3660 
   3661 ‘C-c C-e’ (‘magit-diff-edit-hunk-commit’)
   3662      From a hunk, this command edits the respective commit and visits
   3663      the file.
   3664 
   3665      First it visits the file being modified by the hunk at the correct
   3666      location using ‘magit-diff-visit-file’.  This actually visits a
   3667      blob.  When point is on a diff header, not within an individual
   3668      hunk, then this visits the blob the first hunk is about.
   3669 
   3670      Then it invokes ‘magit-edit-line-commit’, which uses an interactive
   3671      rebase to make the commit editable, or if that is not possible
   3672      because the commit is not reachable from ‘HEAD’ by checking out
   3673      that commit directly.  This also causes the actual worktree file to
   3674      be visited.
   3675 
   3676      Neither the blob nor the file buffer are killed when finishing the
   3677      rebase.  If that is undesirable, then it might be better to use
   3678      ‘magit-rebase-edit-commit’ instead of this command.
   3679 
   3680 ‘j’ (‘magit-jump-to-diffstat-or-diff’)
   3681      This command jumps to the diffstat or diff.  When point is on a
   3682      file inside the diffstat section, then jump to the respective diff
   3683      section.  Otherwise, jump to the diffstat section or a child
   3684      thereof.
   3685 
   3686    The next two commands are not specific to Magit-Diff mode (or and
   3687 Magit buffer for that matter), but it might be worth pointing out that
   3688 they are available here too.
   3689 
   3690 ‘<SPC>’ (‘scroll-up’)
   3691      This command scrolls text upward.
   3692 
   3693 ‘<DEL>’ (‘scroll-down’)
   3694      This command scrolls text downward.
   3695 
   3696 
   3697 File: magit.info,  Node: Diff Options,  Next: Revision Buffer,  Prev: Commands Available in Diffs,  Up: Diffing
   3698 
   3699 5.4.3 Diff Options
   3700 ------------------
   3701 
   3702  -- User Option: magit-diff-refine-hunk
   3703      Whether to show word-granularity differences within diff hunks.
   3704 
   3705         • ‘nil’ Never show fine differences.
   3706         • ‘t’ Show fine differences for the current diff hunk only.
   3707         • ‘all’ Show fine differences for all displayed diff hunks.
   3708 
   3709  -- User Option: magit-diff-refine-ignore-whitespace
   3710      Whether to ignore whitespace changes in word-granularity
   3711      differences.
   3712 
   3713  -- User Option: magit-diff-adjust-tab-width
   3714      Whether to adjust the width of tabs in diffs.
   3715 
   3716      Determining the correct width can be expensive if it requires
   3717      opening large and/or many files, so the widths are cached in the
   3718      variable ‘magit-diff--tab-width-cache’.  Set that to nil to
   3719      invalidate the cache.
   3720 
   3721         • ‘nil’ Never adjust tab width.  Use ‘tab-width’s value from the
   3722           Magit buffer itself instead.
   3723 
   3724         • ‘t’ If the corresponding file-visiting buffer exits, then use
   3725           ‘tab-width’’s value from that buffer.  Doing this is cheap, so
   3726           this value is used even if a corresponding cache entry exists.
   3727 
   3728         • ‘always’ If there is no such buffer, then temporarily visit
   3729           the file to determine the value.
   3730 
   3731         • NUMBER Like ‘always’, but don’t visit files larger than NUMBER
   3732           bytes.
   3733 
   3734  -- User Option: magit-diff-paint-whitespace
   3735      Specify where to highlight whitespace errors.
   3736 
   3737      See ‘magit-diff-highlight-trailing’,
   3738      ‘magit-diff-highlight-indentation’.  The symbol ‘t’ means in all
   3739      diffs, ‘status’ means only in the status buffer, and nil means
   3740      nowhere.
   3741 
   3742         • ‘nil’ Never highlight whitespace errors.
   3743         • ‘t’ Highlight whitespace errors everywhere.
   3744         • ‘uncommitted’ Only highlight whitespace errors in diffs
   3745           showing uncommitted changes.  For backward compatibility
   3746           ‘status’ is treated as a synonym.
   3747 
   3748  -- User Option: magit-diff-paint-whitespace-lines
   3749      Specify in what kind of lines to highlight whitespace errors.
   3750 
   3751         • ‘t’ Highlight only in added lines.
   3752         • ‘both’ Highlight in added and removed lines.
   3753         • ‘all’ Highlight in added, removed and context lines.
   3754 
   3755  -- User Option: magit-diff-highlight-trailing
   3756      Whether to highlight whitespace at the end of a line in diffs.
   3757      Used only when ‘magit-diff-paint-whitespace’ is non-nil.
   3758 
   3759  -- User Option: magit-diff-highlight-indentation
   3760      This option controls whether to highlight the indentation in case
   3761      it used the "wrong" indentation style.  Indentation is only
   3762      highlighted if ‘magit-diff-paint-whitespace’ is also non-nil.
   3763 
   3764      The value is an alist of the form ‘((REGEXP . INDENT)...)’.  The
   3765      path to the current repository is matched against each element in
   3766      reverse order.  Therefore if a REGEXP matches, then earlier
   3767      elements are not tried.
   3768 
   3769      If the used INDENT is ‘tabs’, highlight indentation with tabs.  If
   3770      INDENT is an integer, highlight indentation with at least that many
   3771      spaces.  Otherwise, highlight neither.
   3772 
   3773  -- User Option: magit-diff-hide-trailing-cr-characters
   3774      Whether to hide ^M characters at the end of a line in diffs.
   3775 
   3776  -- User Option: magit-diff-highlight-hunk-region-functions
   3777      This option specifies the functions used to highlight the
   3778      hunk-internal region.
   3779 
   3780      ‘magit-diff-highlight-hunk-region-dim-outside’ overlays the outside
   3781      of the hunk internal selection with a face that causes the added
   3782      and removed lines to have the same background color as context
   3783      lines.  This function should not be removed from the value of this
   3784      option.
   3785 
   3786      ‘magit-diff-highlight-hunk-region-using-overlays’ and
   3787      ‘magit-diff-highlight-hunk-region-using-underline’ emphasize the
   3788      region by placing delimiting horizontal lines before and after it.
   3789      Both of these functions have glitches which cannot be fixed due to
   3790      limitations of Emacs’ display engine.  For more information see
   3791      <https://github.com/magit/magit/issues/2758> ff.
   3792 
   3793      Instead of, or in addition to, using delimiting horizontal lines,
   3794      to emphasize the boundaries, you may wish to emphasize the text
   3795      itself, using ‘magit-diff-highlight-hunk-region-using-face’.
   3796 
   3797      In terminal frames it’s not possible to draw lines as the overlay
   3798      and underline variants normally do, so there they fall back to
   3799      calling the face function instead.
   3800 
   3801  -- User Option: magit-diff-unmarked-lines-keep-foreground
   3802      This option controls whether added and removed lines outside the
   3803      hunk-internal region only lose their distinct background color or
   3804      also the foreground color.  Whether the outside of the region is
   3805      dimmed at all depends on
   3806      ‘magit-diff-highlight-hunk-region-functions’.
   3807 
   3808  -- User Option: magit-diff-extra-stat-arguments
   3809      This option specifies additional arguments to be used alongside
   3810      ‘--stat’.
   3811 
   3812      The value is a list of zero or more arguments or a function that
   3813      takes no argument and returns such a list.  These arguments are
   3814      allowed here: ‘--stat-width’, ‘--stat-name-width’,
   3815      ‘--stat-graph-width’ and ‘--compact-summary’.  Also see *note
   3816      (gitman)git-diff::.
   3817 
   3818 
   3819 File: magit.info,  Node: Revision Buffer,  Prev: Diff Options,  Up: Diffing
   3820 
   3821 5.4.4 Revision Buffer
   3822 ---------------------
   3823 
   3824  -- User Option: magit-revision-insert-related-refs
   3825      Whether to show related branches in revision buffers.
   3826 
   3827         • ‘nil’ Don’t show any related branches.
   3828         • ‘t’ Show related local branches.
   3829         • ‘all’ Show related local and remote branches.
   3830         • ‘mixed’ Show all containing branches and local merged
   3831           branches.
   3832 
   3833  -- User Option: magit-revision-show-gravatars
   3834      Whether to show gravatar images in revision buffers.
   3835 
   3836      If ‘nil’, then don’t insert any gravatar images.  If ‘t’, then
   3837      insert both images.  If ‘author’ or ‘committer’, then insert only
   3838      the respective image.
   3839 
   3840      If you have customized the option ‘magit-revision-headers-format’
   3841      and want to insert the images then you might also have to specify
   3842      where to do so.  In that case the value has to be a cons-cell of
   3843      two regular expressions.  The car specifies where to insert the
   3844      author’s image.  The top half of the image is inserted right after
   3845      the matched text, the bottom half on the next line in the same
   3846      column.  The cdr specifies where to insert the committer’s image,
   3847      accordingly.  Either the car or the cdr may be nil."
   3848 
   3849  -- User Option: magit-revision-use-hash-sections
   3850      Whether to turn hashes inside the commit message into sections.
   3851 
   3852      If non-nil, then hashes inside the commit message are turned into
   3853      ‘commit’ sections.  There is a trade off to be made between
   3854      performance and reliability:
   3855 
   3856         • ‘slow’ calls git for every word to be absolutely sure.
   3857         • ‘quick’ skips words less than seven characters long.
   3858         • ‘quicker’ additionally skips words that don’t contain a
   3859           number.
   3860         • ‘quickest’ uses all words that are at least seven characters
   3861           long and which contain at least one number as well as at least
   3862           one letter.
   3863 
   3864      If nil, then no hashes are turned into sections, but you can still
   3865      visit the commit at point using "RET".
   3866 
   3867    The diffs shown in the revision buffer may be automatically
   3868 restricted to a subset of the changed files.  If the revision buffer is
   3869 displayed from a log buffer, the revision buffer will share the same
   3870 file restriction as that log buffer (also see the command
   3871 ‘magit-diff-toggle-file-filter’).
   3872 
   3873  -- User Option: magit-revision-filter-files-on-follow
   3874      Whether showing a commit from a log buffer honors the log’s file
   3875      filter when the log arguments include ‘--follow’.
   3876 
   3877      When this option is nil, displaying a commit from a log ignores the
   3878      log’s file filter if the log arguments include ‘--follow’.  Doing
   3879      so avoids showing an empty diff in revision buffers for commits
   3880      before a rename event.  In such cases, the ‘--patch’ argument of
   3881      the log transient can be used to show the file-restricted diffs
   3882      inline.
   3883 
   3884      Set this option to non-nil to keep the log’s file restriction even
   3885      if ‘--follow’ is present in the log arguments.
   3886 
   3887    If the revision buffer is not displayed from a log buffer, the file
   3888 restriction is determined as usual (see *note Transient Arguments and
   3889 Buffer Variables::).
   3890 
   3891 
   3892 File: magit.info,  Node: Ediffing,  Next: References Buffer,  Prev: Diffing,  Up: Inspecting
   3893 
   3894 5.5 Ediffing
   3895 ============
   3896 
   3897 This section describes how to enter Ediff from Magit buffers.  For
   3898 information on how to use Ediff itself, see *note (ediff)Top::.
   3899 
   3900 ‘e’ (‘magit-ediff-dwim’)
   3901      Compare, stage, or resolve using Ediff.
   3902 
   3903      This command tries to guess what file, and what commit or range the
   3904      user wants to compare, stage, or resolve using Ediff.  It might
   3905      only be able to guess either the file, or range/commit, in which
   3906      case the user is asked about the other.  It might not always guess
   3907      right, in which case the appropriate ‘magit-ediff-*’ command has to
   3908      be used explicitly.  If it cannot read the user’s mind at all, then
   3909      it asks the user for a command to run.
   3910 
   3911 ‘E’ (‘magit-ediff’)
   3912      This transient prefix command binds the following suffix commands
   3913      and displays them in a temporary buffer until a suffix is invoked.
   3914 
   3915 ‘E r’ (‘magit-ediff-compare’)
   3916      Compare two revisions of a file using Ediff.
   3917 
   3918      If the region is active, use the revisions on the first and last
   3919      line of the region.  With a prefix argument, instead of diffing the
   3920      revisions, choose a revision to view changes along, starting at the
   3921      common ancestor of both revisions (i.e., use a "..." range).
   3922 
   3923 ‘E m’ (‘magit-ediff-resolve-rest’)
   3924      This command allows you to resolve outstanding conflicts in the
   3925      file at point using Ediff.  If there is no file at point or if it
   3926      doesn’t have any unmerged changes, then this command prompts for a
   3927      file.
   3928 
   3929      Provided that the value of ‘merge.conflictstyle’ is ‘diff3’, you
   3930      can view the file’s merge-base revision using ‘/’ in the Ediff
   3931      control buffer.
   3932 
   3933      The A, B and Ancestor buffers are constructed from the conflict
   3934      markers in the worktree file.  Because you and/or Git may have
   3935      already resolved some conflicts, that means that these buffers may
   3936      not contain the actual versions from the respective blobs.
   3937 
   3938 ‘E m’ (‘magit-ediff-resolve-all’)
   3939      This command allows you to resolve all conflicts in the file at
   3940      point using Ediff.  If there is no file at point or if it doesn’t
   3941      have any unmerged changes, then this command prompts for a file.
   3942 
   3943      Provided that the value of ‘merge.conflictstyle’ is ‘diff3’, you
   3944      can view the file’s merge-base revision using ‘/’ in the Ediff
   3945      control buffer.
   3946 
   3947      First the file in the worktree is moved aside, appending the suffix
   3948      ‘.ORIG’, so that you could later go back to that version.  Then it
   3949      is reconstructed from the two sides of the conflict and the
   3950      merge-base, if available.
   3951 
   3952      It would be nice if the worktree file were just used as-is, but
   3953      Ediff does not support that.  This means that all conflicts, that
   3954      Git has already resolved, are restored.  On the other hand Ediff
   3955      also tries to resolve conflicts, and in many cases Ediff and Git
   3956      should produce similar results.
   3957 
   3958      However if you have already resolved some conflicts manually, then
   3959      those changes are discarded (though you can recover them from the
   3960      backup file).  In such cases ‘magit-ediff-resolve-rest’ might be
   3961      more suitable.
   3962 
   3963      The advantage that this command has over ‘magit-ediff-resolve-rest’
   3964      is that the A, B and Ancestor buffers correspond to blobs from the
   3965      respective commits, allowing you to inspect a side in context and
   3966      to use Magit commands in these buffers to do so.  Blame and log
   3967      commands are particularly useful here.
   3968 
   3969 ‘E t’ (‘magit-git-mergetool’)
   3970      This command does not actually use Ediff.  While it serves the same
   3971      purpose as ‘magit-ediff-resolve-rest’, it uses ‘git mergetool
   3972      --gui’ to resolve conflicts.
   3973 
   3974      With a prefix argument this acts as a transient prefix command,
   3975      allowing the user to select the mergetool and change some settings.
   3976 
   3977 ‘E s’ (‘magit-ediff-stage’)
   3978      Stage and unstage changes to a file using Ediff, defaulting to the
   3979      file at point.
   3980 
   3981 ‘E u’ (‘magit-ediff-show-unstaged’)
   3982      Show unstaged changes to a file using Ediff.
   3983 
   3984 ‘E i’ (‘magit-ediff-show-staged’)
   3985      Show staged changes to a file using Ediff.
   3986 
   3987 ‘E w’ (‘magit-ediff-show-working-tree’)
   3988      Show changes in a file between ‘HEAD’ and working tree using Ediff.
   3989 
   3990 ‘E c’ (‘magit-ediff-show-commit’)
   3991      Show changes to a file introduced by a commit using Ediff.
   3992 
   3993 ‘E z’ (‘magit-ediff-show-stash’)
   3994      Show changes to a file introduced by a stash using Ediff.
   3995 
   3996  -- User Option: magit-ediff-dwim-resolve-function
   3997      This option controls which function ‘magit-ediff-dwim’ uses to
   3998      resolve conflicts.  One of ‘magit-ediff-resolve-rest’,
   3999      ‘magit-ediff-resolve-all’ or ‘magit-git-mergetool’; which are all
   4000      discussed above.
   4001 
   4002  -- User Option: magit-ediff-dwim-show-on-hunks
   4003      This option controls what command ‘magit-ediff-dwim’ calls when
   4004      point is on uncommitted hunks.  When nil, always run
   4005      ‘magit-ediff-stage’.  Otherwise, use ‘magit-ediff-show-staged’ and
   4006      ‘magit-ediff-show-unstaged’ to show staged and unstaged changes,
   4007      respectively.
   4008 
   4009  -- User Option: magit-ediff-show-stash-with-index
   4010      This option controls whether ‘magit-ediff-show-stash’ includes a
   4011      buffer containing the file’s state in the index at the time the
   4012      stash was created.  This makes it possible to tell which changes in
   4013      the stash were staged.
   4014 
   4015  -- User Option: magit-ediff-quit-hook
   4016      This hook is run after quitting an Ediff session that was created
   4017      using a Magit command.  The hook functions are run inside the Ediff
   4018      control buffer, and should not change the current buffer.
   4019 
   4020      This is similar to ‘ediff-quit-hook’ but takes the needs of Magit
   4021      into account.  The regular ‘ediff-quit-hook’ is ignored by Ediff
   4022      sessions that were created using a Magit command.
   4023 
   4024 
   4025 File: magit.info,  Node: References Buffer,  Next: Bisecting,  Prev: Ediffing,  Up: Inspecting
   4026 
   4027 5.6 References Buffer
   4028 =====================
   4029 
   4030 ‘y’ (‘magit-show-refs’)
   4031      This command lists branches and tags in a dedicated buffer.
   4032 
   4033      However if this command is invoked again from this buffer or if it
   4034      is invoked with a prefix argument, then it acts as a transient
   4035      prefix command, which binds the following suffix commands and some
   4036      infix arguments.
   4037 
   4038    All of the following suffix commands list exactly the same branches
   4039 and tags.  The only difference the optional feature that can be enabled
   4040 by changing the value of ‘magit-refs-show-commit-count’ (see below).
   4041 These commands specify a different branch or commit against which all
   4042 the other references are compared.
   4043 
   4044 ‘y y’ (‘magit-show-refs-head’)
   4045      This command lists branches and tags in a dedicated buffer.  Each
   4046      reference is being compared with ‘HEAD’.
   4047 
   4048 ‘y c’ (‘magit-show-refs-current’)
   4049      This command lists branches and tags in a dedicated buffer.  Each
   4050      reference is being compared with the current branch or ‘HEAD’ if it
   4051      is detached.
   4052 
   4053 ‘y o’ (‘magit-show-refs-other’)
   4054      This command lists branches and tags in a dedicated buffer.  Each
   4055      reference is being compared with a branch read from the user.
   4056 
   4057 ‘y r’ (‘magit-refs-set-show-commit-count’)
   4058      This command changes for which refs the commit count is shown.
   4059 
   4060  -- User Option: magit-refs-show-commit-count
   4061      Whether to show commit counts in Magit-Refs mode buffers.
   4062 
   4063         • ‘all’ Show counts for branches and tags.
   4064         • ‘branch’ Show counts for branches only.
   4065         • ‘nil’ Never show counts.
   4066 
   4067      The default is ‘nil’ because anything else can be very expensive.
   4068 
   4069  -- User Option: magit-refs-pad-commit-counts
   4070      Whether to pad all commit counts on all sides in Magit-Refs mode
   4071      buffers.
   4072 
   4073      If this is nil, then some commit counts are displayed right next to
   4074      one of the branches that appear next to the count, without any
   4075      space in between.  This might look bad if the branch name faces
   4076      look too similar to ‘magit-dimmed’.
   4077 
   4078      If this is non-nil, then spaces are placed on both sides of all
   4079      commit counts.
   4080 
   4081  -- User Option: magit-refs-show-remote-prefix
   4082      Whether to show the remote prefix in lists of remote branches.
   4083 
   4084      Showing the prefix is redundant because the name of the remote is
   4085      already shown in the heading preceding the list of its branches.
   4086 
   4087  -- User Option: magit-refs-primary-column-width
   4088      Width of the primary column in ‘magit-refs-mode’ buffers.  The
   4089      primary column is the column that contains the name of the branch
   4090      that the current row is about.
   4091 
   4092      If this is an integer, then the column is that many columns wide.
   4093      Otherwise it has to be a cons-cell of two integers.  The first
   4094      specifies the minimal width, the second the maximal width.  In that
   4095      case the actual width is determined using the length of the names
   4096      of the shown local branches.  (Remote branches and tags are not
   4097      taken into account when calculating to optimal width.)
   4098 
   4099  -- User Option: magit-refs-focus-column-width
   4100      Width of the focus column in ‘magit-refs-mode’ buffers.
   4101 
   4102      The focus column is the first column, which marks one branch
   4103      (usually the current branch) as the focused branch using ‘*’ or
   4104      ‘@’.  For each other reference, this column optionally shows how
   4105      many commits it is ahead of the focused branch and ‘<’, or if it
   4106      isn’t ahead then the commits it is behind and ‘>’, or if it isn’t
   4107      behind either, then a ‘=’.
   4108 
   4109      This column may also display only ‘*’ or ‘@’ for the focused
   4110      branch, in which case this option is ignored.  Use ‘L v’ to change
   4111      the verbosity of this column.
   4112 
   4113  -- User Option: magit-refs-margin
   4114      This option specifies whether the margin is initially shown in
   4115      Magit-Refs mode buffers and how it is formatted.
   4116 
   4117      The value has the form ‘(INIT STYLE WIDTH AUTHOR AUTHOR-WIDTH)’.
   4118 
   4119         • If INIT is non-nil, then the margin is shown initially.
   4120         • STYLE controls how to format the author or committer date.  It
   4121           can be one of ‘age’ (to show the age of the commit),
   4122           ‘age-abbreviated’ (to abbreviate the time unit to a
   4123           character), or a string (suitable for ‘format-time-string’) to
   4124           show the actual date.  Option
   4125           ‘magit-log-margin-show-committer-date’ controls which date is
   4126           being displayed.
   4127         • WIDTH controls the width of the margin.  This exists for
   4128           forward compatibility and currently the value should not be
   4129           changed.
   4130         • AUTHOR controls whether the name of the author is also shown
   4131           by default.
   4132         • AUTHOR-WIDTH has to be an integer.  When the name of the
   4133           author is shown, then this specifies how much space is used to
   4134           do so.
   4135 
   4136  -- User Option: magit-refs-margin-for-tags
   4137      This option specifies whether to show information about tags in the
   4138      margin.  This is disabled by default because it is slow if there
   4139      are many tags.
   4140 
   4141    The following variables control how individual refs are displayed.
   4142 If you change one of these variables (especially the "%c" part), then
   4143 you should also change the others to keep things aligned.  The following
   4144 %-sequences are supported:
   4145 
   4146    • ‘%a’ Number of commits this ref has over the one we compare to.
   4147    • ‘%b’ Number of commits the ref we compare to has over this one.
   4148    • ‘%c’ Number of commits this ref has over the one we compare to.
   4149      For the ref which all other refs are compared this is instead "@",
   4150      if it is the current branch, or "#" otherwise.
   4151    • ‘%C’ For the ref which all other refs are compared this is "@", if
   4152      it is the current branch, or "#" otherwise.  For all other refs "
   4153      ".
   4154    • ‘%h’ Hash of this ref’s tip.
   4155    • ‘%m’ Commit summary of the tip of this ref.
   4156    • ‘%n’ Name of this ref.
   4157    • ‘%u’ Upstream of this local branch.
   4158    • ‘%U’ Upstream of this local branch and additional local vs.
   4159      upstream information.
   4160 
   4161  -- User Option: magit-refs-filter-alist
   4162      The purpose of this option is to forgo displaying certain refs
   4163      based on their name.  If you want to not display any refs of a
   4164      certain type, then you should remove the appropriate function from
   4165      ‘magit-refs-sections-hook’ instead.
   4166 
   4167      This alist controls which tags and branches are omitted from being
   4168      displayed in ‘magit-refs-mode’ buffers.  If it is ‘nil’, then all
   4169      refs are displayed (subject to ‘magit-refs-sections-hook’).
   4170 
   4171      All keys are tried in order until one matches.  Then its value is
   4172      used and subsequent elements are ignored.  If the value is non-nil,
   4173      then the reference is displayed, otherwise it is not.  If no
   4174      element matches, then the reference is displayed.
   4175 
   4176      A key can either be a regular expression that the refname has to
   4177      match, or a function that takes the refname as only argument and
   4178      returns a boolean.  A remote branch such as "origin/master" is
   4179      displayed as just "master", however for this comparison the former
   4180      is used.
   4181 
   4182 ‘<RET>’ (‘magit-visit-ref’)
   4183      This command visits the reference or revision at point in another
   4184      buffer.  If there is no revision at point or with a prefix argument
   4185      then it prompts for a revision.
   4186 
   4187      This command behaves just like ‘magit-show-commit’ as described
   4188      above, except if point is on a reference in a ‘magit-refs-mode’
   4189      buffer, in which case the behavior may be different, but only if
   4190      you have customized the option ‘magit-visit-ref-behavior’.
   4191 
   4192  -- User Option: magit-visit-ref-behavior
   4193      This option controls how ‘magit-visit-ref’ behaves in
   4194      ‘magit-refs-mode’ buffers.
   4195 
   4196      By default ‘magit-visit-ref’ behaves like ‘magit-show-commit’, in
   4197      all buffers, including ‘magit-refs-mode’ buffers.  When the type of
   4198      the section at point is ‘commit’ then "RET" is bound to
   4199      ‘magit-show-commit’, and when the type is either ‘branch’ or ‘tag’
   4200      then it is bound to ‘magit-visit-ref’.
   4201 
   4202      "RET" is one of Magit’s most essential keys and at least by default
   4203      it should behave consistently across all of Magit, especially
   4204      because users quickly learn that it does something very harmless;
   4205      it shows more information about the thing at point in another
   4206      buffer.
   4207 
   4208      However "RET" used to behave differently in ‘magit-refs-mode’
   4209      buffers, doing surprising things, some of which cannot really be
   4210      described as "visit this thing".  If you’ve grown accustomed this
   4211      behavior, you can restore it by adding one or more of the below
   4212      symbols to the value of this option.  But keep in mind that by
   4213      doing so you don’t only introduce inconsistencies, you also lose
   4214      some functionality and might have to resort to ‘M-x
   4215      magit-show-commit’ to get it back.
   4216 
   4217      ‘magit-visit-ref’ looks for these symbols in the order in which
   4218      they are described here.  If the presence of a symbol applies to
   4219      the current situation, then the symbols that follow do not affect
   4220      the outcome.
   4221 
   4222         • ‘focus-on-ref’
   4223 
   4224           With a prefix argument update the buffer to show commit counts
   4225           and lists of cherry commits relative to the reference at point
   4226           instead of relative to the current buffer or ‘HEAD’.
   4227 
   4228           Instead of adding this symbol, consider pressing "C-u y o
   4229           RET".
   4230 
   4231         • ‘create-branch’
   4232 
   4233           If point is on a remote branch, then create a new local branch
   4234           with the same name, use the remote branch as its upstream, and
   4235           then check out the local branch.
   4236 
   4237           Instead of adding this symbol, consider pressing "b c RET
   4238           RET", like you would do in other buffers.
   4239 
   4240         • ‘checkout-any’
   4241 
   4242           Check out the reference at point.  If that reference is a tag
   4243           or a remote branch, then this results in a detached ‘HEAD’.
   4244 
   4245           Instead of adding this symbol, consider pressing "b b RET",
   4246           like you would do in other buffers.
   4247 
   4248         • ‘checkout-branch’
   4249 
   4250           Check out the local branch at point.
   4251 
   4252           Instead of adding this symbol, consider pressing "b b RET",
   4253           like you would do in other buffers.
   4254 
   4255 * Menu:
   4256 
   4257 * References Sections::
   4258 
   4259 
   4260 File: magit.info,  Node: References Sections,  Up: References Buffer
   4261 
   4262 5.6.1 References Sections
   4263 -------------------------
   4264 
   4265 The contents of references buffers is controlled using the hook
   4266 ‘magit-refs-sections-hook’.  See *note Section Hooks:: to learn about
   4267 such hooks and how to customize them.  All of the below functions are
   4268 members of the default value.  Note that it makes much less sense to
   4269 customize this hook than it does for the respective hook used for the
   4270 status buffer.
   4271 
   4272  -- User Option: magit-refs-sections-hook
   4273      Hook run to insert sections into a references buffer.
   4274 
   4275  -- Function: magit-insert-local-branches
   4276      Insert sections showing all local branches.
   4277 
   4278  -- Function: magit-insert-remote-branches
   4279      Insert sections showing all remote-tracking branches.
   4280 
   4281  -- Function: magit-insert-tags
   4282      Insert sections showing all tags.
   4283 
   4284 
   4285 File: magit.info,  Node: Bisecting,  Next: Visiting Files and Blobs,  Prev: References Buffer,  Up: Inspecting
   4286 
   4287 5.7 Bisecting
   4288 =============
   4289 
   4290 Also see *note (gitman)git-bisect::.
   4291 
   4292 ‘B’ (‘magit-bisect’)
   4293      This transient prefix command binds the following suffix commands
   4294      and displays them in a temporary buffer until a suffix is invoked.
   4295 
   4296    When bisecting is not in progress, then the transient features the
   4297 following suffix commands.
   4298 
   4299 ‘B B’ (‘magit-bisect-start’)
   4300      Start a bisect session.
   4301 
   4302      Bisecting a bug means to find the commit that introduced it.  This
   4303      command starts such a bisect session by asking for a known good
   4304      commit and a known bad commit.  If you’re bisecting a change that
   4305      isn’t a regression, you can select alternate terms that are
   4306      conceptually more fitting than "bad" and "good", but the infix
   4307      arguments to do so are disabled by default.
   4308 
   4309 ‘B s’ (‘magit-bisect-run’)
   4310      Bisect automatically by running commands after each step.
   4311 
   4312    When bisecting in progress, then the transient instead features the
   4313 following suffix commands.
   4314 
   4315 ‘B b’ (‘magit-bisect-bad’)
   4316      Mark the current commit as bad.  Use this after you have asserted
   4317      that the commit does contain the bug in question.
   4318 
   4319 ‘B g’ (‘magit-bisect-good’)
   4320      Mark the current commit as good.  Use this after you have asserted
   4321      that the commit does not contain the bug in question.
   4322 
   4323 ‘B m’ (‘magit-bisect-mark’)
   4324      Mark the current commit with one of the bisect terms.  This command
   4325      provides an alternative to ‘magit-bisect-bad’ and
   4326      ‘magit-bisect-good’ and is useful when using terms other than "bad"
   4327      and "good".  This suffix is disabled by default.
   4328 
   4329 ‘B k’ (‘magit-bisect-skip’)
   4330      Skip the current commit.  Use this if for some reason the current
   4331      commit is not a good one to test.  This command lets Git choose a
   4332      different one.
   4333 
   4334 ‘B r’ (‘magit-bisect-reset’)
   4335      After bisecting, cleanup bisection state and return to original
   4336      ‘HEAD’.
   4337 
   4338    By default the status buffer shows information about the ongoing
   4339 bisect session.
   4340 
   4341  -- User Option: magit-bisect-show-graph
   4342      This option controls whether a graph is displayed for the log of
   4343      commits that still have to be bisected.
   4344 
   4345 
   4346 File: magit.info,  Node: Visiting Files and Blobs,  Next: Blaming,  Prev: Bisecting,  Up: Inspecting
   4347 
   4348 5.8 Visiting Files and Blobs
   4349 ============================
   4350 
   4351 Magit provides several commands that visit a file or blob (the version
   4352 of a file that is stored in a certain commit).  Actually it provides
   4353 several *groups* of such commands and the several *variants* within each
   4354 group.
   4355 
   4356    Also see *note Commands for Buffers Visiting Files::.
   4357 
   4358 * Menu:
   4359 
   4360 * General-Purpose Visit Commands::
   4361 * Visiting Files and Blobs from a Diff::
   4362 
   4363 
   4364 File: magit.info,  Node: General-Purpose Visit Commands,  Next: Visiting Files and Blobs from a Diff,  Up: Visiting Files and Blobs
   4365 
   4366 5.8.1 General-Purpose Visit Commands
   4367 ------------------------------------
   4368 
   4369 These commands can be used anywhere to open any blob.  Currently no keys
   4370 are bound to these commands by default, but that is likely to change.
   4371 
   4372  -- Command: magit-find-file
   4373      This command reads a filename and revision from the user and visits
   4374      the respective blob in a buffer.  The buffer is displayed in the
   4375      selected window.
   4376 
   4377  -- Command: magit-find-file-other-window
   4378      This command reads a filename and revision from the user and visits
   4379      the respective blob in a buffer.  The buffer is displayed in
   4380      another window.
   4381 
   4382  -- Command: magit-find-file-other-frame
   4383      This command reads a filename and revision from the user and visits
   4384      the respective blob in a buffer.  The buffer is displayed in
   4385      another frame.
   4386 
   4387 
   4388 File: magit.info,  Node: Visiting Files and Blobs from a Diff,  Prev: General-Purpose Visit Commands,  Up: Visiting Files and Blobs
   4389 
   4390 5.8.2 Visiting Files and Blobs from a Diff
   4391 ------------------------------------------
   4392 
   4393 These commands can only be used when point is inside a diff.
   4394 
   4395 ‘<RET>’ (‘magit-diff-visit-file’)
   4396      This command visits the appropriate version of the file that the
   4397      diff at point is about.
   4398 
   4399      This commands visits the worktree version of the appropriate file.
   4400      The location of point inside the diff determines which file is
   4401      being visited.  The visited version depends on what changes the
   4402      diff is about.
   4403 
   4404        1. If the diff shows uncommitted changes (i.e., staged or
   4405           unstaged changes), then visit the file in the working tree
   4406           (i.e., the same "real" file that ‘find-file’ would visit.  In
   4407           all other cases visit a "blob" (i.e., the version of a file as
   4408           stored in some commit).
   4409 
   4410        2. If point is on a removed line, then visit the blob for the
   4411           first parent of the commit that removed that line, i.e., the
   4412           last commit where that line still exists.
   4413 
   4414        3. If point is on an added or context line, then visit the blob
   4415           that adds that line, or if the diff shows from more than a
   4416           single commit, then visit the blob from the last of these
   4417           commits.
   4418 
   4419      In the file-visiting buffer this command goes to the line that
   4420      corresponds to the line that point is on in the diff.
   4421 
   4422      The buffer is displayed in the selected window.  With a prefix
   4423      argument the buffer is displayed in another window instead.
   4424 
   4425  -- User Option: magit-diff-visit-previous-blob
   4426      This option controls whether ‘magit-diff-visit-file’ may visit the
   4427      previous blob.  When this is ‘t’ (the default) and point is on a
   4428      removed line in a diff for a committed change, then
   4429      ‘magit-diff-visit-file’ visits the blob from the last revision
   4430      which still had that line.
   4431 
   4432      Currently this is only supported for committed changes, for staged
   4433      and unstaged changes ‘magit-diff-visit-file’ always visits the file
   4434      in the working tree.
   4435 
   4436 ‘C-<return>’ (‘magit-diff-visit-file-worktree’)
   4437      This command visits the worktree version of the appropriate file.
   4438      The location of point inside the diff determines which file is
   4439      being visited.  Unlike ‘magit-diff-visit-file’ it always visits the
   4440      "real" file in the working tree, i.e the "current version" of the
   4441      file.
   4442 
   4443      In the file-visiting buffer this command goes to the line that
   4444      corresponds to the line that point is on in the diff.  Lines that
   4445      were added or removed in the working tree, the index and other
   4446      commits in between are automatically accounted for.
   4447 
   4448      The buffer is displayed in the selected window.  With a prefix
   4449      argument the buffer is displayed in another window instead.
   4450 
   4451    Variants of the above two commands exist that instead visit the file
   4452 in another window or in another frame.  If you prefer such behavior,
   4453 then you may want to change the above key bindings, but note that the
   4454 above commands also use another window when invoked with a prefix
   4455 argument.
   4456 
   4457  -- Command: magit-diff-visit-file-other-window
   4458  -- Command: magit-diff-visit-file-other-frame
   4459  -- Command: magit-diff-visit-worktree-file-other-window
   4460  -- Command: magit-diff-visit-worktree-file-other-frame
   4461 
   4462 
   4463 File: magit.info,  Node: Blaming,  Prev: Visiting Files and Blobs,  Up: Inspecting
   4464 
   4465 5.9 Blaming
   4466 ===========
   4467 
   4468 Also see *note (gitman)git-blame::.
   4469 
   4470    To start blaming, invoke the ‘magit-file-dispatch’ transient prefix
   4471 command.  When using the default key bindings, that can be done by
   4472 pressing ‘C-c M-g’.  When using the recommended bindings, this command
   4473 is instead bound to ‘C-c f’.  Also see *note Global Bindings::.
   4474 
   4475    The blaming suffix commands can be invoked directly from the file
   4476 dispatch transient.  However if you want to set an infix argument, then
   4477 you have to enter the blaming sub-prefix first.
   4478 
   4479 ‘C-c f B’ (‘magit-blame’)
   4480 ‘C-c f b’ (‘magit-blame-addition’)
   4481 ‘C-c f B b’
   4482 ‘C-c f r’ (‘magit-blame-removal’)
   4483 ‘C-c f B r’
   4484 ‘C-c f f’ (‘magit-blame-reverse’)
   4485 ‘C-c f B f’
   4486 ‘C-c f e’ (‘magit-blame-echo’)
   4487 ‘C-c f B e’
   4488 ‘C-c f q’ (‘magit-blame-quit’)
   4489 ‘C-c f B q’
   4490      Each of these commands is documented individually right below,
   4491      alongside their default key bindings.  The bindings shown above are
   4492      the recommended bindings, which you can enable by following the
   4493      instructions in *note Global Bindings::.
   4494 
   4495 ‘C-c M-g B’ (‘magit-blame’)
   4496      This transient prefix command binds the following suffix commands
   4497      along with the appropriate infix arguments and displays them in a
   4498      temporary buffer until a suffix is invoked.
   4499 
   4500    Note that not all of the following suffixes are available at all
   4501 times.  For example if ‘magit-blame-mode’ is not enabled, then the
   4502 command whose purpose is to turn off that mode would not be of any use
   4503 and therefore isn’t available.
   4504 
   4505 ‘C-c M-g b’ (‘magit-blame-addition’)
   4506 ‘C-c M-g B b’
   4507      This command augments each line or chunk of lines in the current
   4508      file-visiting or blob-visiting buffer with information about what
   4509      commits last touched these lines.
   4510 
   4511      If the buffer visits a revision of that file, then history up to
   4512      that revision is considered.  Otherwise, the file’s full history is
   4513      considered, including uncommitted changes.
   4514 
   4515      If Magit-Blame mode is already turned on in the current buffer then
   4516      blaming is done recursively, by visiting REVISION:FILE (using
   4517      ‘magit-find-file’), where REVISION is a parent of the revision that
   4518      added the current line or chunk of lines.
   4519 
   4520 ‘C-c M-g r’ (‘magit-blame-removal’)
   4521 ‘C-c M-g B r’
   4522      This command augments each line or chunk of lines in the current
   4523      blob-visiting buffer with information about the revision that
   4524      removes it.  It cannot be used in file-visiting buffers.
   4525 
   4526      Like ‘magit-blame-addition’, this command can be used recursively.
   4527 
   4528 ‘C-c M-g f’ (‘magit-blame-reverse’)
   4529 ‘C-c M-g B f’
   4530      This command augments each line or chunk of lines in the current
   4531      file-visiting or blob-visiting buffer with information about the
   4532      last revision in which a line still existed.
   4533 
   4534      Like ‘magit-blame-addition’, this command can be used recursively.
   4535 
   4536 ‘C-c M-g e’ (‘magit-blame-echo’)
   4537 ‘C-c M-g B e’
   4538      This command is like ‘magit-blame-addition’ except that it doesn’t
   4539      turn on ‘read-only-mode’ and that it initially uses the
   4540      visualization style specified by option ‘magit-blame-echo-style’.
   4541 
   4542    The following key bindings are available when Magit-Blame mode is
   4543 enabled and Read-Only mode is not enabled.  These commands are also
   4544 available in other buffers; here only the behavior is described that is
   4545 relevant in file-visiting buffers that are being blamed.
   4546 
   4547 ‘C-c M-g q’ (‘magit-blame-quit’)
   4548 ‘C-c M-g B q’
   4549      This command turns off Magit-Blame mode.  If the buffer was created
   4550      during a recursive blame, then it also kills the buffer.
   4551 
   4552 ‘<RET>’ (‘magit-show-commit’)
   4553      This command shows the commit that last touched the line at point.
   4554 
   4555 ‘<SPC>’ (‘magit-diff-show-or-scroll-up’)
   4556      This command updates the commit buffer.
   4557 
   4558      This either shows the commit that last touched the line at point in
   4559      the appropriate buffer, or if that buffer is already being
   4560      displayed in the current frame and if that buffer contains
   4561      information about that commit, then the buffer is scrolled up
   4562      instead.
   4563 
   4564 ‘<DEL>’ (‘magit-diff-show-or-scroll-down’)
   4565      This command updates the commit buffer.
   4566 
   4567      This either shows the commit that last touched the line at point in
   4568      the appropriate buffer, or if that buffer is already being
   4569      displayed in the current frame and if that buffer contains
   4570      information about that commit, then the buffer is scrolled down
   4571      instead.
   4572 
   4573    The following key bindings are available when both Magit-Blame mode
   4574 and Read-Only mode are enabled.
   4575 
   4576 ‘b’ (‘magit-blame’)
   4577      See above.
   4578 
   4579 ‘n’ (‘magit-blame-next-chunk’)
   4580      This command moves to the next chunk.
   4581 
   4582 ‘N’ (‘magit-blame-next-chunk-same-commit’)
   4583      This command moves to the next chunk from the same commit.
   4584 
   4585 ‘p’ (‘magit-blame-previous-chunk’)
   4586      This command moves to the previous chunk.
   4587 
   4588 ‘P’ (‘magit-blame-previous-chunk-same-commit’)
   4589      This command moves to the previous chunk from the same commit.
   4590 
   4591 ‘q’ (‘magit-blame-quit’)
   4592      This command turns off Magit-Blame mode.  If the buffer was created
   4593      during a recursive blame, then it also kills the buffer.
   4594 
   4595 ‘M-w’ (‘magit-blame-copy-hash’)
   4596      This command saves the hash of the current chunk’s commit to the
   4597      kill ring.
   4598 
   4599      When the region is active, the command saves the region’s content
   4600      instead of the hash, like ‘kill-ring-save’ would.
   4601 
   4602 ‘c’ (‘magit-blame-cycle-style’)
   4603      This command changes how blame information is visualized in the
   4604      current buffer by cycling through the styles specified using the
   4605      option ‘magit-blame-styles’.
   4606 
   4607    Blaming is also controlled using the following options.
   4608 
   4609  -- User Option: magit-blame-styles
   4610      This option defines a list of styles used to visualize blame
   4611      information.  For now see its doc-string to learn more.
   4612 
   4613  -- User Option: magit-blame-echo-style
   4614      This option specifies the blame visualization style used by the
   4615      command ‘magit-blame-echo’.  This must be a symbol that is used as
   4616      the identifier for one of the styles defined in
   4617      ‘magit-blame-styles’.
   4618 
   4619  -- User Option: magit-blame-time-format
   4620      This option specifies the format string used to display times when
   4621      showing blame information.
   4622 
   4623  -- User Option: magit-blame-read-only
   4624      This option controls whether blaming a buffer also makes
   4625      temporarily read-only.
   4626 
   4627  -- User Option: magit-blame-disable-modes
   4628      This option lists incompatible minor-modes that should be disabled
   4629      temporarily when a buffer contains blame information.  They are
   4630      enabled again when the buffer no longer shows blame information.
   4631 
   4632  -- User Option: magit-blame-goto-chunk-hook
   4633      This hook is run when moving between chunks.
   4634 
   4635 
   4636 File: magit.info,  Node: Manipulating,  Next: Transferring,  Prev: Inspecting,  Up: Top
   4637 
   4638 6 Manipulating
   4639 **************
   4640 
   4641 * Menu:
   4642 
   4643 * Creating Repository::
   4644 * Cloning Repository::
   4645 * Staging and Unstaging::
   4646 * Applying::
   4647 * Committing::
   4648 * Branching::
   4649 * Merging::
   4650 * Resolving Conflicts::
   4651 * Rebasing::
   4652 * Cherry Picking::
   4653 * Resetting::
   4654 * Stashing::
   4655 
   4656 
   4657 File: magit.info,  Node: Creating Repository,  Next: Cloning Repository,  Up: Manipulating
   4658 
   4659 6.1 Creating Repository
   4660 =======================
   4661 
   4662 ‘I’ (‘magit-init’)
   4663      This command initializes a repository and then shows the status
   4664      buffer for the new repository.
   4665 
   4666      If the directory is below an existing repository, then the user has
   4667      to confirm that a new one should be created inside.  If the
   4668      directory is the root of the existing repository, then the user has
   4669      to confirm that it should be reinitialized.
   4670 
   4671 
   4672 File: magit.info,  Node: Cloning Repository,  Next: Staging and Unstaging,  Prev: Creating Repository,  Up: Manipulating
   4673 
   4674 6.2 Cloning Repository
   4675 ======================
   4676 
   4677 To clone a remote or local repository use ‘C’, which is bound to the
   4678 command ‘magit-clone’.  This command either act as a transient prefix
   4679 command, which binds several infix arguments and suffix commands, or it
   4680 can invoke ‘git clone’ directly, depending on whether a prefix argument
   4681 is used and on the value of ‘magit-clone-always-transient’.
   4682 
   4683  -- User Option: magit-clone-always-transient
   4684      This option controls whether the command ‘magit-clone’ always acts
   4685      as a transient prefix command, regardless of whether a prefix
   4686      argument is used or not.  If ‘t’, then that command always acts as
   4687      a transient prefix.  If ‘nil’, then a prefix argument has to be
   4688      used for it to act as a transient.
   4689 
   4690 ‘C’ (‘magit-clone’)
   4691      This command either acts as a transient prefix command as described
   4692      above or does the same thing as ‘transient-clone-regular’ as
   4693      described below.
   4694 
   4695      If it acts as a transient prefix, then it binds the following
   4696      suffix commands and several infix arguments.
   4697 
   4698 ‘C C’ (‘magit-clone-regular’)
   4699      This command creates a regular clone of an existing repository.
   4700      The repository and the target directory are read from the user.
   4701 
   4702 ‘C s’ (‘magit-clone-shallow’)
   4703      This command creates a shallow clone of an existing repository.
   4704      The repository and the target directory are read from the user.  By
   4705      default the depth of the cloned history is a single commit, but
   4706      with a prefix argument the depth is read from the user.
   4707 
   4708 ‘C >’ (‘magit-clone-sparse’)
   4709      This command creates a clone of an existing repository and
   4710      initializes a sparse checkout, avoiding a checkout of the full
   4711      working tree.  To add more directories, use the
   4712      ‘magit-sparse-checkout’ transient (see *note Sparse checkouts::).
   4713 
   4714 ‘C b’ (‘magit-clone-bare’)
   4715      This command creates a bare clone of an existing repository.  The
   4716      repository and the target directory are read from the user.
   4717 
   4718 ‘C m’ (‘magit-clone-mirror’)
   4719      This command creates a mirror of an existing repository.  The
   4720      repository and the target directory are read from the user.
   4721 
   4722    The following suffixes are disabled by default.  See *note
   4723 (transient)Enabling and Disabling Suffixes:: for how to enable them.
   4724 
   4725 ‘C d’ (‘magit-clone-shallow-since’)
   4726      This command creates a shallow clone of an existing repository.
   4727      Only commits that were committed after a date are cloned, which is
   4728      read from the user.  The repository and the target directory are
   4729      also read from the user.
   4730 
   4731 ‘C e’ (‘magit-clone-shallow-exclude’)
   4732      This command creates a shallow clone of an existing repository.
   4733      This reads a branch or tag from the user.  Commits that are
   4734      reachable from that are not cloned.  The repository and the target
   4735      directory are also read from the user.
   4736 
   4737  -- User Option: magit-clone-set-remote-head
   4738      This option controls whether cloning causes the reference
   4739      ‘refs/remotes/<remote>/HEAD’ to be created in the clone.  The
   4740      default is to delete the reference after running ‘git clone’, which
   4741      insists on creating it.  This is because the reference has not been
   4742      found to be particularly useful as it is not automatically updated
   4743      when the ‘HEAD’ of the remote changes.  Setting this option to ‘t’
   4744      preserves Git’s default behavior of creating the reference.
   4745 
   4746  -- User Option: magit-clone-set-remote.pushDefault
   4747      This option controls whether the value of the Git variable
   4748      ‘remote.pushDefault’ is set after cloning.
   4749 
   4750         • If ‘t’, then it is always set without asking.
   4751         • If ‘ask’, then the users are asked every time they clone a
   4752           repository.
   4753         • If ‘nil’, then it is never set.
   4754 
   4755  -- User Option: magit-clone-default-directory
   4756      This option control the default directory name used when reading
   4757      the destination for a cloning operation.
   4758 
   4759         • If ‘nil’ (the default), then the value of ‘default-directory’
   4760           is used.
   4761         • If a directory, then that is used.
   4762         • If a function, then that is called with the remote url as the
   4763           only argument and the returned value is used.
   4764 
   4765  -- User Option: magit-clone-name-alist
   4766      This option maps regular expressions, which match repository names,
   4767      to repository urls, making it possible for users to enter short
   4768      names instead of urls when cloning repositories.
   4769 
   4770      Each element has the form ‘(REGEXP HOSTNAME USER)’.  When the user
   4771      enters a name when a cloning command asks for a name or url, then
   4772      that is looked up in this list.  The first element whose REGEXP
   4773      matches is used.
   4774 
   4775      The format specified by option ‘magit-clone-url-format’ is used to
   4776      turn the name into an url, using HOSTNAME and the repository name.
   4777      If the provided name contains a slash, then that is used.
   4778      Otherwise if the name omits the owner of the repository, then the
   4779      default user specified in the matched entry is used.
   4780 
   4781      If USER contains a dot, then it is treated as a Git variable and
   4782      the value of that is used as the username.  Otherwise it is used as
   4783      the username itself.
   4784 
   4785  -- User Option: magit-clone-url-format
   4786      The format specified by this option is used when turning repository
   4787      names into urls.  ‘%h’ is the hostname and ‘%n’ is the repository
   4788      name, including the name of the owner.  The value can be a string
   4789      (representing a single static format) or an alist with elements
   4790      ‘(HOSTNAME . FORMAT)’ mapping hostnames to formats.  When an alist
   4791      is used, the ‘t’ key represents the default format.
   4792 
   4793      Example of a single format string:
   4794 
   4795           (setq magit-clone-url-format
   4796                 "git@%h:%n.git")
   4797 
   4798      Example of by-hostname format strings:
   4799 
   4800           (setq magit-clone-url-format
   4801                 '(("git.example.com" . "git@%h:~%n")
   4802                   (nil . "git@%h:%n.git")))
   4803 
   4804  -- User Option: magit-post-clone-hook
   4805      Hook run after the Git process has successfully finished cloning
   4806      the repository.  When the hook is called, ‘default-directory’ is
   4807      let-bound to the directory where the repository has been cloned.
   4808 
   4809 
   4810 File: magit.info,  Node: Staging and Unstaging,  Next: Applying,  Prev: Cloning Repository,  Up: Manipulating
   4811 
   4812 6.3 Staging and Unstaging
   4813 =========================
   4814 
   4815 Like Git, Magit can of course stage and unstage complete files.  Unlike
   4816 Git, it also allows users to gracefully un-/stage individual hunks and
   4817 even just part of a hunk.  To stage individual hunks and parts of hunks
   4818 using Git directly, one has to use the very modal and rather clumsy
   4819 interface of a ‘git add --interactive’ session.
   4820 
   4821    With Magit, on the other hand, one can un-/stage individual hunks by
   4822 just moving point into the respective section inside a diff displayed in
   4823 the status buffer or a separate diff buffer and typing ‘s’ or ‘u’.  To
   4824 operate on just parts of a hunk, mark the changes that should be
   4825 un-/staged using the region and then press the same key that would be
   4826 used to un-/stage.  To stage multiple files or hunks at once use a
   4827 region that starts inside the heading of such a section and ends inside
   4828 the heading of a sibling section of the same type.
   4829 
   4830    Besides staging and unstaging, Magit also provides several other
   4831 "apply variants" that can also operate on a file, multiple files at
   4832 once, a hunk, multiple hunks at once, and on parts of a hunk.  These
   4833 apply variants are described in the next section.
   4834 
   4835    You can also use Ediff to stage and unstage.  See *note Ediffing::.
   4836 
   4837 ‘s’ (‘magit-stage’)
   4838      Add the change at point to the staging area.
   4839 
   4840      With a prefix argument and an untracked file (or files) at point,
   4841      stage the file but not its content.  This makes it possible to
   4842      stage only a subset of the new file’s changes.
   4843 
   4844 ‘S’ (‘magit-stage-modified’)
   4845      Stage all changes to files modified in the worktree.  Stage all new
   4846      content of tracked files and remove tracked files that no longer
   4847      exist in the working tree from the index also.  With a prefix
   4848      argument also stage previously untracked (but not ignored) files.
   4849 
   4850 ‘u’ (‘magit-unstage’)
   4851      Remove the change at point from the staging area.
   4852 
   4853      Only staged changes can be unstaged.  But by default this command
   4854      performs an action that is somewhat similar to unstaging, when it
   4855      is called on a committed change: it reverses the change in the
   4856      index but not in the working tree.
   4857 
   4858 ‘U’ (‘magit-unstage-all’)
   4859      Remove all changes from the staging area.
   4860 
   4861  -- User Option: magit-unstage-committed
   4862      This option controls whether ‘magit-unstage’ "unstages" committed
   4863      changes by reversing them in the index but not the working tree.
   4864      The alternative is to raise an error.
   4865 
   4866 ‘M-x magit-reverse-in-index’
   4867      This command reverses the committed change at point in the index
   4868      but not the working tree.  By default no key is bound directly to
   4869      this command, but it is indirectly called when ‘u’
   4870      (‘magit-unstage’) is pressed on a committed change.
   4871 
   4872      This allows extracting a change from ‘HEAD’, while leaving it in
   4873      the working tree, so that it can later be committed using a
   4874      separate commit.  A typical workflow would be:
   4875 
   4876        1. Optionally make sure that there are no uncommitted changes.
   4877        2. Visit the ‘HEAD’ commit and navigate to the change that should
   4878           not have been included in that commit.
   4879        3. Type ‘u’ (‘magit-unstage’) to reverse it in the index.  This
   4880           assumes that ‘magit-unstage-committed-changes’ is non-nil.
   4881        4. Type ‘c e’ to extend ‘HEAD’ with the staged changes, including
   4882           those that were already staged before.
   4883        5. Optionally stage the remaining changes using ‘s’ or ‘S’ and
   4884           then type ‘c c’ to create a new commit.
   4885 
   4886 ‘M-x magit-reset-index’
   4887      Reset the index to some commit.  The commit is read from the user
   4888      and defaults to the commit at point.  If there is no commit at
   4889      point, then it defaults to ‘HEAD’.
   4890 
   4891 * Menu:
   4892 
   4893 * Staging from File-Visiting Buffers::
   4894 
   4895 
   4896 File: magit.info,  Node: Staging from File-Visiting Buffers,  Up: Staging and Unstaging
   4897 
   4898 6.3.1 Staging from File-Visiting Buffers
   4899 ----------------------------------------
   4900 
   4901 Fine-grained un-/staging has to be done from the status or a diff
   4902 buffer, but it’s also possible to un-/stage all changes made to the file
   4903 visited in the current buffer right from inside that buffer.
   4904 
   4905 ‘M-x magit-stage-file’
   4906      When invoked inside a file-visiting buffer, then stage all changes
   4907      to that file.  In a Magit buffer, stage the file at point if any.
   4908      Otherwise prompt for a file to be staged.  With a prefix argument
   4909      always prompt the user for a file, even in a file-visiting buffer
   4910      or when there is a file section at point.
   4911 
   4912 ‘M-x magit-unstage-file’
   4913      When invoked inside a file-visiting buffer, then unstage all
   4914      changes to that file.  In a Magit buffer, unstage the file at point
   4915      if any.  Otherwise prompt for a file to be unstaged.  With a prefix
   4916      argument always prompt the user for a file, even in a file-visiting
   4917      buffer or when there is a file section at point.
   4918 
   4919 
   4920 File: magit.info,  Node: Applying,  Next: Committing,  Prev: Staging and Unstaging,  Up: Manipulating
   4921 
   4922 6.4 Applying
   4923 ============
   4924 
   4925 Magit provides several "apply variants": stage, unstage, discard,
   4926 reverse, and "regular apply".  At least when operating on a hunk they
   4927 are all implemented using ‘git apply’, which is why they are called
   4928 "apply variants".
   4929 
   4930    • Stage.  Apply a change from the working tree to the index.  The
   4931      change also remains in the working tree.
   4932 
   4933    • Unstage.  Remove a change from the index.  The change remains in
   4934      the working tree.
   4935 
   4936    • Discard.  On a staged change, remove it from the working tree and
   4937      the index.  On an unstaged change, remove it from the working tree
   4938      only.
   4939 
   4940    • Reverse.  Reverse a change in the working tree.  Both committed and
   4941      staged changes can be reversed.  Unstaged changes cannot be
   4942      reversed.  Discard them instead.
   4943 
   4944    • Apply.  Apply a change to the working tree.  Both committed and
   4945      staged changes can be applied.  Unstaged changes cannot be applied
   4946      - as they already have been applied.
   4947 
   4948    The previous section described the staging and unstaging commands.
   4949 What follows are the commands which implement the remaining apply
   4950 variants.
   4951 
   4952 ‘a’ (‘magit-apply’)
   4953      Apply the change at point to the working tree.
   4954 
   4955      With a prefix argument fallback to a 3-way merge.  Doing so causes
   4956      the change to be applied to the index as well.
   4957 
   4958 ‘k’ (‘magit-discard’)
   4959      Remove the change at point from the working tree.
   4960 
   4961      On a hunk or file with unresolved conflicts prompt which side to
   4962      keep (while discarding the other).  If point is within the text of
   4963      a side, then keep that side without prompting.
   4964 
   4965 ‘v’ (‘magit-reverse’)
   4966      Reverse the change at point in the working tree.
   4967 
   4968      With a prefix argument fallback to a 3-way merge.  Doing so causes
   4969      the change to be applied to the index as well.
   4970 
   4971    With a prefix argument all apply variants attempt a 3-way merge when
   4972 appropriate (i.e., when ‘git apply’ is used internally).
   4973 
   4974 
   4975 File: magit.info,  Node: Committing,  Next: Branching,  Prev: Applying,  Up: Manipulating
   4976 
   4977 6.5 Committing
   4978 ==============
   4979 
   4980 When the user initiates a commit, Magit calls ‘git commit’ without any
   4981 arguments, so Git has to get it from the user.  It creates the file
   4982 ‘.git/COMMIT_EDITMSG’ and then opens that file in an editor.  Magit
   4983 arranges for that editor to be the Emacsclient.  Once the user finishes
   4984 the editing session, the Emacsclient exits and Git creates the commit
   4985 using the file’s content as message.
   4986 
   4987 * Menu:
   4988 
   4989 * Initiating a Commit::
   4990 * Editing Commit Messages::
   4991 
   4992 
   4993 File: magit.info,  Node: Initiating a Commit,  Next: Editing Commit Messages,  Up: Committing
   4994 
   4995 6.5.1 Initiating a Commit
   4996 -------------------------
   4997 
   4998 Also see *note (gitman)git-commit::.
   4999 
   5000 ‘c’ (‘magit-commit’)
   5001      This transient prefix command binds the following suffix commands
   5002      along with the appropriate infix arguments and displays them in a
   5003      temporary buffer until a suffix is invoked.
   5004 
   5005 ‘c c’ (‘magit-commit-create’)
   5006      Create a new commit on ‘HEAD’.  With a prefix argument amend to the
   5007      commit at ‘HEAD’ instead.
   5008 
   5009 ‘c a’ (‘magit-commit-amend’)
   5010      Amend the last commit.
   5011 
   5012 ‘c e’ (‘magit-commit-extend’)
   5013      Amend the last commit, without editing the message.  With a prefix
   5014      argument keep the committer date, otherwise change it.  The option
   5015      ‘magit-commit-extend-override-date’ can be used to inverse the
   5016      meaning of the prefix argument.
   5017 
   5018      Non-interactively respect the optional OVERRIDE-DATE argument and
   5019      ignore the option.
   5020 
   5021 ‘c w’ (‘magit-commit-reword’)
   5022      Reword the last commit, ignoring staged changes.  With a prefix
   5023      argument keep the committer date, otherwise change it.  The option
   5024      ‘magit-commit-reword-override-date’ can be used to inverse the
   5025      meaning of the prefix argument.
   5026 
   5027      Non-interactively respect the optional OVERRIDE-DATE argument and
   5028      ignore the option.
   5029 
   5030 ‘c f’ (‘magit-commit-fixup’)
   5031      Create a fixup commit.
   5032 
   5033      With a prefix argument the target commit has to be confirmed.
   5034      Otherwise the commit at point may be used without confirmation
   5035      depending on the value of option ‘magit-commit-squash-confirm’.
   5036 
   5037 ‘c F’ (‘magit-commit-instant-fixup’)
   5038      Create a fixup commit and instantly rebase.
   5039 
   5040 ‘c s’ (‘magit-commit-squash’)
   5041      Create a squash commit, without editing the squash message.
   5042 
   5043      With a prefix argument the target commit has to be confirmed.
   5044      Otherwise the commit at point may be used without confirmation
   5045      depending on the value of option ‘magit-commit-squash-confirm’.
   5046 
   5047 ‘c S’ (‘magit-commit-instant-squash’)
   5048      Create a squash commit and instantly rebase.
   5049 
   5050 ‘c A’ (‘magit-commit-augment’)
   5051      Create a squash commit, editing the squash message.
   5052 
   5053      With a prefix argument the target commit has to be confirmed.
   5054      Otherwise the commit at point may be used without confirmation
   5055      depending on the value of option ‘magit-commit-squash-confirm’.
   5056 
   5057  -- User Option: magit-commit-ask-to-stage
   5058      Whether to ask to stage all unstaged changes when committing and
   5059      nothing is staged.
   5060 
   5061  -- User Option: magit-commit-show-diff
   5062      Whether the relevant diff is automatically shown when committing.
   5063 
   5064  -- User Option: magit-commit-extend-override-date
   5065      Whether using ‘magit-commit-extend’ changes the committer date.
   5066 
   5067  -- User Option: magit-commit-reword-override-date
   5068      Whether using ‘magit-commit-reword’ changes the committer date.
   5069 
   5070  -- User Option: magit-commit-squash-confirm
   5071      Whether the commit targeted by squash and fixup has to be
   5072      confirmed.  When non-nil then the commit at point (if any) is used
   5073      as default choice.  Otherwise it has to be confirmed.  This option
   5074      only affects ‘magit-commit-squash’ and ‘magit-commit-fixup’.  The
   5075      "instant" variants always require confirmation because making an
   5076      error while using those is harder to recover from.
   5077 
   5078  -- User Option: magit-post-commit-hook
   5079      Hook run after creating a commit without the user editing a
   5080      message.
   5081 
   5082      This hook is run by ‘magit-refresh’ if ‘this-command’ is a member
   5083      of ‘magit-post-commit-hook-commands’.  This only includes commands
   5084      named ‘magit-commit-*’ that do *not* require that the user edits
   5085      the commit message in a buffer.
   5086 
   5087      Also see ‘git-commit-post-finish-hook’.
   5088 
   5089  -- User Option: magit-commit-diff-inhibit-same-window
   5090      Whether to inhibit use of same window when showing diff while
   5091      committing.
   5092 
   5093      When writing a commit, then a diff of the changes to be committed
   5094      is automatically shown.  The idea is that the diff is shown in a
   5095      different window of the same frame and for most users that just
   5096      works.  In other words most users can completely ignore this option
   5097      because its value doesn’t make a difference for them.
   5098 
   5099      However for users who configured Emacs to never create a new window
   5100      even when the package explicitly tries to do so, then displaying
   5101      two new buffers necessarily means that the first is immediately
   5102      replaced by the second.  In our case the message buffer is
   5103      immediately replaced by the diff buffer, which is of course highly
   5104      undesirable.
   5105 
   5106      A workaround is to suppress this user configuration in this
   5107      particular case.  Users have to explicitly opt-in by toggling this
   5108      option.  We cannot enable the workaround unconditionally because
   5109      that again causes issues for other users: if the frame is too tiny
   5110      or the relevant settings too aggressive, then the diff buffer would
   5111      end up being displayed in a new frame.
   5112 
   5113      Also see <https://github.com/magit/magit/issues/4132>.
   5114 
   5115 
   5116 File: magit.info,  Node: Editing Commit Messages,  Prev: Initiating a Commit,  Up: Committing
   5117 
   5118 6.5.2 Editing Commit Messages
   5119 -----------------------------
   5120 
   5121 After initiating a commit as described in the previous section, two new
   5122 buffers appear.  One shows the changes that are about to be committed,
   5123 while the other is used to write the message.
   5124 
   5125    Commit messages are edited in an edit session - in the background
   5126 ‘git’ is waiting for the editor, in our case ‘emacsclient’, to save the
   5127 commit message in a file (in most cases ‘.git/COMMIT_EDITMSG’) and then
   5128 return.  If the editor returns with a non-zero exit status then ‘git’
   5129 does not create the commit.  So the most important commands are those
   5130 for finishing and aborting the commit.
   5131 
   5132 ‘C-c C-c’ (‘with-editor-finish’)
   5133      Finish the current editing session by returning with exit code 0.
   5134      Git then creates the commit using the message it finds in the file.
   5135 
   5136 ‘C-c C-k’ (‘with-editor-cancel’)
   5137      Cancel the current editing session by returning with exit code 1.
   5138      Git then cancels the commit, but leaves the file untouched.
   5139 
   5140    In addition to being used by ‘git commit’, messages may also be
   5141 stored in a ring that persists until Emacs is closed.  By default the
   5142 message is stored at the beginning and the end of an edit session
   5143 (regardless of whether the session is finished successfully or was
   5144 canceled).  It is sometimes useful to bring back messages from that
   5145 ring.
   5146 
   5147 ‘C-c M-s’ (‘git-commit-save-message’)
   5148      Save the current buffer content to the commit message ring.
   5149 
   5150 ‘M-p’ (‘git-commit-prev-message’)
   5151      Cycle backward through the commit message ring, after saving the
   5152      current message to the ring.  With a numeric prefix ARG, go back
   5153      ARG comments.
   5154 
   5155 ‘M-n’ (‘git-commit-next-message’)
   5156      Cycle forward through the commit message ring, after saving the
   5157      current message to the ring.  With a numeric prefix ARG, go back
   5158      ARG comments.
   5159 
   5160    By default the diff for the changes that are about to be committed
   5161 are automatically shown when invoking the commit.  To prevent that,
   5162 remove ‘magit-commit-diff’ from ‘server-switch-hook’.
   5163 
   5164    When amending to an existing commit it may be useful to show either
   5165 the changes that are about to be added to that commit or to show those
   5166 changes alongside those that have already been committed.
   5167 
   5168 ‘C-c C-d’ (‘magit-diff-while-committing’)
   5169      While committing, show the changes that are about to be committed.
   5170      While amending, invoking the command again toggles between showing
   5171      just the new changes or all the changes that will be committed.
   5172 
   5173 * Menu:
   5174 
   5175 * Using the Revision Stack::
   5176 * Commit Pseudo Headers::
   5177 * Commit Mode and Hooks::
   5178 * Commit Message Conventions::
   5179 
   5180 
   5181 File: magit.info,  Node: Using the Revision Stack,  Next: Commit Pseudo Headers,  Up: Editing Commit Messages
   5182 
   5183 Using the Revision Stack
   5184 ........................
   5185 
   5186 ‘C-c C-w’ (‘magit-pop-revision-stack’)
   5187      This command inserts a representation of a revision into the
   5188      current buffer.  It can be used inside buffers used to write commit
   5189      messages but also in other buffers such as buffers used to edit
   5190      emails or ChangeLog files.
   5191 
   5192      By default this command pops the revision which was last added to
   5193      the ‘magit-revision-stack’ and inserts it into the current buffer
   5194      according to ‘magit-pop-revision-stack-format’.  Revisions can be
   5195      put on the stack using ‘magit-copy-section-value’ and
   5196      ‘magit-copy-buffer-revision’.
   5197 
   5198      If the stack is empty or with a prefix argument it instead reads a
   5199      revision in the minibuffer.  By using the minibuffer history this
   5200      allows selecting an item which was popped earlier or to insert an
   5201      arbitrary reference or revision without first pushing it onto the
   5202      stack.
   5203 
   5204      When reading the revision from the minibuffer, then it might not be
   5205      possible to guess the correct repository.  When this command is
   5206      called inside a repository (e.g., while composing a commit
   5207      message), then that repository is used.  Otherwise (e.g., while
   5208      composing an email) then the repository recorded for the top
   5209      element of the stack is used (even though we insert another
   5210      revision).  If not called inside a repository and with an empty
   5211      stack, or with two prefix arguments, then read the repository in
   5212      the minibuffer too.
   5213 
   5214  -- User Option: magit-pop-revision-stack-format
   5215      This option controls how the command ‘magit-pop-revision-stack’
   5216      inserts a revision into the current buffer.
   5217 
   5218      The entries on the stack have the format ‘(HASH TOPLEVEL)’ and this
   5219      option has the format ‘(POINT-FORMAT EOB-FORMAT INDEX-REGEXP)’, all
   5220      of which may be nil or a string (though either one of EOB-FORMAT or
   5221      POINT-FORMAT should be a string, and if INDEX-REGEXP is non-nil,
   5222      then the two formats should be too).
   5223 
   5224      First INDEX-REGEXP is used to find the previously inserted entry,
   5225      by searching backward from point.  The first submatch must match
   5226      the index number.  That number is incremented by one, and becomes
   5227      the index number of the entry to be inserted.  If you don’t want to
   5228      number the inserted revisions, then use nil for INDEX-REGEXP.
   5229 
   5230      If INDEX-REGEXP is non-nil then both POINT-FORMAT and EOB-FORMAT
   5231      should contain \"%N\", which is replaced with the number that was
   5232      determined in the previous step.
   5233 
   5234      Both formats, if non-nil and after removing %N, are then expanded
   5235      using ‘git show --format=FORMAT ...’ inside TOPLEVEL.
   5236 
   5237      The expansion of POINT-FORMAT is inserted at point, and the
   5238      expansion of EOB-FORMAT is inserted at the end of the buffer (if
   5239      the buffer ends with a comment, then it is inserted right before
   5240      that).
   5241 
   5242 
   5243 File: magit.info,  Node: Commit Pseudo Headers,  Next: Commit Mode and Hooks,  Prev: Using the Revision Stack,  Up: Editing Commit Messages
   5244 
   5245 Commit Pseudo Headers
   5246 .....................
   5247 
   5248 Some projects use pseudo headers in commit messages.  Magit colorizes
   5249 such headers and provides some commands to insert such headers.
   5250 
   5251  -- User Option: git-commit-known-pseudo-headers
   5252      A list of Git pseudo headers to be highlighted.
   5253 
   5254 ‘C-c C-i’ (‘git-commit-insert-pseudo-header’)
   5255      Insert a commit message pseudo header.
   5256 
   5257 ‘C-c C-a’ (‘git-commit-ack’)
   5258      Insert a header acknowledging that you have looked at the commit.
   5259 
   5260 ‘C-c C-r’ (‘git-commit-review’)
   5261      Insert a header acknowledging that you have reviewed the commit.
   5262 
   5263 ‘C-c C-s’ (‘git-commit-signoff’)
   5264      Insert a header to sign off the commit.
   5265 
   5266 ‘C-c C-t’ (‘git-commit-test’)
   5267      Insert a header acknowledging that you have tested the commit.
   5268 
   5269 ‘C-c C-o’ (‘git-commit-cc’)
   5270      Insert a header mentioning someone who might be interested.
   5271 
   5272 ‘C-c C-p’ (‘git-commit-reported’)
   5273      Insert a header mentioning the person who reported the issue being
   5274      fixed by the commit.
   5275 
   5276 ‘C-c M-i’ (‘git-commit-suggested’)
   5277      Insert a header mentioning the person who suggested the change.
   5278 
   5279 
   5280 File: magit.info,  Node: Commit Mode and Hooks,  Next: Commit Message Conventions,  Prev: Commit Pseudo Headers,  Up: Editing Commit Messages
   5281 
   5282 Commit Mode and Hooks
   5283 .....................
   5284 
   5285 ‘git-commit-mode’ is a minor mode that is only used to establish certain
   5286 key bindings.  This makes it possible to use an arbitrary major mode in
   5287 buffers used to edit commit messages.  It is even possible to use
   5288 different major modes in different repositories, which is useful when
   5289 different projects impose different commit message conventions.
   5290 
   5291  -- User Option: git-commit-major-mode
   5292      The value of this option is the major mode used to edit Git commit
   5293      messages.
   5294 
   5295    Because ‘git-commit-mode’ is a minor mode, we don’t use its mode hook
   5296 to setup the buffer, except for the key bindings.  All other setup
   5297 happens in the function ‘git-commit-setup’, which among other things
   5298 runs the hook ‘git-commit-setup-hook’.
   5299 
   5300  -- User Option: git-commit-setup-hook
   5301      Hook run at the end of ‘git-commit-setup’.
   5302 
   5303 The following functions are suitable for this hook:
   5304 
   5305  -- Function: git-commit-save-message
   5306      Save the current buffer content to the commit message ring.
   5307 
   5308  -- Function: git-commit-setup-changelog-support
   5309      After this function is called, ChangeLog entries are treated as
   5310      paragraphs.
   5311 
   5312  -- Function: git-commit-turn-on-auto-fill
   5313      Turn on ‘auto-fill-mode’.
   5314 
   5315  -- Function: git-commit-turn-on-flyspell
   5316      Turn on Flyspell mode.  Also prevent comments from being checked
   5317      and finally check current non-comment text.
   5318 
   5319  -- Function: git-commit-propertize-diff
   5320      Propertize the diff shown inside the commit message buffer.  Git
   5321      inserts such diffs into the commit message template when the
   5322      ‘--verbose’ argument is used.  ‘magit-commit’ by default does not
   5323      offer that argument because the diff that is shown in a separate
   5324      buffer is more useful.  But some users disagree, which is why this
   5325      function exists.
   5326 
   5327  -- Function: bug-reference-mode
   5328      Hyperlink bug references in the buffer.
   5329 
   5330  -- Function: with-editor-usage-message
   5331      Show usage information in the echo area.
   5332 
   5333  -- User Option: git-commit-post-finish-hook
   5334      Hook run after the user finished writing a commit message.
   5335 
   5336      This hook is only run after pressing ‘C-c C-c’ in a buffer used to
   5337      edit a commit message.  If a commit is created without the user
   5338      typing a message into a buffer, then this hook is not run.
   5339 
   5340      This hook is not run until the new commit has been created.  If
   5341      doing so takes Git longer than one second, then this hook isn’t run
   5342      at all.  For certain commands such as ‘magit-rebase-continue’ this
   5343      hook is never run because doing so would lead to a race condition.
   5344 
   5345      This hook is only run if ‘magit’ is available.
   5346 
   5347      Also see ‘magit-post-commit-hook’.
   5348 
   5349 
   5350 File: magit.info,  Node: Commit Message Conventions,  Prev: Commit Mode and Hooks,  Up: Editing Commit Messages
   5351 
   5352 Commit Message Conventions
   5353 ..........................
   5354 
   5355 Git-Commit highlights certain violations of commonly accepted commit
   5356 message conventions.  Certain violations even cause Git-Commit to ask
   5357 you to confirm that you really want to do that.  This nagging can of
   5358 course be turned off, but the result of doing that usually is that
   5359 instead of some code it’s now the human who is reviewing your commits
   5360 who has to waste some time telling you to fix your commits.
   5361 
   5362  -- User Option: git-commit-summary-max-length
   5363      The intended maximal length of the summary line of commit messages.
   5364      Characters beyond this column are colorized to indicate that this
   5365      preference has been violated.
   5366 
   5367  -- User Option: git-commit-finish-query-functions
   5368      List of functions called to query before performing commit.
   5369 
   5370      The commit message buffer is current while the functions are
   5371      called.  If any of them returns nil, then the commit is not
   5372      performed and the buffer is not killed.  The user should then fix
   5373      the issue and try again.
   5374 
   5375      The functions are called with one argument.  If it is non-nil then
   5376      that indicates that the user used a prefix argument to force
   5377      finishing the session despite issues.  Functions should usually
   5378      honor this wish and return non-nil.
   5379 
   5380      By default the only member is ‘git-commit-check-style-conventions’.
   5381 
   5382  -- Function: git-commit-check-style-conventions
   5383      This function checks for violations of certain basic style
   5384      conventions.  For each violation it asks users if they want to
   5385      proceed anyway.
   5386 
   5387  -- User Option: git-commit-style-convention-checks
   5388      This option controls what conventions the function by the same name
   5389      tries to enforce.  The value is a list of self-explanatory symbols
   5390      identifying certain conventions; ‘non-empty-second-line’ and
   5391      ‘overlong-summary-line’.
   5392 
   5393 
   5394 File: magit.info,  Node: Branching,  Next: Merging,  Prev: Committing,  Up: Manipulating
   5395 
   5396 6.6 Branching
   5397 =============
   5398 
   5399 * Menu:
   5400 
   5401 * The Two Remotes::
   5402 * Branch Commands::
   5403 * Branch Git Variables::
   5404 * Auxiliary Branch Commands::
   5405 
   5406 
   5407 File: magit.info,  Node: The Two Remotes,  Next: Branch Commands,  Up: Branching
   5408 
   5409 6.6.1 The Two Remotes
   5410 ---------------------
   5411 
   5412 The upstream branch of some local branch is the branch into which the
   5413 commits on that local branch should eventually be merged, usually
   5414 something like ‘origin/master’.  For the ‘master’ branch itself the
   5415 upstream branch and the branch it is being pushed to, are usually the
   5416 same remote branch.  But for a feature branch the upstream branch and
   5417 the branch it is being pushed to should differ.
   5418 
   5419    The commits on feature branches too should _eventually_ end up in a
   5420 remote branch such as ‘origin/master’ or ‘origin/maint’.  Such a branch
   5421 should therefore be used as the upstream.  But feature branches
   5422 shouldn’t be pushed directly to such branches.  Instead a feature branch
   5423 ‘my-feature’ is usually pushed to ‘my-fork/my-feature’ or if you are a
   5424 contributor ‘origin/my-feature’.  After the new feature has been
   5425 reviewed, the maintainer merges the feature into ‘master’.  And finally
   5426 ‘master’ (not ‘my-feature’ itself) is pushed to ‘origin/master’.
   5427 
   5428    But new features seldom are perfect on the first try, and so feature
   5429 branches usually have to be reviewed, improved, and re-pushed several
   5430 times.  Pushing should therefore be easy to do, and for that reason many
   5431 Git users have concluded that it is best to use the remote branch to
   5432 which the local feature branch is being pushed as its upstream.
   5433 
   5434    But luckily Git has long ago gained support for a push-remote which
   5435 can be configured separately from the upstream branch, using the
   5436 variables ‘branch.<name>.pushRemote’ and ‘remote.pushDefault’.  So we no
   5437 longer have to choose which of the two remotes should be used as "the
   5438 remote".
   5439 
   5440    Each of the fetching, pulling, and pushing transient commands
   5441 features three suffix commands that act on the current branch and some
   5442 other branch.  Of these, ‘p’ is bound to a command which acts on the
   5443 push-remote, ‘u’ is bound to a command which acts on the upstream, and
   5444 ‘e’ is bound to a command which acts on any other branch.  The status
   5445 buffer shows unpushed and unpulled commits for both the push-remote and
   5446 the upstream.
   5447 
   5448    It’s fairly simple to configure these two remotes.  The values of all
   5449 the variables that are related to fetching, pulling, and pushing (as
   5450 well as some other branch-related variables) can be inspected and
   5451 changed using the command ‘magit-branch-configure’, which is available
   5452 from many transient prefix commands that deal with branches.  It is also
   5453 possible to set the push-remote or upstream while pushing (see *note
   5454 Pushing::).
   5455 
   5456 
   5457 File: magit.info,  Node: Branch Commands,  Next: Branch Git Variables,  Prev: The Two Remotes,  Up: Branching
   5458 
   5459 6.6.2 Branch Commands
   5460 ---------------------
   5461 
   5462 The transient prefix command ‘magit-branch’ is used to create and
   5463 checkout branches, and to make changes to existing branches.  It is not
   5464 used to fetch, pull, merge, rebase, or push branches, i.e., this command
   5465 deals with branches themselves, not with the commits reachable from
   5466 them.  Those features are available from separate transient command.
   5467 
   5468 ‘b’ (‘magit-branch’)
   5469      This transient prefix command binds the following suffix commands
   5470      and displays them in a temporary buffer until a suffix is invoked.
   5471 
   5472      By default it also binds and displays the values of some
   5473      branch-related Git variables and allows changing their values.
   5474 
   5475  -- User Option: magit-branch-direct-configure
   5476      This option controls whether the transient command ‘magit-branch’
   5477      can be used to directly change the values of Git variables.  This
   5478      defaults to ‘t’ (to avoid changing key bindings).  When set to
   5479      ‘nil’, then no variables are displayed by that transient command,
   5480      and its suffix command ‘magit-branch-configure’ has to be used
   5481      instead to view and change branch related variables.
   5482 
   5483 ‘b C’ (‘magit-branch-configure’)
   5484 ‘f C’
   5485 ‘F C’
   5486 ‘P C’
   5487      This transient prefix command binds commands that set the value of
   5488      branch-related variables and displays them in a temporary buffer
   5489      until the transient is exited.
   5490 
   5491      With a prefix argument, this command always prompts for a branch.
   5492 
   5493      Without a prefix argument this depends on whether it was invoked as
   5494      a suffix of ‘magit-branch’ and on the
   5495      ‘magit-branch-direct-configure’ option.  If ‘magit-branch’ already
   5496      displays the variables for the current branch, then it isn’t useful
   5497      to invoke another transient that displays them for the same branch.
   5498      In that case this command prompts for a branch.
   5499 
   5500    The variables are described in *note Branch Git Variables::.
   5501 
   5502 ‘b b’ (‘magit-checkout’)
   5503      Checkout a revision read in the minibuffer and defaulting to the
   5504      branch or arbitrary revision at point.  If the revision is a local
   5505      branch then that becomes the current branch.  If it is something
   5506      else then ‘HEAD’ becomes detached.  Checkout fails if the working
   5507      tree or the staging area contain changes.
   5508 
   5509 ‘b n’ (‘magit-branch-create’)
   5510      Create a new branch.  The user is asked for a branch or arbitrary
   5511      revision to use as the starting point of the new branch.  When a
   5512      branch name is provided, then that becomes the upstream branch of
   5513      the new branch.  The name of the new branch is also read in the
   5514      minibuffer.
   5515 
   5516      Also see option ‘magit-branch-prefer-remote-upstream’.
   5517 
   5518 ‘b c’ (‘magit-branch-and-checkout’)
   5519      This command creates a new branch like ‘magit-branch-create’, but
   5520      then also checks it out.
   5521 
   5522      Also see option ‘magit-branch-prefer-remote-upstream’.
   5523 
   5524 ‘b l’ (‘magit-branch-checkout’)
   5525      This command checks out an existing or new local branch.  It reads
   5526      a branch name from the user offering all local branches and a
   5527      subset of remote branches as candidates.  Remote branches for which
   5528      a local branch by the same name exists are omitted from the list of
   5529      candidates.  The user can also enter a completely new branch name.
   5530 
   5531         • If the user selects an existing local branch, then that is
   5532           checked out.
   5533 
   5534         • If the user selects a remote branch, then it creates and
   5535           checks out a new local branch with the same name, and
   5536           configures the selected remote branch as the push target.
   5537 
   5538         • If the user enters a new branch name, then it creates and
   5539           checks that out, after also reading the starting-point from
   5540           the user.
   5541 
   5542      In the latter two cases the upstream is also set.  Whether it is
   5543      set to the chosen starting point or something else depends on the
   5544      value of ‘magit-branch-adjust-remote-upstream-alist’.
   5545 
   5546 ‘b s’ (‘magit-branch-spinoff’)
   5547      This command creates and checks out a new branch starting at and
   5548      tracking the current branch.  That branch in turn is reset to the
   5549      last commit it shares with its upstream.  If the current branch has
   5550      no upstream or no unpushed commits, then the new branch is created
   5551      anyway and the previously current branch is not touched.
   5552 
   5553      This is useful to create a feature branch after work has already
   5554      began on the old branch (likely but not necessarily "master").
   5555 
   5556      If the current branch is a member of the value of option
   5557      ‘magit-branch-prefer-remote-upstream’ (which see), then the current
   5558      branch will be used as the starting point as usual, but the
   5559      upstream of the starting-point may be used as the upstream of the
   5560      new branch, instead of the starting-point itself.
   5561 
   5562      If optional FROM is non-nil, then the source branch is reset to
   5563      ‘FROM~’, instead of to the last commit it shares with its upstream.
   5564      Interactively, FROM is only ever non-nil, if the region selects
   5565      some commits, and among those commits, FROM is the commit that is
   5566      the fewest commits ahead of the source branch.
   5567 
   5568      The commit at the other end of the selection actually does not
   5569      matter, all commits between FROM and ‘HEAD’ are moved to the new
   5570      branch.  If FROM is not reachable from ‘HEAD’ or is reachable from
   5571      the source branch’s upstream, then an error is raised.
   5572 
   5573 ‘b S’ (‘magit-branch-spinout’)
   5574      This command behaves like ‘magit-branch-spinoff’, except that it
   5575      does not change the current branch.  If there are any uncommitted
   5576      changes, then it behaves exactly like ‘magit-branch-spinoff’.
   5577 
   5578 ‘b x’ (‘magit-branch-reset’)
   5579      This command resets a branch, defaulting to the branch at point, to
   5580      the tip of another branch or any other commit.
   5581 
   5582      When the branch being reset is the current branch, then a hard
   5583      reset is performed.  If there are any uncommitted changes, then the
   5584      user has to confirm the reset because those changes would be lost.
   5585 
   5586      This is useful when you have started work on a feature branch but
   5587      realize it’s all crap and want to start over.
   5588 
   5589      When resetting to another branch and a prefix argument is used,
   5590      then the target branch is set as the upstream of the branch that is
   5591      being reset.
   5592 
   5593 ‘b k’ (‘magit-branch-delete’)
   5594      Delete one or multiple branches.  If the region marks multiple
   5595      branches, then offer to delete those.  Otherwise, prompt for a
   5596      single branch to be deleted, defaulting to the branch at point.
   5597 
   5598      Require confirmation when deleting branches is dangerous in some
   5599      way.  Option ‘magit-no-confirm’ can be customized to not require
   5600      confirmation in certain cases.  See its docstring to learn why
   5601      confirmation is required by default in certain cases or if a prompt
   5602      is confusing.
   5603 
   5604 ‘b m’ (‘magit-branch-rename’)
   5605      Rename a branch.  The branch and the new name are read in the
   5606      minibuffer.  With prefix argument the branch is renamed even if
   5607      that name conflicts with an existing branch.
   5608 
   5609  -- User Option: magit-branch-read-upstream-first
   5610      When creating a branch, whether to read the upstream branch before
   5611      the name of the branch that is to be created.  The default is ‘t’,
   5612      and I recommend you leave it at that.
   5613 
   5614  -- User Option: magit-branch-prefer-remote-upstream
   5615      This option specifies whether remote upstreams are favored over
   5616      local upstreams when creating new branches.
   5617 
   5618      When a new branch is created, then the branch, commit, or stash at
   5619      point is suggested as the starting point of the new branch, or if
   5620      there is no such revision at point the current branch.  In either
   5621      case the user may choose another starting point.
   5622 
   5623      If the chosen starting point is a branch, then it may also be set
   5624      as the upstream of the new branch, depending on the value of the
   5625      Git variable ‘branch.autoSetupMerge’.  By default this is done for
   5626      remote branches, but not for local branches.
   5627 
   5628      You might prefer to always use some remote branch as upstream.  If
   5629      the chosen starting point is (1) a local branch, (2) whose name
   5630      matches a member of the value of this option, (3) the upstream of
   5631      that local branch is a remote branch with the same name, and (4)
   5632      that remote branch can be fast-forwarded to the local branch, then
   5633      the chosen branch is used as starting point, but its own upstream
   5634      is used as the upstream of the new branch.
   5635 
   5636      Members of this option’s value are treated as branch names that
   5637      have to match exactly unless they contain a character that makes
   5638      them invalid as a branch name.  Recommended characters to use to
   5639      trigger interpretation as a regexp are "*" and "^".  Some other
   5640      characters which you might expect to be invalid, actually are not,
   5641      e.g., ".+$" are all perfectly valid.  More precisely, if ‘git
   5642      check-ref-format --branch STRING’ exits with a non-zero status,
   5643      then treat STRING as a regexp.
   5644 
   5645      Assuming the chosen branch matches these conditions you would end
   5646      up with with e.g.:
   5647 
   5648           feature --upstream--> origin/master
   5649 
   5650      instead of
   5651 
   5652           feature --upstream--> master --upstream--> origin/master
   5653 
   5654      Which you prefer is a matter of personal preference.  If you do
   5655      prefer the former, then you should add branches such as ‘master’,
   5656      ‘next’, and ‘maint’ to the value of this options.
   5657 
   5658  -- User Option: magit-branch-adjust-remote-upstream-alist
   5659      The value of this option is an alist of branches to be used as the
   5660      upstream when branching a remote branch.
   5661 
   5662      When creating a local branch from an ephemeral branch located on a
   5663      remote, e.g., a feature or hotfix branch, then that remote branch
   5664      should usually not be used as the upstream branch, since the
   5665      push-remote already allows accessing it and having both the
   5666      upstream and the push-remote reference the same related branch
   5667      would be wasteful.  Instead a branch like "maint" or "master"
   5668      should be used as the upstream.
   5669 
   5670      This option allows specifying the branch that should be used as the
   5671      upstream when branching certain remote branches.  The value is an
   5672      alist of the form ‘((UPSTREAM . RULE)...)’.  The first matching
   5673      element is used, the following elements are ignored.
   5674 
   5675      UPSTREAM is the branch to be used as the upstream for branches
   5676      specified by RULE.  It can be a local or a remote branch.
   5677 
   5678      RULE can either be a regular expression, matching branches whose
   5679      upstream should be the one specified by UPSTREAM.  Or it can be a
   5680      list of the only branches that should *not* use UPSTREAM; all other
   5681      branches will.  Matching is done after stripping the remote part of
   5682      the name of the branch that is being branched from.
   5683 
   5684      If you use a finite set of non-ephemeral branches across all your
   5685      repositories, then you might use something like:
   5686 
   5687           (("origin/master" . ("master" "next" "maint")))
   5688 
   5689      Or if the names of all your ephemeral branches contain a slash, at
   5690      least in some repositories, then a good value could be:
   5691 
   5692           (("origin/master" . "/"))
   5693 
   5694      Of course you can also fine-tune:
   5695 
   5696           (("origin/maint" . "\\`hotfix/")
   5697            ("origin/master" . "\\`feature/"))
   5698 
   5699      UPSTREAM can be a local branch:
   5700 
   5701           (("master" . ("master" "next" "maint")))
   5702 
   5703    Because the main branch is no longer almost always named "master" you
   5704 should also account for other common names:
   5705 
   5706      (("main"  . ("main" "master" "next" "maint"))
   5707       ("master" . ("main" "master" "next" "maint")))
   5708 
   5709  -- Command: magit-branch-orphan
   5710      This command creates and checks out a new orphan branch with
   5711      contents from a given revision.
   5712 
   5713  -- Command: magit-branch-or-checkout
   5714      This command is a hybrid between ‘magit-checkout’ and
   5715      ‘magit-branch-and-checkout’ and is intended as a replacement for
   5716      the former in ‘magit-branch’.
   5717 
   5718      It first asks the user for an existing branch or revision.  If the
   5719      user input actually can be resolved as a branch or revision, then
   5720      it checks that out, just like ‘magit-checkout’ would.
   5721 
   5722      Otherwise it creates and checks out a new branch using the input as
   5723      its name.  Before doing so it reads the starting-point for the new
   5724      branch.  This is similar to what ‘magit-branch-and-checkout’ does.
   5725 
   5726      To use this command instead of ‘magit-checkout’ add this to your
   5727      init file:
   5728 
   5729           (transient-replace-suffix 'magit-branch 'magit-checkout
   5730             '("b" "dwim" magit-branch-or-checkout))
   5731 
   5732 
   5733 File: magit.info,  Node: Branch Git Variables,  Next: Auxiliary Branch Commands,  Prev: Branch Commands,  Up: Branching
   5734 
   5735 6.6.3 Branch Git Variables
   5736 --------------------------
   5737 
   5738 These variables can be set from the transient prefix command
   5739 ‘magit-branch-configure’.  By default they can also be set from
   5740 ‘magit-branch’.  See *note Branch Commands::.
   5741 
   5742  -- Variable: branch.NAME.merge
   5743      Together with ‘branch.NAME.remote’ this variable defines the
   5744      upstream branch of the local branch named NAME.  The value of this
   5745      variable is the full reference of the upstream _branch_.
   5746 
   5747  -- Variable: branch.NAME.remote
   5748      Together with ‘branch.NAME.merge’ this variable defines the
   5749      upstream branch of the local branch named NAME.  The value of this
   5750      variable is the name of the upstream _remote_.
   5751 
   5752  -- Variable: branch.NAME.rebase
   5753      This variable controls whether pulling into the branch named NAME
   5754      is done by rebasing or by merging the fetched branch.
   5755 
   5756         • When ‘true’ then pulling is done by rebasing.
   5757         • When ‘false’ then pulling is done by merging.
   5758         • When undefined then the value of ‘pull.rebase’ is used.  The
   5759           default of that variable is ‘false’.
   5760 
   5761  -- Variable: branch.NAME.pushRemote
   5762      This variable specifies the remote that the branch named NAME is
   5763      usually pushed to.  The value has to be the name of an existing
   5764      remote.
   5765 
   5766      It is not possible to specify the name of _branch_ to push the
   5767      local branch to.  The name of the remote branch is always the same
   5768      as the name of the local branch.
   5769 
   5770      If this variable is undefined but ‘remote.pushDefault’ is defined,
   5771      then the value of the latter is used.  By default
   5772      ‘remote.pushDefault’ is undefined.
   5773 
   5774  -- Variable: branch.NAME.description
   5775      This variable can be used to describe the branch named NAME.  That
   5776      description is used, e.g., when turning the branch into a series of
   5777      patches.
   5778 
   5779    The following variables specify defaults which are used if the above
   5780 branch-specific variables are not set.
   5781 
   5782  -- Variable: pull.rebase
   5783      This variable specifies whether pulling is done by rebasing or by
   5784      merging.  It can be overwritten using ‘branch.NAME.rebase’.
   5785 
   5786         • When ‘true’ then pulling is done by rebasing.
   5787         • When ‘false’ (the default) then pulling is done by merging.
   5788 
   5789      Since it is never a good idea to merge the upstream branch into a
   5790      feature or hotfix branch and most branches are such branches, you
   5791      should consider setting this to ‘true’, and ‘branch.master.rebase’
   5792      to ‘false’.
   5793 
   5794  -- Variable: remote.pushDefault
   5795      This variable specifies what remote the local branches are usually
   5796      pushed to.  This can be overwritten per branch using
   5797      ‘branch.NAME.pushRemote’.
   5798 
   5799    The following variables are used during the creation of a branch and
   5800 control whether the various branch-specific variables are automatically
   5801 set at this time.
   5802 
   5803  -- Variable: branch.autoSetupMerge
   5804      This variable specifies under what circumstances creating a branch
   5805      NAME should result in the variables ‘branch.NAME.merge’ and
   5806      ‘branch.NAME.remote’ being set according to the starting point used
   5807      to create the branch.  If the starting point isn’t a branch, then
   5808      these variables are never set.
   5809 
   5810         • When ‘always’ then the variables are set regardless of whether
   5811           the starting point is a local or a remote branch.
   5812         • When ‘true’ (the default) then the variables are set when the
   5813           starting point is a remote branch, but not when it is a local
   5814           branch.
   5815         • When ‘false’ then the variables are never set.
   5816 
   5817  -- Variable: branch.autoSetupRebase
   5818      This variable specifies whether creating a branch NAME should
   5819      result in the variable ‘branch.NAME.rebase’ being set to ‘true’.
   5820 
   5821         • When ‘always’ then the variable is set regardless of whether
   5822           the starting point is a local or a remote branch.
   5823         • When ‘local’ then the variable are set when the starting point
   5824           is a local branch, but not when it is a remote branch.
   5825         • When ‘remote’ then the variable are set when the starting
   5826           point is a remote branch, but not when it is a local branch.
   5827         • When ‘never’ (the default) then the variable is never set.
   5828 
   5829    Note that the respective commands always change the repository-local
   5830 values.  If you want to change the global value, which is used when the
   5831 local value is undefined, then you have to do so on the command line,
   5832 e.g.:
   5833 
   5834      git config --global remote.autoSetupMerge always
   5835 
   5836    For more information about these variables you should also see
   5837 
   5838    *note (gitman)git-config::.  Also see *note (gitman)git-branch::.  ,
   5839 *note (gitman)git-checkout::.  and *note Pushing::.
   5840 
   5841  -- User Option: magit-prefer-remote-upstream
   5842      This option controls whether commands that read a branch from the
   5843      user and then set it as the upstream branch, offer a local or a
   5844      remote branch as default completion candidate, when they have the
   5845      choice.
   5846 
   5847      This affects all commands that use ‘magit-read-upstream-branch’ or
   5848      ‘magit-read-starting-point’, which includes all commands that
   5849      change the upstream and many which create new branches.
   5850 
   5851 
   5852 File: magit.info,  Node: Auxiliary Branch Commands,  Prev: Branch Git Variables,  Up: Branching
   5853 
   5854 6.6.4 Auxiliary Branch Commands
   5855 -------------------------------
   5856 
   5857 These commands are not available from the transient ‘magit-branch’ by
   5858 default.
   5859 
   5860  -- Command: magit-branch-shelve
   5861      This command shelves a branch.  This is done by deleting the
   5862      branch, and creating a new reference "refs/shelved/BRANCH-NAME"
   5863      pointing at the same commit as the branch pointed at.  If the
   5864      deleted branch had a reflog, then that is preserved as the reflog
   5865      of the new reference.
   5866 
   5867      This is useful if you want to move a branch out of sight, but are
   5868      not ready to completely discard it yet.
   5869 
   5870  -- Command: magit-branch-unshelve
   5871      This command unshelves a branch that was previously shelved using
   5872      ‘magit-branch-shelve’.  This is done by deleting the reference
   5873      "refs/shelved/BRANCH-NAME" and creating a branch "BRANCH-NAME"
   5874      pointing at the same commit as the deleted reference pointed at.
   5875      If the deleted reference had a reflog, then that is restored as the
   5876      reflog of the branch.
   5877 
   5878 
   5879 File: magit.info,  Node: Merging,  Next: Resolving Conflicts,  Prev: Branching,  Up: Manipulating
   5880 
   5881 6.7 Merging
   5882 ===========
   5883 
   5884 Also see *note (gitman)git-merge::.  For information on how to resolve
   5885 merge conflicts see the next section.
   5886 
   5887 ‘m’ (‘magit-merge’)
   5888      This transient prefix command binds the following suffix commands
   5889      along with the appropriate infix arguments and displays them in a
   5890      temporary buffer until a suffix is invoked.
   5891 
   5892    When no merge is in progress, then the transient features the
   5893 following suffix commands.
   5894 
   5895 ‘m m’ (‘magit-merge-plain’)
   5896      This command merges another branch or an arbitrary revision into
   5897      the current branch.  The branch or revision to be merged is read in
   5898      the minibuffer and defaults to the branch at point.
   5899 
   5900      Unless there are conflicts or a prefix argument is used, then the
   5901      resulting merge commit uses a generic commit message, and the user
   5902      does not get a chance to inspect or change it before the commit is
   5903      created.  With a prefix argument this does not actually create the
   5904      merge commit, which makes it possible to inspect how conflicts were
   5905      resolved and to adjust the commit message.
   5906 
   5907 ‘m e’ (‘magit-merge-editmsg’)
   5908      This command merges another branch or an arbitrary revision into
   5909      the current branch and opens a commit message buffer, so that the
   5910      user can make adjustments.  The commit is not actually created
   5911      until the user finishes with ‘C-c C-c’.
   5912 
   5913 ‘m n’ (‘magit-merge-nocommit’)
   5914      This command merges another branch or an arbitrary revision into
   5915      the current branch, but does not actually create the merge commit.
   5916      The user can then further adjust the merge, even when automatic
   5917      conflict resolution succeeded and/or adjust the commit message.
   5918 
   5919 ‘m a’ (‘magit-merge-absorb’)
   5920      This command merges another local branch into the current branch
   5921      and then removes the former.
   5922 
   5923      Before the source branch is merged, it is first force pushed to its
   5924      push-remote, provided the respective remote branch already exists.
   5925      This ensures that the respective pull-request (if any) won’t get
   5926      stuck on some obsolete version of the commits that are being
   5927      merged.  Finally, if ‘magit-branch-pull-request’ was used to create
   5928      the merged branch, then the respective remote branch is also
   5929      removed.
   5930 
   5931 ‘m i’ (‘magit-merge-into’)
   5932      This command merges the current branch into another local branch
   5933      and then removes the former.  The latter becomes the new current
   5934      branch.
   5935 
   5936      Before the source branch is merged, it is first force pushed to its
   5937      push-remote, provided the respective remote branch already exists.
   5938      This ensures that the respective pull-request (if any) won’t get
   5939      stuck on some obsolete version of the commits that are being
   5940      merged.  Finally, if ‘magit-branch-pull-request’ was used to create
   5941      the merged branch, then the respective remote branch is also
   5942      removed.
   5943 
   5944 ‘m s’ (‘magit-merge-squash’)
   5945      This command squashes the changes introduced by another branch or
   5946      an arbitrary revision into the current branch.  This only applies
   5947      the changes made by the squashed commits.  No information is
   5948      preserved that would allow creating an actual merge commit.
   5949      Instead of this command you should probably use a command from the
   5950      apply transient.
   5951 
   5952 ‘m p’ (‘magit-merge-preview’)
   5953      This command shows a preview of merging another branch or an
   5954      arbitrary revision into the current branch.
   5955 
   5956      Note that commands, that normally change how a diff is displayed,
   5957      do not work in buffers created by this command, because the
   5958      underlying Git command does not support diff arguments.
   5959 
   5960    When a merge is in progress, then the transient instead features the
   5961 following suffix commands.
   5962 
   5963 ‘m m’ (‘magit-merge’)
   5964      After the user resolved conflicts, this command proceeds with the
   5965      merge.  If some conflicts weren’t resolved, then this command
   5966      fails.
   5967 
   5968 ‘m a’ (‘magit-merge-abort’)
   5969      This command aborts the current merge operation.
   5970 
   5971 
   5972 File: magit.info,  Node: Resolving Conflicts,  Next: Rebasing,  Prev: Merging,  Up: Manipulating
   5973 
   5974 6.8 Resolving Conflicts
   5975 =======================
   5976 
   5977 When merging branches (or otherwise combining or changing history)
   5978 conflicts can occur.  If you edited two completely different parts of
   5979 the same file in two branches and then merge one of these branches into
   5980 the other, then Git can resolve that on its own, but if you edit the
   5981 same area of a file, then a human is required to decide how the two
   5982 versions, or "sides of the conflict", are to be combined into one.
   5983 
   5984    Here we can only provide a brief introduction to the subject and
   5985 point you toward some tools that can help.  If you are new to this, then
   5986 please also consult Git’s own documentation as well as other resources.
   5987 
   5988    If a file has conflicts and Git cannot resolve them by itself, then
   5989 it puts both versions into the affected file along with special markers
   5990 whose purpose is to denote the boundaries of the unresolved part of the
   5991 file and between the different versions.  These boundary lines begin
   5992 with the strings consisting of seven times the same character, one of
   5993 ‘<’, ‘|’, ‘=’ and ‘>’, and are followed by information about the source
   5994 of the respective versions, e.g.:
   5995 
   5996      <<<<<<< HEAD
   5997      Take the blue pill.
   5998      =======
   5999      Take the red pill.
   6000      >>>>>>> feature
   6001 
   6002    In this case you have chosen to take the red pill on one branch and
   6003 on another you picked the blue pill.  Now that you are merging these two
   6004 diverging branches, Git cannot possibly know which pill you want to
   6005 take.
   6006 
   6007    To resolve that conflict you have to create a version of the affected
   6008 area of the file by keeping only one of the sides, possibly by editing
   6009 it in order to bring in the changes from the other side, remove the
   6010 other versions as well as the markers, and then stage the result.  A
   6011 possible resolution might be:
   6012 
   6013      Take both pills.
   6014 
   6015    Often it is useful to see not only the two sides of the conflict but
   6016 also the "original" version from before the same area of the file was
   6017 modified twice on different branches.  Instruct Git to insert that
   6018 version as well by running this command once:
   6019 
   6020      git config --global merge.conflictStyle diff3
   6021 
   6022    The above conflict might then have looked like this:
   6023 
   6024      <<<<<<< HEAD
   6025      Take the blue pill.
   6026      ||||||| merged common ancestors
   6027      Take either the blue or the red pill, but not both.
   6028      =======
   6029      Take the red pill.
   6030      >>>>>>> feature
   6031 
   6032    If that were the case, then the above conflict resolution would not
   6033 have been correct, which demonstrates why seeing the original version
   6034 alongside the conflicting versions can be useful.
   6035 
   6036    You can perform the conflict resolution completely by hand, but Emacs
   6037 also provides some packages that help in the process: Smerge, Ediff
   6038 (*note (ediff)Top::), and Emerge (*note (emacs)Emerge::).  Magit does
   6039 not provide its own tools for conflict resolution, but it does make
   6040 using Smerge and Ediff more convenient.  (Ediff supersedes Emerge, so
   6041 you probably don’t want to use the latter anyway.)
   6042 
   6043    In the Magit status buffer, files with unresolved conflicts are
   6044 listed in the "Unstaged changes" and/or "Staged changes" sections.  They
   6045 are prefixed with the word "unmerged", which in this context essentially
   6046 is a synonym for "unresolved".
   6047 
   6048    Pressing ‘RET’ while point is on such a file section shows a buffer
   6049 visiting that file, turns on ‘smerge-mode’ in that buffer, and places
   6050 point inside the first area with conflicts.  You should then resolve
   6051 that conflict using regular edit commands and/or Smerge commands.
   6052 
   6053    Unfortunately Smerge does not have a manual, but you can get a list
   6054 of commands and binding ‘C-c ^ C-h’ and press ‘RET’ while point is on a
   6055 command name to read its documentation.
   6056 
   6057    Normally you would edit one version and then tell Smerge to keep only
   6058 that version.  Use ‘C-c ^ m’ (‘smerge-keep-mine’) to keep the ‘HEAD’
   6059 version or ‘C-c ^ o’ (‘smerge-keep-other’) to keep the version that
   6060 follows "|||||||".  Then use ‘C-c ^ n’ to move to the next conflicting
   6061 area in the same file.  Once you are done resolving conflicts, return to
   6062 the Magit status buffer.  The file should now be shown as "modified", no
   6063 longer as "unmerged", because Smerge automatically stages the file when
   6064 you save the buffer after resolving the last conflict.
   6065 
   6066    Magit now wraps the mentioned Smerge commands, allowing you to use
   6067 these key bindings without having to go to the file-visiting buffer.
   6068 Additionally ‘k’ (‘magit-discard’) on a hunk with unresolved conflicts
   6069 asks which side to keep or, if point is on a side, then it keeps it
   6070 without prompting.  Similarly ‘k’ on a unresolved file ask which side to
   6071 keep.
   6072 
   6073    Alternatively you could use Ediff, which uses separate buffers for
   6074 the different versions of the file.  To resolve conflicts in a file
   6075 using Ediff press ‘e’ while point is on such a file in the status
   6076 buffer.
   6077 
   6078    Ediff can be used for other purposes as well.  For more information
   6079 on how to enter Ediff from Magit, see *note Ediffing::.  Explaining how
   6080 to use Ediff is beyond the scope of this manual, instead see *note
   6081 (ediff)Top::.
   6082 
   6083    If you are unsure whether you should Smerge or Ediff, then use the
   6084 former.  It is much easier to understand and use, and except for truly
   6085 complex conflicts, the latter is usually overkill.
   6086 
   6087 
   6088 File: magit.info,  Node: Rebasing,  Next: Cherry Picking,  Prev: Resolving Conflicts,  Up: Manipulating
   6089 
   6090 6.9 Rebasing
   6091 ============
   6092 
   6093 Also see *note (gitman)git-rebase::.  For information on how to resolve
   6094 conflicts that occur during rebases see the preceding section.
   6095 
   6096 ‘r’ (‘magit-rebase’)
   6097      This transient prefix command binds the following suffix commands
   6098      along with the appropriate infix arguments and displays them in a
   6099      temporary buffer until a suffix is invoked.
   6100 
   6101    When no rebase is in progress, then the transient features the
   6102 following suffix commands.
   6103 
   6104    Using one of these commands _starts_ a rebase sequence.  Git might
   6105 then stop somewhere along the way, either because you told it to do so,
   6106 or because applying a commit failed due to a conflict.  When that
   6107 happens, then the status buffer shows information about the rebase
   6108 sequence which is in progress in a section similar to a log section.
   6109 See *note Information About In-Progress Rebase::.
   6110 
   6111    For information about the upstream and the push-remote, see *note The
   6112 Two Remotes::.
   6113 
   6114 ‘r p’ (‘magit-rebase-onto-pushremote’)
   6115      This command rebases the current branch onto its push-remote.
   6116 
   6117      With a prefix argument or when the push-remote is either not
   6118      configured or unusable, then let the user first configure the
   6119      push-remote.
   6120 
   6121 ‘r u’ (‘magit-rebase-onto-upstream’)
   6122      This command rebases the current branch onto its upstream branch.
   6123 
   6124      With a prefix argument or when the upstream is either not
   6125      configured or unusable, then let the user first configure the
   6126      upstream.
   6127 
   6128 ‘r e’ (‘magit-rebase-branch’)
   6129      This command rebases the current branch onto a branch read in the
   6130      minibuffer.  All commits that are reachable from head but not from
   6131      the selected branch TARGET are being rebased.
   6132 
   6133 ‘r s’ (‘magit-rebase-subset’)
   6134      This command starts a non-interactive rebase sequence to transfer
   6135      commits from START to ‘HEAD’ onto NEWBASE.  START has to be
   6136      selected from a list of recent commits.
   6137 
   6138    By default Magit uses the ‘--autostash’ argument, which causes
   6139 uncommitted changes to be stored in a stash before the rebase begins.
   6140 These changes are restored after the rebase completes and if possible
   6141 the stash is removed.  If the stash does not apply cleanly, then the
   6142 stash is not removed.  In case something goes wrong when resolving the
   6143 conflicts, this allows you to start over.
   6144 
   6145    Even though one of the actions is dedicated to interactive rebases,
   6146 the transient also features the infix argument ‘--interactive’.  This
   6147 can be used to turn one of the other, non-interactive rebase variants
   6148 into an interactive rebase.
   6149 
   6150    For example if you want to clean up a feature branch and at the same
   6151 time rebase it onto ‘master’, then you could use ‘r-iu’.  But we
   6152 recommend that you instead do that in two steps.  First use ‘ri’ to
   6153 cleanup the feature branch, and then in a second step ‘ru’ to rebase it
   6154 onto ‘master’.  That way if things turn out to be more complicated than
   6155 you thought and/or you make a mistake and have to start over, then you
   6156 only have to redo half the work.
   6157 
   6158    Explicitly enabling ‘--interactive’ won’t have an effect on the
   6159 following commands as they always use that argument anyway, even if it
   6160 is not enabled in the transient.
   6161 
   6162 ‘r i’ (‘magit-rebase-interactive’)
   6163      This command starts an interactive rebase sequence.
   6164 
   6165 ‘r f’ (‘magit-rebase-autosquash’)
   6166      This command combines squash and fixup commits with their intended
   6167      targets.
   6168 
   6169 ‘r m’ (‘magit-rebase-edit-commit’)
   6170      This command starts an interactive rebase sequence that lets the
   6171      user edit a single older commit.
   6172 
   6173 ‘r w’ (‘magit-rebase-reword-commit’)
   6174      This command starts an interactive rebase sequence that lets the
   6175      user reword a single older commit.
   6176 
   6177 ‘r k’ (‘magit-rebase-remove-commit’)
   6178      This command removes a single older commit using rebase.
   6179 
   6180    When a rebase is in progress, then the transient instead features the
   6181 following suffix commands.
   6182 
   6183 ‘r r’ (‘magit-rebase-continue’)
   6184      This command restart the current rebasing operation.
   6185 
   6186      In some cases this pops up a commit message buffer for you do edit.
   6187      With a prefix argument the old message is reused as-is.
   6188 
   6189 ‘r s’ (‘magit-rebase-skip’)
   6190      This command skips the current commit and restarts the current
   6191      rebase operation.
   6192 
   6193 ‘r e’ (‘magit-rebase-edit’)
   6194      This command lets the user edit the todo list of the current rebase
   6195      operation.
   6196 
   6197 ‘r a’ (‘magit-rebase-abort’)
   6198      This command aborts the current rebase operation, restoring the
   6199      original branch.
   6200 
   6201 * Menu:
   6202 
   6203 * Editing Rebase Sequences::
   6204 * Information About In-Progress Rebase::
   6205 
   6206 
   6207 File: magit.info,  Node: Editing Rebase Sequences,  Next: Information About In-Progress Rebase,  Up: Rebasing
   6208 
   6209 6.9.1 Editing Rebase Sequences
   6210 ------------------------------
   6211 
   6212 ‘C-c C-c’ (‘with-editor-finish’)
   6213      Finish the current editing session by returning with exit code 0.
   6214      Git then uses the rebase instructions it finds in the file.
   6215 
   6216 ‘C-c C-k’ (‘with-editor-cancel’)
   6217      Cancel the current editing session by returning with exit code 1.
   6218      Git then forgoes starting the rebase sequence.
   6219 
   6220 ‘<RET>’ (‘git-rebase-show-commit’)
   6221      Show the commit on the current line in another buffer and select
   6222      that buffer.
   6223 
   6224 ‘<SPC>’ (‘git-rebase-show-or-scroll-up’)
   6225      Show the commit on the current line in another buffer without
   6226      selecting that buffer.  If the revision buffer is already visible
   6227      in another window of the current frame, then instead scroll that
   6228      window up.
   6229 
   6230 ‘<DEL>’ (‘git-rebase-show-or-scroll-down’)
   6231      Show the commit on the current line in another buffer without
   6232      selecting that buffer.  If the revision buffer is already visible
   6233      in another window of the current frame, then instead scroll that
   6234      window down.
   6235 
   6236 ‘p’ (‘git-rebase-backward-line’)
   6237      Move to previous line.
   6238 
   6239 ‘n’ (‘forward-line’)
   6240      Move to next line.
   6241 
   6242 ‘M-p’ (‘git-rebase-move-line-up’)
   6243      Move the current commit (or command) up.
   6244 
   6245 ‘M-n’ (‘git-rebase-move-line-down’)
   6246      Move the current commit (or command) down.
   6247 
   6248 ‘r’ (‘git-rebase-reword’)
   6249      Edit message of commit on current line.
   6250 
   6251 ‘e’ (‘git-rebase-edit’)
   6252      Stop at the commit on the current line.
   6253 
   6254 ‘s’ (‘git-rebase-squash’)
   6255      Meld commit on current line into previous commit, and edit message.
   6256 
   6257 ‘f’ (‘git-rebase-fixup’)
   6258      Meld commit on current line into previous commit, discarding the
   6259      current commit’s message.
   6260 
   6261 ‘k’ (‘git-rebase-kill-line’)
   6262      Kill the current action line.
   6263 
   6264 ‘c’ (‘git-rebase-pick’)
   6265      Use commit on current line.
   6266 
   6267 ‘x’ (‘git-rebase-exec’)
   6268      Insert a shell command to be run after the proceeding commit.
   6269 
   6270      If there already is such a command on the current line, then edit
   6271      that instead.  With a prefix argument insert a new command even
   6272      when there already is one on the current line.  With empty input
   6273      remove the command on the current line, if any.
   6274 
   6275 ‘b’ (‘git-rebase-break’)
   6276      Insert a break action before the current line, instructing Git to
   6277      return control to the user.
   6278 
   6279 ‘y’ (‘git-rebase-insert’)
   6280      Read an arbitrary commit and insert it below current line.
   6281 
   6282 ‘C-x u’ (‘git-rebase-undo’)
   6283      Undo some previous changes.  Like ‘undo’ but works in read-only
   6284      buffers.
   6285 
   6286  -- User Option: git-rebase-auto-advance
   6287      Whether to move to next line after changing a line.
   6288 
   6289  -- User Option: git-rebase-show-instructions
   6290      Whether to show usage instructions inside the rebase buffer.
   6291 
   6292  -- User Option: git-rebase-confirm-cancel
   6293      Whether confirmation is required to cancel.
   6294 
   6295    When a rebase is performed with the ‘--rebase-merges’ option, the
   6296 sequence will include a few other types of actions and the following
   6297 commands become relevant.
   6298 
   6299 ‘l’ (‘git-rebase-label’)
   6300      This commands inserts a label action or edits the one at point.
   6301 
   6302 ‘t’ (‘git-rebase-reset’)
   6303      This command inserts a reset action or edits the one at point.  The
   6304      prompt will offer the labels that are currently present in the
   6305      buffer.
   6306 
   6307 ‘MM’ (‘git-rebase-merge’)
   6308      The command inserts a merge action or edits the one at point.  The
   6309      prompt will offer the labels that are currently present in the
   6310      buffer.  Specifying a message to reuse via ‘-c’ or ‘-C’ is not
   6311      supported; an editor will always be invoked for the merge.
   6312 
   6313 ‘Mt’ (‘git-rebase-merge-toggle-editmsg’)
   6314      This command toggles between the ‘-C’ and ‘-c’ options of the merge
   6315      action at point.  These options both specify a commit whose message
   6316      should be reused.  The lower-case variant instructs Git to invoke
   6317      the editor when creating the merge, allowing the user to edit the
   6318      message.
   6319 
   6320 
   6321 File: magit.info,  Node: Information About In-Progress Rebase,  Prev: Editing Rebase Sequences,  Up: Rebasing
   6322 
   6323 6.9.2 Information About In-Progress Rebase
   6324 ------------------------------------------
   6325 
   6326 While a rebase sequence is in progress, the status buffer features a
   6327 section that lists the commits that have already been applied as well as
   6328 the commits that still have to be applied.
   6329 
   6330    The commits are split in two halves.  When rebase stops at a commit,
   6331 either because the user has to deal with a conflict or because s/he
   6332 explicitly requested that rebase stops at that commit, then point is
   6333 placed on the commit that separates the two groups, i.e., on ‘HEAD’.
   6334 The commits above it have not been applied yet, while the ‘HEAD’ and the
   6335 commits below it have already been applied.  In between these two groups
   6336 of applied and yet-to-be applied commits, there sometimes is a commit
   6337 which has been dropped.
   6338 
   6339    Each commit is prefixed with a word and these words are additionally
   6340 shown in different colors to indicate the status of the commits.
   6341 
   6342    The following colors are used:
   6343 
   6344    • Commits that use the same foreground color as the ‘default’ face
   6345      have not been applied yet.
   6346 
   6347    • Yellow commits have some special relationship to the commit rebase
   6348      stopped at.  This is used for the words "join", "goal", "same" and
   6349      "work" (see below).
   6350 
   6351    • Gray commits have already been applied.
   6352 
   6353    • The blue commit is the ‘HEAD’ commit.
   6354 
   6355    • The green commit is the commit the rebase sequence stopped at.  If
   6356      this is the same commit as ‘HEAD’ (e.g., because you haven’t done
   6357      anything yet after rebase stopped at the commit, then this commit
   6358      is shown in blue, not green).  There can only be a green *and* a
   6359      blue commit at the same time, if you create one or more new commits
   6360      after rebase stops at a commit.
   6361 
   6362    • Red commits have been dropped.  They are shown for reference only,
   6363      e.g., to make it easier to diff.
   6364 
   6365    Of course these colors are subject to the color-theme in use.
   6366 
   6367    The following words are used:
   6368 
   6369    • Commits prefixed with ‘pick’, ‘reword’, ‘edit’, ‘squash’, and
   6370      ‘fixup’ have not been applied yet.  These words have the same
   6371      meaning here as they do in the buffer used to edit the rebase
   6372      sequence.  See *note Editing Rebase Sequences::.  When the
   6373      ‘--rebase-merges’ option was specified, ‘reset’, ‘label’, and
   6374      ‘merge’ lines may also be present.
   6375 
   6376    • Commits prefixed with ‘done’ and ‘onto’ have already been applied.
   6377      It is possible for such a commit to be the ‘HEAD’, in which case it
   6378      is blue.  Otherwise it is grey.
   6379 
   6380         • The commit prefixed with ‘onto’ is the commit on top of which
   6381           all the other commits are being re-applied.  This commit
   6382           itself did not have to be re-applied, it is the commit rebase
   6383           did rewind to before starting to re-apply other commits.
   6384 
   6385         • Commits prefixed with ‘done’ have already been re-applied.
   6386           This includes commits that have been re-applied but also new
   6387           commits that you have created during the rebase.
   6388 
   6389    • All other commits, those not prefixed with any of the above words,
   6390      are in some way related to the commit at which rebase stopped.
   6391 
   6392      To determine whether a commit is related to the stopped-at commit
   6393      their hashes, trees and patch-ids (1) are being compared.  The
   6394      commit message is not used for this purpose.
   6395 
   6396      Generally speaking commits that are related to the stopped-at
   6397      commit can have any of the used colors, though not all color/word
   6398      combinations are possible.
   6399 
   6400      Words used for stopped-at commits are:
   6401 
   6402         • When a commit is prefixed with ‘void’, then that indicates
   6403           that Magit knows for sure that all the changes in that commit
   6404           have been applied using several new commits.  This commit is
   6405           no longer reachable from ‘HEAD’, and it also isn’t one of the
   6406           commits that will be applied when resuming the session.
   6407 
   6408         • When a commit is prefixed with ‘join’, then that indicates
   6409           that the rebase sequence stopped at that commit due to a
   6410           conflict - you now have to join (merge) the changes with what
   6411           has already been applied.  In a sense this is the commit
   6412           rebase stopped at, but while its effect is already in the
   6413           index and in the worktree (with conflict markers), the commit
   6414           itself has not actually been applied yet (it isn’t the
   6415           ‘HEAD’).  So it is shown in yellow, like the other commits
   6416           that still have to be applied.
   6417 
   6418         • When a commit is prefixed with ‘stop’ or a _blue_ or _green_
   6419           ‘same’, then that indicates that rebase stopped at this
   6420           commit, that it is still applied or has been applied again,
   6421           and that at least its patch-id is unchanged.
   6422 
   6423              • When a commit is prefixed with ‘stop’, then that
   6424                indicates that rebase stopped at that commit because you
   6425                requested that earlier, and its patch-id is unchanged.
   6426                It might even still be the exact same commit.
   6427 
   6428              • When a commit is prefixed with a _blue_ or _green_
   6429                ‘same’, then that indicates that while its tree or hash
   6430                changed, its patch-id did not.  If it is blue, then it is
   6431                the ‘HEAD’ commit (as always for blue).  When it is
   6432                green, then it no longer is ‘HEAD’ because other commit
   6433                have been created since (but before continuing the
   6434                rebase).
   6435 
   6436         • When a commit is prefixed with ‘goal’, a _yellow_ ‘same,’ or
   6437           ‘work’, then that indicates that rebase applied that commit
   6438           but that you then reset ‘HEAD’ to an earlier commit (likely to
   6439           split it up into multiple commits), and that there are some
   6440           uncommitted changes remaining which likely (but not
   6441           necessarily) originate from that commit.
   6442 
   6443              • When a commit is prefixed with ‘goal’, then that
   6444                indicates that it is still possible to create a new
   6445                commit with the exact same tree (the "goal") without
   6446                manually editing any files, by committing the index, or
   6447                by staging all changes and then committing that.  This is
   6448                the case when the original tree still exists in the index
   6449                or worktree in untainted form.
   6450 
   6451              • When a commit is prefixed with a yellow ‘same’, then that
   6452                indicates that it is no longer possible to create a
   6453                commit with the exact same tree, but that it is still
   6454                possible to create a commit with the same patch-id.  This
   6455                would be the case if you created a new commit with other
   6456                changes, but the changes from the original commit still
   6457                exist in the index or working tree in untainted form.
   6458 
   6459              • When a commit is prefixed with ‘work’, then that
   6460                indicates that you reset ‘HEAD’ to an earlier commit, and
   6461                that there are some staged and/or unstaged changes
   6462                (likely, but not necessarily) originating from that
   6463                commit.  However it is no longer possible to create a new
   6464                commit with the same tree or at least the same patch-id
   6465                because you have already made other changes.
   6466 
   6467         • When a commit is prefixed with ‘poof’ or ‘gone’, then that
   6468           indicates that rebase applied that commit but that you then
   6469           reset ‘HEAD’ to an earlier commit (likely to split it up into
   6470           multiple commits), and that there are no uncommitted changes.
   6471 
   6472              • When a commit is prefixed with ‘poof’, then that
   6473                indicates that it is no longer reachable from ‘HEAD’, but
   6474                that it has been replaced with one or more commits, which
   6475                together have the exact same effect.
   6476 
   6477              • When a commit is prefixed with ‘gone’, then that
   6478                indicates that it is no longer reachable from ‘HEAD’ and
   6479                that we also cannot determine whether its changes are
   6480                still in effect in one or more new commits.  They might
   6481                be, but if so, then there must also be other changes
   6482                which makes it impossible to know for sure.
   6483 
   6484    Do not worry if you do not fully understand the above.  That’s okay,
   6485 you will acquire a good enough understanding through practice.
   6486 
   6487    For other sequence operations such as cherry-picking, a similar
   6488 section is displayed, but they lack some of the features described
   6489 above, due to limitations in the git commands used to implement them.
   6490 Most importantly these sequences only support "picking" a commit but not
   6491 other actions such as "rewording", and they do not keep track of the
   6492 commits which have already been applied.
   6493 
   6494    ---------- Footnotes ----------
   6495 
   6496    (1) The patch-id is a hash of the _changes_ introduced by a commit.
   6497 It differs from the hash of the commit itself, which is a hash of the
   6498 result of applying that change (i.e., the resulting trees and blobs) as
   6499 well as author and committer information, the commit message, and the
   6500 hashes of the parents of the commit.  The patch-id hash on the other
   6501 hand is created only from the added and removed lines, even line numbers
   6502 and whitespace changes are ignored when calculating this hash.  The
   6503 patch-ids of two commits can be used to answer the question "Do these
   6504 commits make the same change?".
   6505 
   6506 
   6507 File: magit.info,  Node: Cherry Picking,  Next: Resetting,  Prev: Rebasing,  Up: Manipulating
   6508 
   6509 6.10 Cherry Picking
   6510 ===================
   6511 
   6512 Also see *note (gitman)git-cherry-pick::.
   6513 
   6514 ‘A’ (‘magit-cherry-pick’)
   6515      This transient prefix command binds the following suffix commands
   6516      along with the appropriate infix arguments and displays them in a
   6517      temporary buffer until a suffix is invoked.
   6518 
   6519    When no cherry-pick or revert is in progress, then the transient
   6520 features the following suffix commands.
   6521 
   6522 ‘A A’ (‘magit-cherry-copy’)
   6523      This command copies COMMITS from another branch onto the current
   6524      branch.  If the region selects multiple commits, then those are
   6525      copied, without prompting.  Otherwise the user is prompted for a
   6526      commit or range, defaulting to the commit at point.
   6527 
   6528 ‘A a’ (‘magit-cherry-apply’)
   6529      This command applies the changes in COMMITS from another branch
   6530      onto the current branch.  If the region selects multiple commits,
   6531      then those are used, without prompting.  Otherwise the user is
   6532      prompted for a commit or range, defaulting to the commit at point.
   6533 
   6534      This command also has a top-level binding, which can be invoked
   6535      without using the transient by typing ‘a’ at the top-level.
   6536 
   6537    The following commands not only apply some commits to some branch,
   6538 but also remove them from some other branch.  The removal is performed
   6539 using either ‘git-update-ref’ or if necessary ‘git-rebase’.  Both
   6540 applying commits as well as removing them using ‘git-rebase’ can lead to
   6541 conflicts.  If that happens, then these commands abort and you not only
   6542 have to resolve the conflicts but also finish the process the same way
   6543 you would have to if these commands didn’t exist at all.
   6544 
   6545 ‘A h’ (‘magit-cherry-harvest’)
   6546      This command moves the selected COMMITS that must be located on
   6547      another BRANCH onto the current branch instead, removing them from
   6548      the former.  When this command succeeds, then the same branch is
   6549      current as before.
   6550 
   6551      Applying the commits on the current branch or removing them from
   6552      the other branch can lead to conflicts.  When that happens, then
   6553      this command stops and you have to resolve the conflicts and then
   6554      finish the process manually.
   6555 
   6556 ‘A d’ (‘magit-cherry-donate’)
   6557      This command moves the selected COMMITS from the current branch
   6558      onto another existing BRANCH, removing them from the former.  When
   6559      this command succeeds, then the same branch is current as before.
   6560      ‘HEAD’ is allowed to be detached initially.
   6561 
   6562      Applying the commits on the other branch or removing them from the
   6563      current branch can lead to conflicts.  When that happens, then this
   6564      command stops and you have to resolve the conflicts and then finish
   6565      the process manually.
   6566 
   6567 ‘A n’ (‘magit-cherry-spinout’)
   6568      This command moves the selected COMMITS from the current branch
   6569      onto a new branch BRANCH, removing them from the former.  When this
   6570      command succeeds, then the same branch is current as before.
   6571 
   6572      Applying the commits on the other branch or removing them from the
   6573      current branch can lead to conflicts.  When that happens, then this
   6574      command stops and you have to resolve the conflicts and then finish
   6575      the process manually.
   6576 
   6577 ‘A s’ (‘magit-cherry-spinoff’)
   6578      This command moves the selected COMMITS from the current branch
   6579      onto a new branch BRANCH, removing them from the former.  When this
   6580      command succeeds, then the new branch is checked out.
   6581 
   6582      Applying the commits on the other branch or removing them from the
   6583      current branch can lead to conflicts.  When that happens, then this
   6584      command stops and you have to resolve the conflicts and then finish
   6585      the process manually.
   6586 
   6587    When a cherry-pick or revert is in progress, then the transient
   6588 instead features the following suffix commands.
   6589 
   6590 ‘A A’ (‘magit-sequence-continue’)
   6591      Resume the current cherry-pick or revert sequence.
   6592 
   6593 ‘A s’ (‘magit-sequence-skip’)
   6594      Skip the stopped at commit during a cherry-pick or revert sequence.
   6595 
   6596 ‘A a’ (‘magit-sequence-abort’)
   6597      Abort the current cherry-pick or revert sequence.  This discards
   6598      all changes made since the sequence started.
   6599 
   6600 * Menu:
   6601 
   6602 * Reverting::
   6603 
   6604 
   6605 File: magit.info,  Node: Reverting,  Up: Cherry Picking
   6606 
   6607 6.10.1 Reverting
   6608 ----------------
   6609 
   6610 ‘V’ (‘magit-revert’)
   6611      This transient prefix command binds the following suffix commands
   6612      along with the appropriate infix arguments and displays them in a
   6613      temporary buffer until a suffix is invoked.
   6614 
   6615    When no cherry-pick or revert is in progress, then the transient
   6616 features the following suffix commands.
   6617 
   6618 ‘V V’ (‘magit-revert-and-commit’)
   6619      Revert a commit by creating a new commit.  Prompt for a commit,
   6620      defaulting to the commit at point.  If the region selects multiple
   6621      commits, then revert all of them, without prompting.
   6622 
   6623 ‘V v’ (‘magit-revert-no-commit’)
   6624      Revert a commit by applying it in reverse to the working tree.
   6625      Prompt for a commit, defaulting to the commit at point.  If the
   6626      region selects multiple commits, then revert all of them, without
   6627      prompting.
   6628 
   6629    When a cherry-pick or revert is in progress, then the transient
   6630 instead features the following suffix commands.
   6631 
   6632 ‘V V’ (‘magit-sequence-continue’)
   6633      Resume the current cherry-pick or revert sequence.
   6634 
   6635 ‘V s’ (‘magit-sequence-skip’)
   6636      Skip the stopped at commit during a cherry-pick or revert sequence.
   6637 
   6638 ‘V a’ (‘magit-sequence-abort’)
   6639      Abort the current cherry-pick or revert sequence.  This discards
   6640      all changes made since the sequence started.
   6641 
   6642 
   6643 File: magit.info,  Node: Resetting,  Next: Stashing,  Prev: Cherry Picking,  Up: Manipulating
   6644 
   6645 6.11 Resetting
   6646 ==============
   6647 
   6648 Also see *note (gitman)git-reset::.
   6649 
   6650 ‘x’ (‘magit-reset-quickly’)
   6651      Reset the ‘HEAD’ and index to some commit read from the user and
   6652      defaulting to the commit at point, and possibly also reset the
   6653      working tree.  With a prefix argument reset the working tree
   6654      otherwise don’t.
   6655 
   6656 ‘X m’ (‘magit-reset-mixed’)
   6657      Reset the ‘HEAD’ and index to some commit read from the user and
   6658      defaulting to the commit at point.  The working tree is kept as-is.
   6659 
   6660 ‘X s’ (‘magit-reset-soft’)
   6661      Reset the ‘HEAD’ to some commit read from the user and defaulting
   6662      to the commit at point.  The index and the working tree are kept
   6663      as-is.
   6664 
   6665 ‘X h’ (‘magit-reset-hard’)
   6666      Reset the ‘HEAD’, index, and working tree to some commit read from
   6667      the user and defaulting to the commit at point.
   6668 
   6669 ‘X k’ (‘magit-reset-keep’)
   6670      Reset the ‘HEAD’, index, and working tree to some commit read from
   6671      the user and defaulting to the commit at point.  Uncommitted
   6672      changes are kept as-is.
   6673 
   6674 ‘X i’ (‘magit-reset-index’)
   6675      Reset the index to some commit read from the user and defaulting to
   6676      the commit at point.  Keep the ‘HEAD’ and working tree as-is, so if
   6677      the commit refers to the ‘HEAD’, then this effectively unstages all
   6678      changes.
   6679 
   6680 ‘X w’ (‘magit-reset-worktree’)
   6681      Reset the working tree to some commit read from the user and
   6682      defaulting to the commit at point.  Keep the ‘HEAD’ and index
   6683      as-is.
   6684 
   6685 ‘X f’ (‘magit-file-checkout’)
   6686      Update file in the working tree and index to the contents from a
   6687      revision.  Both the revision and file are read from the user.
   6688 
   6689 
   6690 File: magit.info,  Node: Stashing,  Prev: Resetting,  Up: Manipulating
   6691 
   6692 6.12 Stashing
   6693 =============
   6694 
   6695 Also see *note (gitman)git-stash::.
   6696 
   6697 ‘z’ (‘magit-stash’)
   6698      This transient prefix command binds the following suffix commands
   6699      along with the appropriate infix arguments and displays them in a
   6700      temporary buffer until a suffix is invoked.
   6701 
   6702 ‘z z’ (‘magit-stash-both’)
   6703      Create a stash of the index and working tree.  Untracked files are
   6704      included according to infix arguments.  One prefix argument is
   6705      equivalent to ‘--include-untracked’ while two prefix arguments are
   6706      equivalent to ‘--all’.
   6707 
   6708 ‘z i’ (‘magit-stash-index’)
   6709      Create a stash of the index only.  Unstaged and untracked changes
   6710      are not stashed.
   6711 
   6712 ‘z w’ (‘magit-stash-worktree’)
   6713      Create a stash of unstaged changes in the working tree.  Untracked
   6714      files are included according to infix arguments.  One prefix
   6715      argument is equivalent to ‘--include-untracked’ while two prefix
   6716      arguments are equivalent to ‘--all’.
   6717 
   6718 ‘z x’ (‘magit-stash-keep-index’)
   6719      Create a stash of the index and working tree, keeping index intact.
   6720      Untracked files are included according to infix arguments.  One
   6721      prefix argument is equivalent to ‘--include-untracked’ while two
   6722      prefix arguments are equivalent to ‘--all’.
   6723 
   6724 ‘z Z’ (‘magit-snapshot-both’)
   6725      Create a snapshot of the index and working tree.  Untracked files
   6726      are included according to infix arguments.  One prefix argument is
   6727      equivalent to ‘--include-untracked’ while two prefix arguments are
   6728      equivalent to ‘--all’.
   6729 
   6730 ‘z I’ (‘magit-snapshot-index’)
   6731      Create a snapshot of the index only.  Unstaged and untracked
   6732      changes are not stashed.
   6733 
   6734 ‘z W’ (‘magit-snapshot-worktree’)
   6735      Create a snapshot of unstaged changes in the working tree.
   6736      Untracked files are included according to infix arguments.  One
   6737      prefix argument is equivalent to ‘--include-untracked’ while two
   6738      prefix arguments are equivalent to ‘--all’-.
   6739 
   6740 ‘z a’ (‘magit-stash-apply’)
   6741      Apply a stash to the working tree.
   6742 
   6743      First try ‘git stash apply --index’, which tries to preserve the
   6744      index stored in the stash, if any.  This may fail because applying
   6745      the stash could result in conflicts and those have to be stored in
   6746      the index, making it impossible to also store the stash’s index
   6747      there as well.
   6748 
   6749      If the above failed, then try ‘git stash apply’.  This fails (with
   6750      or without ‘--index’) if there are any uncommitted changes to files
   6751      that are also modified in the stash.
   6752 
   6753      If both of the above failed, then apply using ‘git apply’.  If
   6754      there are no conflicting files, use ‘--3way’.  If there are
   6755      conflicting files, then using ‘--3way’ requires that those files
   6756      are staged first, which may be undesirable, so prompt the user
   6757      whether to use ‘--3way’ or ‘--reject’.
   6758 
   6759      Customize ‘magit-no-confirm’ if you want to always use ‘--3way’,
   6760      without being prompted.
   6761 
   6762 ‘z p’ (‘magit-stash-pop’)
   6763      Apply a stash to the working tree.  On complete success (if the
   6764      stash can be applied without any conflicts, and while preserving
   6765      the stash’s index) then remove the stash from stash list.
   6766 
   6767      First try ‘git stash pop --index’, which tries to preserve the
   6768      index stored in the stash, if any.  This may fail because applying
   6769      the stash could result in conflicts and those have to be stored in
   6770      the index, making it impossible to also store the stash’s index
   6771      there as well.
   6772 
   6773      If the above failed, then try ‘git stash apply’.  This fails (with
   6774      or without ‘--index’) if there are any uncommitted changes to files
   6775      that are also modified in the stash.
   6776 
   6777      If both of the above failed, then apply using ‘git apply’.  If
   6778      there are no conflicting files, use ‘--3way’.  If there are
   6779      conflicting files, then using ‘--3way’ requires that those files
   6780      are staged first, which may be undesirable, so prompt the user
   6781      whether to use ‘--3way’ or ‘--reject’.
   6782 
   6783      Customize ‘magit-no-confirm’ if you want to always use ‘--3way’,
   6784      without being prompted.
   6785 
   6786 ‘z k’ (‘magit-stash-drop’)
   6787      Remove a stash from the stash list.  When the region is active,
   6788      offer to drop all contained stashes.
   6789 
   6790 ‘z v’ (‘magit-stash-show’)
   6791      Show all diffs of a stash in a buffer.
   6792 
   6793 ‘z b’ (‘magit-stash-branch’)
   6794      Create and checkout a new branch from an existing stash.  The new
   6795      branch starts at the commit that was current when the stash was
   6796      created.
   6797 
   6798 ‘z B’ (‘magit-stash-branch-here’)
   6799      Create and checkout a new branch from an existing stash.  Use the
   6800      current branch or ‘HEAD’ as the starting-point of the new branch.
   6801      Then apply the stash, dropping it if it applies cleanly.
   6802 
   6803 ‘z f’ (‘magit-stash-format-patch’)
   6804      Create a patch from STASH.
   6805 
   6806 ‘k’ (‘magit-stash-clear’)
   6807      Remove all stashes saved in REF’s reflog by deleting REF.
   6808 
   6809 ‘z l’ (‘magit-stash-list’)
   6810      List all stashes in a buffer.
   6811 
   6812  -- User Option: magit-stashes-margin
   6813      This option specifies whether the margin is initially shown in
   6814      stashes buffers and how it is formatted.
   6815 
   6816      The value has the form ‘(INIT STYLE WIDTH AUTHOR AUTHOR-WIDTH)’.
   6817 
   6818         • If INIT is non-nil, then the margin is shown initially.
   6819         • STYLE controls how to format the author or committer date.  It
   6820           can be one of ‘age’ (to show the age of the commit),
   6821           ‘age-abbreviated’ (to abbreviate the time unit to a
   6822           character), or a string (suitable for ‘format-time-string’) to
   6823           show the actual date.  Option
   6824           ‘magit-log-margin-show-committer-date’ controls which date is
   6825           being displayed.
   6826         • WIDTH controls the width of the margin.  This exists for
   6827           forward compatibility and currently the value should not be
   6828           changed.
   6829         • AUTHOR controls whether the name of the author is also shown
   6830           by default.
   6831         • AUTHOR-WIDTH has to be an integer.  When the name of the
   6832           author is shown, then this specifies how much space is used to
   6833           do so.
   6834 
   6835 
   6836 File: magit.info,  Node: Transferring,  Next: Miscellaneous,  Prev: Manipulating,  Up: Top
   6837 
   6838 7 Transferring
   6839 **************
   6840 
   6841 * Menu:
   6842 
   6843 * Remotes::
   6844 * Fetching::
   6845 * Pulling::
   6846 * Pushing::
   6847 * Plain Patches::
   6848 * Maildir Patches::
   6849 
   6850 
   6851 File: magit.info,  Node: Remotes,  Next: Fetching,  Up: Transferring
   6852 
   6853 7.1 Remotes
   6854 ===========
   6855 
   6856 * Menu:
   6857 
   6858 * Remote Commands::
   6859 * Remote Git Variables::
   6860 
   6861 
   6862 File: magit.info,  Node: Remote Commands,  Next: Remote Git Variables,  Up: Remotes
   6863 
   6864 7.1.1 Remote Commands
   6865 ---------------------
   6866 
   6867 The transient prefix command ‘magit-remote’ is used to add remotes and
   6868 to make changes to existing remotes.  This command only deals with
   6869 remotes themselves, not with branches or the transfer of commits.  Those
   6870 features are available from separate transient commands.
   6871 
   6872    Also see *note (gitman)git-remote::.
   6873 
   6874 ‘M’ (‘magit-remote’)
   6875      This transient prefix command binds the following suffix commands
   6876      and displays them in a temporary buffer until a suffix is invoked.
   6877 
   6878      By default it also binds and displays the values of some
   6879      remote-related Git variables and allows changing their values.
   6880 
   6881  -- User Option: magit-remote-direct-configure
   6882      This option controls whether remote-related Git variables are
   6883      accessible directly from the transient ‘magit-remote’.
   6884 
   6885      If ‘t’ (the default) and a local branch is checked out, then
   6886      ‘magit-remote’ features the variables for the upstream remote of
   6887      that branch, or if ‘HEAD’ is detached, for ‘origin’, provided that
   6888      exists.
   6889 
   6890      If ‘nil’, then ‘magit-remote-configure’ has to be used to do so.
   6891 
   6892 ‘M C’ (‘magit-remote-configure’)
   6893      This transient prefix command binds commands that set the value of
   6894      remote-related variables and displays them in a temporary buffer
   6895      until the transient is exited.
   6896 
   6897      With a prefix argument, this command always prompts for a remote.
   6898 
   6899      Without a prefix argument this depends on whether it was invoked as
   6900      a suffix of ‘magit-remote’ and on the
   6901      ‘magit-remote-direct-configure’ option.  If ‘magit-remote’ already
   6902      displays the variables for the upstream, then it does not make
   6903      sense to invoke another transient that displays them for the same
   6904      remote.  In that case this command prompts for a remote.
   6905 
   6906    The variables are described in *note Remote Git Variables::.
   6907 
   6908 ‘M a’ (‘magit-remote-add’)
   6909      This command add a remote and fetches it.  The remote name and url
   6910      are read in the minibuffer.
   6911 
   6912 ‘M r’ (‘magit-remote-rename’)
   6913      This command renames a remote.  Both the old and the new names are
   6914      read in the minibuffer.
   6915 
   6916 ‘M u’ (‘magit-remote-set-url’)
   6917      This command changes the url of a remote.  Both the remote and the
   6918      new url are read in the minibuffer.
   6919 
   6920 ‘M k’ (‘magit-remote-remove’)
   6921      This command deletes a remote, read in the minibuffer.
   6922 
   6923 ‘M p’ (‘magit-remote-prune’)
   6924      This command removes stale remote-tracking branches for a remote
   6925      read in the minibuffer.
   6926 
   6927 ‘M P’ (‘magit-remote-prune-refspecs’)
   6928      This command removes stale refspecs for a remote read in the
   6929      minibuffer.
   6930 
   6931      A refspec is stale if there no longer exists at least one branch on
   6932      the remote that would be fetched due to that refspec.  A stale
   6933      refspec is problematic because its existence causes Git to refuse
   6934      to fetch according to the remaining non-stale refspecs.
   6935 
   6936      If only stale refspecs remain, then this command offers to either
   6937      delete the remote or to replace the stale refspecs with the default
   6938      refspec ("+refs/heads/*:refs/remotes/REMOTE/*").
   6939 
   6940      This command also removes the remote-tracking branches that were
   6941      created due to the now stale refspecs.  Other stale branches are
   6942      not removed.
   6943 
   6944  -- User Option: magit-remote-add-set-remote.pushDefault
   6945      This option controls whether the user is asked whether they want to
   6946      set ‘remote.pushDefault’ after adding a remote.
   6947 
   6948      If ‘ask’, then users is always ask.  If ‘ask-if-unset’, then the
   6949      user is only if the variable isn’t set already.  If ‘nil’, then the
   6950      user isn’t asked and the variable isn’t set.  If the value is a
   6951      string, then the variable is set without the user being asked,
   6952      provided that the name of the added remote is equal to that string
   6953      and the variable isn’t already set.
   6954 
   6955 
   6956 File: magit.info,  Node: Remote Git Variables,  Prev: Remote Commands,  Up: Remotes
   6957 
   6958 7.1.2 Remote Git Variables
   6959 --------------------------
   6960 
   6961 These variables can be set from the transient prefix command
   6962 ‘magit-remote-configure’.  By default they can also be set from
   6963 ‘magit-remote’.  See *note Remote Commands::.
   6964 
   6965  -- Variable: remote.NAME.url
   6966      This variable specifies the url of the remote named NAME.  It can
   6967      have multiple values.
   6968 
   6969  -- Variable: remote.NAME.fetch
   6970      The refspec used when fetching from the remote named NAME.  It can
   6971      have multiple values.
   6972 
   6973  -- Variable: remote.NAME.pushurl
   6974      This variable specifies the url used for pushing to the remote
   6975      named NAME.  If it is not specified, then ‘remote.NAME.url’ is used
   6976      instead.  It can have multiple values.
   6977 
   6978  -- Variable: remote.NAME.push
   6979      The refspec used when pushing to the remote named NAME.  It can
   6980      have multiple values.
   6981 
   6982  -- Variable: remote.NAME.tagOpts
   6983      This variable specifies what tags are fetched by default.  If the
   6984      value is ‘--no-tags’ then no tags are fetched.  If the value is
   6985      ‘--tags’, then all tags are fetched.  If this variable has no
   6986      value, then only tags are fetched that are reachable from fetched
   6987      branches.
   6988 
   6989 
   6990 File: magit.info,  Node: Fetching,  Next: Pulling,  Prev: Remotes,  Up: Transferring
   6991 
   6992 7.2 Fetching
   6993 ============
   6994 
   6995 Also see *note (gitman)git-fetch::.  For information about the upstream
   6996 and the push-remote, see *note The Two Remotes::.
   6997 
   6998 ‘f’ (‘magit-fetch’)
   6999      This transient prefix command binds the following suffix commands
   7000      along with the appropriate infix arguments and displays them in a
   7001      temporary buffer until a suffix is invoked.
   7002 
   7003 ‘f p’ (‘magit-fetch-from-pushremote’)
   7004      This command fetches from the current push-remote.
   7005 
   7006      With a prefix argument or when the push-remote is either not
   7007      configured or unusable, then let the user first configure the
   7008      push-remote.
   7009 
   7010 ‘f u’ (‘magit-fetch-from-upstream’)
   7011      This command fetch from the upstream of the current branch.
   7012 
   7013      If the upstream is configured for the current branch and names an
   7014      existing remote, then use that.  Otherwise try to use another
   7015      remote: If only a single remote is configured, then use that.
   7016      Otherwise if a remote named "origin" exists, then use that.
   7017 
   7018      If no remote can be determined, then this command is not available
   7019      from the ‘magit-fetch’ transient prefix and invoking it directly
   7020      results in an error.
   7021 
   7022 ‘f e’ (‘magit-fetch-other’)
   7023      This command fetch from a repository read from the minibuffer.
   7024 
   7025 ‘f o’ (‘magit-fetch-branch’)
   7026      This command fetches a branch from a remote, both of which are read
   7027      from the minibuffer.
   7028 
   7029 ‘f r’ (‘magit-fetch-refspec’)
   7030      This command fetches from a remote using an explicit refspec, both
   7031      of which are read from the minibuffer.
   7032 
   7033 ‘f a’ (‘magit-fetch-all’)
   7034      This command fetches from all remotes.
   7035 
   7036 ‘f m’ (‘magit-submodule-fetch’)
   7037      This command fetches all submodules.  With a prefix argument it
   7038      fetches all remotes of all submodules.
   7039 
   7040  -- User Option: magit-pull-or-fetch
   7041      By default fetch and pull commands are available from separate
   7042      transient prefix command.  Setting this to ‘t’ adds some (but not
   7043      all) of the above suffix commands to the ‘magit-pull’ transient.
   7044 
   7045      If you do that, then you might also want to change the key binding
   7046      for these prefix commands, e.g.:
   7047 
   7048           (setq magit-pull-or-fetch t)
   7049           (define-key magit-mode-map "f" 'magit-pull) ; was magit-fetch
   7050           (define-key magit-mode-map "F" nil)         ; was magit-pull
   7051 
   7052 
   7053 File: magit.info,  Node: Pulling,  Next: Pushing,  Prev: Fetching,  Up: Transferring
   7054 
   7055 7.3 Pulling
   7056 ===========
   7057 
   7058 Also see *note (gitman)git-pull::.  For information about the upstream
   7059 and the push-remote, see *note The Two Remotes::.
   7060 
   7061 ‘F’ (‘magit-pull’)
   7062      This transient prefix command binds the following suffix commands
   7063      and displays them in a temporary buffer until a suffix is invoked.
   7064 
   7065 ‘F p’ (‘magit-pull-from-pushremote’)
   7066      This command pulls from the push-remote of the current branch.
   7067 
   7068      With a prefix argument or when the push-remote is either not
   7069      configured or unusable, then let the user first configure the
   7070      push-remote.
   7071 
   7072 ‘F u’ (‘magit-pull-from-upstream’)
   7073      This command pulls from the upstream of the current branch.
   7074 
   7075      With a prefix argument or when the upstream is either not
   7076      configured or unusable, then let the user first configure the
   7077      upstream.
   7078 
   7079 ‘F e’ (‘magit-pull-branch’)
   7080      This command pulls from a branch read in the minibuffer.
   7081 
   7082 
   7083 File: magit.info,  Node: Pushing,  Next: Plain Patches,  Prev: Pulling,  Up: Transferring
   7084 
   7085 7.4 Pushing
   7086 ===========
   7087 
   7088 Also see *note (gitman)git-push::.  For information about the upstream
   7089 and the push-remote, see *note The Two Remotes::.
   7090 
   7091 ‘P’ (‘magit-push’)
   7092      This transient prefix command binds the following suffix commands
   7093      along with the appropriate infix arguments and displays them in a
   7094      temporary buffer until a suffix is invoked.
   7095 
   7096 ‘P p’ (‘magit-push-current-to-pushremote’)
   7097      This command pushes the current branch to its push-remote.
   7098 
   7099      With a prefix argument or when the push-remote is either not
   7100      configured or unusable, then let the user first configure the
   7101      push-remote.
   7102 
   7103 ‘P u’ (‘magit-push-current-to-upstream’)
   7104      This command pushes the current branch to its upstream branch.
   7105 
   7106      With a prefix argument or when the upstream is either not
   7107      configured or unusable, then let the user first configure the
   7108      upstream.
   7109 
   7110 ‘P e’ (‘magit-push-current’)
   7111      This command pushes the current branch to a branch read in the
   7112      minibuffer.
   7113 
   7114 ‘P o’ (‘magit-push-other’)
   7115      This command pushes an arbitrary branch or commit somewhere.  Both
   7116      the source and the target are read in the minibuffer.
   7117 
   7118 ‘P r’ (‘magit-push-refspecs’)
   7119      This command pushes one or multiple refspecs to a remote, both of
   7120      which are read in the minibuffer.
   7121 
   7122      To use multiple refspecs, separate them with commas.  Completion is
   7123      only available for the part before the colon, or when no colon is
   7124      used.
   7125 
   7126 ‘P m’ (‘magit-push-matching’)
   7127      This command pushes all matching branches to another repository.
   7128 
   7129      If only one remote exists, then push to that.  Otherwise prompt for
   7130      a remote, offering the remote configured for the current branch as
   7131      default.
   7132 
   7133 ‘P t’ (‘magit-push-tags’)
   7134      This command pushes all tags to another repository.
   7135 
   7136      If only one remote exists, then push to that.  Otherwise prompt for
   7137      a remote, offering the remote configured for the current branch as
   7138      default.
   7139 
   7140 ‘P T’ (‘magit-push-tag’)
   7141      This command pushes a tag to another repository.
   7142 
   7143    One of the infix arguments, ‘--force-with-lease’, deserves a word of
   7144 caution.  It is passed without a value, which means "permit a force push
   7145 as long as the remote-tracking branches match their counterparts on the
   7146 remote end".  If you’ve set up a tool to do automatic fetches (Magit
   7147 itself does not provide such functionality), using ‘--force-with-lease’
   7148 can be dangerous because you don’t actually control or know the state of
   7149 the remote-tracking refs.  In that case, you should consider setting
   7150 ‘push.useForceIfIncludes’ to ‘true’ (available since Git 2.30).
   7151 
   7152    Two more push commands exist, which by default are not available from
   7153 the push transient.  See their doc-strings for instructions on how to
   7154 add them to the transient.
   7155 
   7156  -- Command: magit-push-implicitly args
   7157      This command pushes somewhere without using an explicit refspec.
   7158 
   7159      This command simply runs ‘git push -v [ARGS]’.  ARGS are the infix
   7160      arguments.  No explicit refspec arguments are used.  Instead the
   7161      behavior depends on at least these Git variables: ‘push.default’,
   7162      ‘remote.pushDefault’, ‘branch.<branch>.pushRemote’,
   7163      ‘branch.<branch>.remote’, ‘branch.<branch>.merge’, and
   7164      ‘remote.<remote>.push’.
   7165 
   7166      If you add this suffix to a transient prefix without explicitly
   7167      specifying the description, then an attempt is made to predict what
   7168      this command will do.  For example:
   7169 
   7170           (transient-insert-suffix 'magit-push \"p\"
   7171             '(\"i\" magit-push-implicitly))"
   7172 
   7173  -- Command: magit-push-to-remote remote args
   7174      This command pushes to the remote REMOTE without using an explicit
   7175      refspec.  The remote is read in the minibuffer.
   7176 
   7177      This command simply runs ‘git push -v [ARGS] REMOTE’.  ARGS are the
   7178      infix arguments.  No refspec arguments are used.  Instead the
   7179      behavior depends on at least these Git variables: ‘push.default’,
   7180      ‘remote.pushDefault’, ‘branch.<branch>.pushRemote’,
   7181      ‘branch.<branch>.remote’, ‘branch.<branch>.merge’, and
   7182      ‘remote.<remote>.push’.
   7183 
   7184 
   7185 File: magit.info,  Node: Plain Patches,  Next: Maildir Patches,  Prev: Pushing,  Up: Transferring
   7186 
   7187 7.5 Plain Patches
   7188 =================
   7189 
   7190 ‘W’ (‘magit-patch’)
   7191      This transient prefix command binds the following suffix commands
   7192      along with the appropriate infix arguments and displays them in a
   7193      temporary buffer until a suffix is invoked.
   7194 
   7195 ‘W c’ (‘magit-patch-create’)
   7196      This command creates patches for a set commits.  If the region
   7197      marks several commits, then it creates patches for all of them.
   7198      Otherwise it functions as a transient prefix command, which
   7199      features several infix arguments and binds itself as a suffix
   7200      command.  When this command is invoked as a suffix of itself, then
   7201      it creates a patch using the specified infix arguments.
   7202 
   7203 ‘w a’ (‘magit-patch-apply’)
   7204      This command applies a patch.  This is a transient prefix command,
   7205      which features several infix arguments and binds itself as a suffix
   7206      command.  When this command is invoked as a suffix of itself, then
   7207      it applies a patch using the specified infix arguments.
   7208 
   7209 ‘W s’ (‘magit-patch-save’)
   7210      This command creates a patch from the current diff.
   7211 
   7212      Inside ‘magit-diff-mode’ or ‘magit-revision-mode’ buffers, ‘C-x
   7213      C-w’ is also bound to this command.
   7214 
   7215    It is also possible to save a plain patch file by using ‘C-x C-w’
   7216 inside a ‘magit-diff-mode’ or ‘magit-revision-mode’ buffer.
   7217 
   7218 
   7219 File: magit.info,  Node: Maildir Patches,  Prev: Plain Patches,  Up: Transferring
   7220 
   7221 7.6 Maildir Patches
   7222 ===================
   7223 
   7224 Also see *note (gitman)git-am::.  and *note (gitman)git-apply::.
   7225 
   7226 ‘w’ (‘magit-am’)
   7227      This transient prefix command binds the following suffix commands
   7228      along with the appropriate infix arguments and displays them in a
   7229      temporary buffer until a suffix is invoked.
   7230 
   7231 ‘w w’ (‘magit-am-apply-patches’)
   7232      This command applies one or more patches.  If the region marks
   7233      files, then those are applied as patches.  Otherwise this command
   7234      reads a file-name in the minibuffer, defaulting to the file at
   7235      point.
   7236 
   7237 ‘w m’ (‘magit-am-apply-maildir’)
   7238      This command applies patches from a maildir.
   7239 
   7240 ‘w a’ (‘magit-patch-apply’)
   7241      This command applies a plain patch.  For a longer description see
   7242      *note Plain Patches::.  This command is only available from the
   7243      ‘magit-am’ transient for historic reasons.
   7244 
   7245    When an "am" operation is in progress, then the transient instead
   7246 features the following suffix commands.
   7247 
   7248 ‘w w’ (‘magit-am-continue’)
   7249      This command resumes the current patch applying sequence.
   7250 
   7251 ‘w s’ (‘magit-am-skip’)
   7252      This command skips the stopped at patch during a patch applying
   7253      sequence.
   7254 
   7255 ‘w a’ (‘magit-am-abort’)
   7256      This command aborts the current patch applying sequence.  This
   7257      discards all changes made since the sequence started.
   7258 
   7259 
   7260 File: magit.info,  Node: Miscellaneous,  Next: Customizing,  Prev: Transferring,  Up: Top
   7261 
   7262 8 Miscellaneous
   7263 ***************
   7264 
   7265 * Menu:
   7266 
   7267 * Tagging::
   7268 * Notes::
   7269 * Submodules::
   7270 * Subtree::
   7271 * Worktree::
   7272 * Sparse checkouts::
   7273 * Bundle::
   7274 * Common Commands::
   7275 * Wip Modes::
   7276 * Commands for Buffers Visiting Files::
   7277 * Minor Mode for Buffers Visiting Blobs::
   7278 
   7279 
   7280 File: magit.info,  Node: Tagging,  Next: Notes,  Up: Miscellaneous
   7281 
   7282 8.1 Tagging
   7283 ===========
   7284 
   7285 Also see *note (gitman)git-tag::.
   7286 
   7287 ‘t’ (‘magit-tag’)
   7288      This transient prefix command binds the following suffix commands
   7289      along with the appropriate infix arguments and displays them in a
   7290      temporary buffer until a suffix is invoked.
   7291 
   7292 ‘t t’ (‘magit-tag-create’)
   7293      This command creates a new tag with the given NAME at REV.  With a
   7294      prefix argument it creates an annotated tag.
   7295 
   7296 ‘t r’ (‘magit-tag-release’)
   7297      This commands creates a release tag.  It assumes that release tags
   7298      match ‘magit-release-tag-regexp’.
   7299 
   7300      First it prompts for the name of the new tag using the highest
   7301      existing tag as initial input and leaving it to the user to
   7302      increment the desired part of the version string.  If you use
   7303      unconventional release tags or version numbers (e.g.,
   7304      ‘v1.2.3-custom.1’), you can set the ‘magit-release-tag-regexp’ and
   7305      ‘magit-tag-version-regexp-alist’ variables.
   7306 
   7307      If ‘--annotate’ is enabled then it prompts for the message of the
   7308      new tag.  The proposed tag message is based on the message of the
   7309      highest tag, provided that that contains the corresponding version
   7310      string and substituting the new version string for that.  Otherwise
   7311      it proposes something like "Foo-Bar 1.2.3", given, for example, a
   7312      TAG "v1.2.3" and a repository located at something like
   7313      "/path/to/foo-bar".
   7314 
   7315 ‘t k’ (‘magit-tag-delete’)
   7316      This command deletes one or more tags.  If the region marks
   7317      multiple tags (and nothing else), then it offers to delete those.
   7318      Otherwise, it prompts for a single tag to be deleted, defaulting to
   7319      the tag at point.
   7320 
   7321 ‘t p’ (‘magit-tag-prune’)
   7322      This command offers to delete tags missing locally from REMOTE, and
   7323      vice versa.
   7324 
   7325 
   7326 File: magit.info,  Node: Notes,  Next: Submodules,  Prev: Tagging,  Up: Miscellaneous
   7327 
   7328 8.2 Notes
   7329 =========
   7330 
   7331 Also see *note (gitman)git-notes::.
   7332 
   7333 ‘T’ (‘magit-notes’)
   7334      This transient prefix command binds the following suffix commands
   7335      along with the appropriate infix arguments and displays them in a
   7336      temporary buffer until a suffix is invoked.
   7337 
   7338 ‘T T’ (‘magit-notes-edit’)
   7339      Edit the note attached to a commit, defaulting to the commit at
   7340      point.
   7341 
   7342      By default use the value of Git variable ‘core.notesRef’ or
   7343      "refs/notes/commits" if that is undefined.
   7344 
   7345 ‘T r’ (‘magit-notes-remove’)
   7346      Remove the note attached to a commit, defaulting to the commit at
   7347      point.
   7348 
   7349      By default use the value of Git variable ‘core.notesRef’ or
   7350      "refs/notes/commits" if that is undefined.
   7351 
   7352 ‘T p’ (‘magit-notes-prune’)
   7353      Remove notes about unreachable commits.
   7354 
   7355    It is possible to merge one note ref into another.  That may result
   7356 in conflicts which have to resolved in the temporary worktree
   7357 ".git/NOTES_MERGE_WORKTREE".
   7358 
   7359 ‘T m’ (‘magit-notes-merge’)
   7360      Merge the notes of a ref read from the user into the current notes
   7361      ref.  The current notes ref is the value of Git variable
   7362      ‘core.notesRef’ or "refs/notes/commits" if that is undefined.
   7363 
   7364    When a notes merge is in progress then the transient features the
   7365 following suffix commands, instead of those listed above.
   7366 
   7367 ‘T c’ (‘magit-notes-merge-commit’)
   7368      Commit the current notes ref merge, after manually resolving
   7369      conflicts.
   7370 
   7371 ‘T a’ (‘magit-notes-merge-abort’)
   7372      Abort the current notes ref merge.
   7373 
   7374    The following variables control what notes reference ‘magit-notes-*’,
   7375 ‘git notes’ and ‘git show’ act on and display.  Both the local and
   7376 global values are displayed and can be modified.
   7377 
   7378  -- Variable: core.notesRef
   7379      This variable specifies the notes ref that is displayed by default
   7380      and which commands act on by default.
   7381 
   7382  -- Variable: notes.displayRef
   7383      This variable specifies additional notes ref to be displayed in
   7384      addition to the ref specified by ‘core.notesRef’.  It can have
   7385      multiple values and may end with ‘*’ to display all refs in the
   7386      ‘refs/notes/’ namespace (or ‘**’ if some names contain slashes).
   7387 
   7388 
   7389 File: magit.info,  Node: Submodules,  Next: Subtree,  Prev: Notes,  Up: Miscellaneous
   7390 
   7391 8.3 Submodules
   7392 ==============
   7393 
   7394 Also see *note (gitman)git-submodule::.
   7395 
   7396 * Menu:
   7397 
   7398 * Listing Submodules::
   7399 * Submodule Transient::
   7400 
   7401 
   7402 File: magit.info,  Node: Listing Submodules,  Next: Submodule Transient,  Up: Submodules
   7403 
   7404 8.3.1 Listing Submodules
   7405 ------------------------
   7406 
   7407 The command ‘magit-list-submodules’ displays a list of the current
   7408 repository’s submodules in a separate buffer.  It’s also possible to
   7409 display information about submodules directly in the status buffer of
   7410 the super-repository by adding ‘magit-insert-modules’ to the hook
   7411 ‘magit-status-sections-hook’ as described in *note Status Module
   7412 Sections::.
   7413 
   7414  -- Command: magit-list-submodules
   7415      This command displays a list of the current repository’s populated
   7416      submodules in a separate buffer.
   7417 
   7418      It can be invoked by pressing ‘RET’ on the section titled
   7419      "Modules".
   7420 
   7421  -- User Option: magit-submodule-list-columns
   7422      This option controls what columns are displayed by the command
   7423      ‘magit-list-submodules’ and how they are displayed.
   7424 
   7425      Each element has the form ‘(HEADER WIDTH FORMAT PROPS)’.
   7426 
   7427      HEADER is the string displayed in the header.  WIDTH is the width
   7428      of the column.  FORMAT is a function that is called with one
   7429      argument, the repository identification (usually its basename), and
   7430      with ‘default-directory’ bound to the toplevel of its working tree.
   7431      It has to return a string to be inserted or nil.  PROPS is an alist
   7432      that supports the keys ‘:right-align’, ‘:pad-right’ and ‘:sort’.
   7433 
   7434      The ‘:sort’ function has a weird interface described in the
   7435      docstring of ‘tabulated-list--get-sort’.  Alternatively ‘<’ and
   7436      ‘magit-repolist-version<’ can be used as those functions are
   7437      automatically replaced with functions that satisfy the interface.
   7438      Set ‘:sort’ to ‘nil’ to inhibit sorting; if unspecified, then the
   7439      column is sortable using the default sorter.
   7440 
   7441      You may wish to display a range of numeric columns using just one
   7442      character per column and without any padding between columns, in
   7443      which case you should use an appropriate HEADER, set WIDTH to 1,
   7444      and set ‘:pad-right’ to 9.  ‘+’ is substituted for numbers higher
   7445      than 9.
   7446 
   7447 
   7448 File: magit.info,  Node: Submodule Transient,  Prev: Listing Submodules,  Up: Submodules
   7449 
   7450 8.3.2 Submodule Transient
   7451 -------------------------
   7452 
   7453 ‘o’ (‘magit-submodule’)
   7454      This transient prefix command binds the following suffix commands
   7455      along with the appropriate infix arguments and displays them in a
   7456      temporary buffer until a suffix is invoked.
   7457 
   7458    Some of the below commands default to act on the modules that are
   7459 selected using the region.  For brevity their description talk about
   7460 "the selected modules", but if no modules are selected, then they act on
   7461 the current module instead, or if point isn’t on a module, then the read
   7462 a single module to act on.  With a prefix argument these commands ignore
   7463 the selection and the current module and instead act on all suitable
   7464 modules.
   7465 
   7466 ‘o a’ (‘magit-submodule-add’)
   7467      This commands adds the repository at URL as a module.  Optional
   7468      PATH is the path to the module relative to the root of the
   7469      super-project.  If it is nil then the path is determined based on
   7470      URL.
   7471 
   7472 ‘o r’ (‘magit-submodule-register’)
   7473      This command registers the selected modules by copying their urls
   7474      from ".gitmodules" to "$GIT_DIR/config".  These values can then be
   7475      edited before running ‘magit-submodule-populate’.  If you don’t
   7476      need to edit any urls, then use the latter directly.
   7477 
   7478 ‘o p’ (‘magit-submodule-populate’)
   7479      This command creates the working directory or directories of the
   7480      selected modules, checking out the recorded commits.
   7481 
   7482 ‘o u’ (‘magit-submodule-update’)
   7483      This command updates the selected modules checking out the recorded
   7484      commits.
   7485 
   7486 ‘o s’ (‘magit-submodule-synchronize’)
   7487      This command synchronizes the urls of the selected modules, copying
   7488      the values from ".gitmodules" to the ".git/config" of the
   7489      super-project as well those of the modules.
   7490 
   7491 ‘o d’ (‘magit-submodule-unpopulate’)
   7492      This command removes the working directory of the selected modules.
   7493 
   7494 ‘o l’ (‘magit-list-submodules’)
   7495      This command displays a list of the current repository’s modules.
   7496 
   7497 ‘o f’ (‘magit-fetch-modules’)
   7498      This command fetches all populated modules.
   7499 
   7500      Option ‘magit-fetch-modules-jobs’ controls how many submodules are
   7501      being fetched in parallel.  Also fetch the super-repository,
   7502      because ‘git fetch’ does not support not doing that.  With a prefix
   7503      argument fetch all remotes.
   7504 
   7505 
   7506 File: magit.info,  Node: Subtree,  Next: Worktree,  Prev: Submodules,  Up: Miscellaneous
   7507 
   7508 8.4 Subtree
   7509 ===========
   7510 
   7511 Also see *note (gitman)git-subtree::.
   7512 
   7513 ‘O’ (‘magit-subtree’)
   7514      This transient prefix command binds the two sub-transients; one for
   7515      importing a subtree and one for exporting a subtree.
   7516 
   7517 ‘O i’ (‘magit-subtree-import’)
   7518      This transient prefix command binds the following suffix commands
   7519      along with the appropriate infix arguments and displays them in a
   7520      temporary buffer until a suffix is invoked.
   7521 
   7522      The suffixes of this command import subtrees.
   7523 
   7524      If the ‘--prefix’ argument is set, then the suffix commands use
   7525      that prefix without prompting the user.  If it is unset, then they
   7526      read the prefix in the minibuffer.
   7527 
   7528 ‘O i a’ (‘magit-subtree-add’)
   7529      This command adds COMMIT from REPOSITORY as a new subtree at
   7530      PREFIX.
   7531 
   7532 ‘O i c’ (‘magit-subtree-add-commit’)
   7533      This command add COMMIT as a new subtree at PREFIX.
   7534 
   7535 ‘O i m’ (‘magit-subtree-merge’)
   7536      This command merges COMMIT into the PREFIX subtree.
   7537 
   7538 ‘O i f’ (‘magit-subtree-pull’)
   7539      This command pulls COMMIT from REPOSITORY into the PREFIX subtree.
   7540 
   7541 ‘O e’ (‘magit-subtree-export’)
   7542      This transient prefix command binds the following suffix commands
   7543      along with the appropriate infix arguments and displays them in a
   7544      temporary buffer until a suffix is invoked.
   7545 
   7546      The suffixes of this command export subtrees.
   7547 
   7548      If the ‘--prefix’ argument is set, then the suffix commands use
   7549      that prefix without prompting the user.  If it is unset, then they
   7550      read the prefix in the minibuffer.
   7551 
   7552 ‘O e p’ (‘magit-subtree-push’)
   7553      This command extract the history of the subtree PREFIX and pushes
   7554      it to REF on REPOSITORY.
   7555 
   7556 ‘O e s’ (‘magit-subtree-split’)
   7557      This command extracts the history of the subtree PREFIX.
   7558 
   7559 
   7560 File: magit.info,  Node: Worktree,  Next: Sparse checkouts,  Prev: Subtree,  Up: Miscellaneous
   7561 
   7562 8.5 Worktree
   7563 ============
   7564 
   7565 Also see *note (gitman)git-worktree::.
   7566 
   7567 ‘Z’ (‘magit-worktree’)
   7568      This transient prefix command binds the following suffix commands
   7569      and displays them in a temporary buffer until a suffix is invoked.
   7570 
   7571 ‘Z b’ (‘magit-worktree-checkout’)
   7572      Checkout BRANCH in a new worktree at PATH.
   7573 
   7574 ‘Z c’ (‘magit-worktree-branch’)
   7575      Create a new BRANCH and check it out in a new worktree at PATH.
   7576 
   7577 ‘Z m’ (‘magit-worktree-move’)
   7578      Move an existing worktree to a new PATH.
   7579 
   7580 ‘Z k’ (‘magit-worktree-delete’)
   7581      Delete a worktree, defaulting to the worktree at point.  The
   7582      primary worktree cannot be deleted.
   7583 
   7584 ‘Z g’ (‘magit-worktree-status’)
   7585      Show the status for the worktree at point.
   7586 
   7587      If there is no worktree at point, then read one in the minibuffer.
   7588      If the worktree at point is the one whose status is already being
   7589      displayed in the current buffer, then show it in Dired instead.
   7590 
   7591 
   7592 File: magit.info,  Node: Sparse checkouts,  Next: Bundle,  Prev: Worktree,  Up: Miscellaneous
   7593 
   7594 8.6 Sparse checkouts
   7595 ====================
   7596 
   7597 Sparse checkouts provide a way to restrict the working tree to a subset
   7598 of directories.  See *note (gitman)git-sparse-checkout::.
   7599 
   7600    *Warning*: Git introduced the ‘git sparse-checkout’ command in
   7601 version 2.25 and still advertises it as experimental and subject to
   7602 change.  Magit’s interface should be considered the same.  In
   7603 particular, if Git introduces a backward incompatible change, Magit’s
   7604 sparse checkout functionality may be updated in a way that requires a
   7605 more recent Git version.
   7606 
   7607 ‘>’ (‘magit-sparse-checkout’)
   7608      This transient prefix command binds the following suffix commands
   7609      and displays them in a temporary buffer until a suffix is invoked.
   7610 
   7611 ‘> e’ (‘magit-sparse-checkout-enable’)
   7612      This command initializes a sparse checkout that includes only the
   7613      files in the top-level directory.
   7614 
   7615      Note that ‘magit-sparse-checkout-set’ and
   7616      ‘magit-sparse-checkout-add’ automatically initialize a sparse
   7617      checkout if necessary.  However, you may want to call
   7618      ‘magit-sparse-checkout-enable’ explicitly to re-initialize a sparse
   7619      checkout after calling ‘magit-sparse-checkout-disable’, to pass
   7620      additional arguments to ‘git sparse-checkout init’, or to execute
   7621      the initialization asynchronously.
   7622 
   7623 ‘> s’ (‘magit-sparse-checkout-set’)
   7624      This command takes a list of directories and configures the sparse
   7625      checkout to include only files in those subdirectories.  Any
   7626      previously included directories are excluded unless they are in the
   7627      provided list of directories.
   7628 
   7629 ‘> a’ (‘magit-sparse-checkout-add’)
   7630      This command is like ‘magit-sparse-checkout-set’, but instead adds
   7631      the specified list of directories to the set of directories that is
   7632      already included in the sparse checkout.
   7633 
   7634 ‘> r’ (‘magit-sparse-checkout-reapply’)
   7635      This command applies the currently configured sparse checkout
   7636      patterns to the working tree.  This is useful to call if excluded
   7637      files have been checked out after operations such as merging or
   7638      rebasing.
   7639 
   7640 ‘> d’ (‘magit-sparse-checkout-disable’)
   7641      This command restores the full checkout.  To return to the previous
   7642      sparse checkout, call ‘magit-sparse-checkout-enable’.
   7643 
   7644    A sparse checkout can also be initiated when cloning a repository by
   7645 using the ‘magit-clone-sparse’ command in the ‘magit-clone’ transient
   7646 (see *note Cloning Repository::).
   7647 
   7648    If you want the status buffer to indicate when a sparse checkout is
   7649 enabled, add the function ‘magit-sparse-checkout-insert-header’ to
   7650 ‘magit-status-headers-hook’.
   7651 
   7652 
   7653 File: magit.info,  Node: Bundle,  Next: Common Commands,  Prev: Sparse checkouts,  Up: Miscellaneous
   7654 
   7655 8.7 Bundle
   7656 ==========
   7657 
   7658 Also see *note (gitman)git-bundle::.
   7659 
   7660  -- Command: magit-bundle
   7661      This transient prefix command binds several suffix commands for
   7662      running ‘git bundle’ subcommands and displays them in a temporary
   7663      buffer until a suffix is invoked.
   7664 
   7665 
   7666 File: magit.info,  Node: Common Commands,  Next: Wip Modes,  Prev: Bundle,  Up: Miscellaneous
   7667 
   7668 8.8 Common Commands
   7669 ===================
   7670 
   7671  -- Command: magit-switch-to-repository-buffer
   7672  -- Command: magit-switch-to-repository-buffer-other-window
   7673  -- Command: magit-switch-to-repository-buffer-other-frame
   7674  -- Command: magit-display-repository-buffer
   7675      These commands read any existing Magit buffer that belongs to the
   7676      current repository from the user and then switch to the selected
   7677      buffer (without refreshing it).
   7678 
   7679      The last variant uses ‘magit-display-buffer’ to do so and thus
   7680      respects ‘magit-display-buffer-function’.
   7681 
   7682    These are some of the commands that can be used in all buffers whose
   7683 major-modes derive from ‘magit-mode’.  There are other common commands
   7684 beside the ones below, but these didn’t fit well anywhere else.
   7685 
   7686 ‘C-w’ (‘magit-copy-section-value’)
   7687      This command saves the value of the current section to the
   7688      ‘kill-ring’, and, provided that the current section is a commit,
   7689      branch, or tag section, it also pushes the (referenced) revision to
   7690      the ‘magit-revision-stack’.
   7691 
   7692      When the current section is a branch or a tag, and a prefix
   7693      argument is used, then it saves the revision at its tip to the
   7694      ‘kill-ring’ instead of the reference name.
   7695 
   7696      When the region is active, this command saves that to the
   7697      ‘kill-ring’, like ‘kill-ring-save’ would, instead of behaving as
   7698      described above.  If a prefix argument is used and the region is
   7699      within a hunk, then it strips the diff marker column and keeps only
   7700      either the added or removed lines, depending on the sign of the
   7701      prefix argument.
   7702 
   7703 ‘M-w’ (‘magit-copy-buffer-revision’)
   7704      This command saves the revision being displayed in the current
   7705      buffer to the ‘kill-ring’ and also pushes it to the
   7706      ‘magit-revision-stack’.  It is mainly intended for use in
   7707      ‘magit-revision-mode’ buffers, the only buffers where it is always
   7708      unambiguous exactly which revision should be saved.
   7709 
   7710      Most other Magit buffers usually show more than one revision, in
   7711      some way or another, so this command has to select one of them, and
   7712      that choice might not always be the one you think would have been
   7713      the best pick.
   7714 
   7715    Outside of Magit ‘M-w’ and ‘C-w’ are usually bound to
   7716 ‘kill-ring-save’ and ‘kill-region’, and these commands would also be
   7717 useful in Magit buffers.  Therefore when the region is active, then both
   7718 of these commands behave like ‘kill-ring-save’ instead of as described
   7719 above.
   7720 
   7721 
   7722 File: magit.info,  Node: Wip Modes,  Next: Commands for Buffers Visiting Files,  Prev: Common Commands,  Up: Miscellaneous
   7723 
   7724 8.9 Wip Modes
   7725 =============
   7726 
   7727 Git keeps *committed* changes around long enough for users to recover
   7728 changes they have accidentally deleted.  It does so by not garbage
   7729 collecting any committed but no longer referenced objects for a certain
   7730 period of time, by default 30 days.
   7731 
   7732    But Git does *not* keep track of *uncommitted* changes in the working
   7733 tree and not even the index (the staging area).  Because Magit makes it
   7734 so convenient to modify uncommitted changes, it also makes it easy to
   7735 shoot yourself in the foot in the process.
   7736 
   7737    For that reason Magit provides a global mode that saves *tracked*
   7738 files to work-in-progress references after or before certain actions.
   7739 (At present untracked files are never saved and for technical reasons
   7740 nothing is saved before the first commit has been created).
   7741 
   7742    Two separate work-in-progress references are used to track the state
   7743 of the index and of the working tree: ‘refs/wip/index/<branchref>’ and
   7744 ‘refs/wip/wtree/<branchref>’, where ‘<branchref>’ is the full ref of the
   7745 current branch, e.g., ‘refs/heads/master’.  When the ‘HEAD’ is detached
   7746 then ‘HEAD’ is used in place of ‘<branchref>’.
   7747 
   7748    Checking out another branch (or detaching ‘HEAD’) causes the use of
   7749 different wip refs for subsequent changes.
   7750 
   7751  -- User Option: magit-wip-mode
   7752      When this mode is enabled, then uncommitted changes are committed
   7753      to dedicated work-in-progress refs whenever appropriate (i.e., when
   7754      dataloss would be a possibility otherwise).
   7755 
   7756      Setting this variable directly does not take effect; either use the
   7757      Custom interface to do so or call the respective mode function.
   7758 
   7759      For historic reasons this mode is implemented on top of four other
   7760      ‘magit-wip-*’ modes, which can also be used individually, if you
   7761      want finer control over when the wip refs are updated; but that is
   7762      discouraged.  See *note Legacy Wip Modes::.
   7763 
   7764    To view the log for a branch and its wip refs use the commands
   7765 ‘magit-wip-log’ and ‘magit-wip-log-current’.  You should use ‘--graph’
   7766 when using these commands.
   7767 
   7768  -- Command: magit-wip-log
   7769      This command shows the log for a branch and its wip refs.  With a
   7770      negative prefix argument only the worktree wip ref is shown.
   7771 
   7772      The absolute numeric value of the prefix argument controls how many
   7773      "branches" of each wip ref are shown.  This is only relevant if the
   7774      value of ‘magit-wip-merge-branch’ is ‘nil’.
   7775 
   7776  -- Command: magit-wip-log-current
   7777      This command shows the log for the current branch and its wip refs.
   7778      With a negative prefix argument only the worktree wip ref is shown.
   7779 
   7780      The absolute numeric value of the prefix argument controls how many
   7781      "branches" of each wip ref are shown.  This is only relevant if the
   7782      value of ‘magit-wip-merge-branch’ is ‘nil’.
   7783 
   7784 ‘X w’ (‘magit-reset-worktree’)
   7785      This command resets the working tree to some commit read from the
   7786      user and defaulting to the commit at point, while keeping the
   7787      ‘HEAD’ and index as-is.
   7788 
   7789      This can be used to restore files to the state committed to a wip
   7790      ref.  Note that this will discard any unstaged changes that might
   7791      have existed before invoking this command (but of course only after
   7792      committing that to the working tree wip ref).
   7793 
   7794    Note that even if you enable ‘magit-wip-mode’ this won’t give you
   7795 perfect protection.  The most likely scenario for losing changes despite
   7796 the use of ‘magit-wip-mode’ is making a change outside Emacs and then
   7797 destroying it also outside Emacs.  In some such a scenario, Magit, being
   7798 an Emacs package, didn’t get the opportunity to keep you from shooting
   7799 yourself in the foot.
   7800 
   7801    When you are unsure whether Magit did commit a change to the wip
   7802 refs, then you can explicitly request that all changes to all tracked
   7803 files are being committed.
   7804 
   7805 ‘M-x magit-wip-commit’
   7806      This command commits all changes to all tracked files to the index
   7807      and working tree work-in-progress refs.  Like the modes described
   7808      above, it does not commit untracked files, but it does check all
   7809      tracked files for changes.  Use this command when you suspect that
   7810      the modes might have overlooked a change made outside Emacs/Magit.
   7811 
   7812  -- User Option: magit-wip-namespace
   7813      The namespace used for work-in-progress refs.  It has to end with a
   7814      slash.  The wip refs are named ‘<namespace>index/<branchref>’ and
   7815      ‘<namespace>wtree/<branchref>’.  When snapshots are created while
   7816      the ‘HEAD’ is detached then ‘HEAD’ is used in place of
   7817      ‘<branchref>’.
   7818 
   7819  -- User Option: magit-wip-mode-lighter
   7820      Mode-line lighter for ‘magit-wip--mode’.
   7821 
   7822 * Menu:
   7823 
   7824 * Wip Graph::
   7825 * Legacy Wip Modes::
   7826 
   7827 
   7828 File: magit.info,  Node: Wip Graph,  Next: Legacy Wip Modes,  Up: Wip Modes
   7829 
   7830 8.9.1 Wip Graph
   7831 ---------------
   7832 
   7833  -- User Option: magit-wip-merge-branch
   7834      This option controls whether the current branch is merged into the
   7835      wip refs after a new commit was created on the branch.
   7836 
   7837      If non-nil and the current branch has new commits, then it is
   7838      merged into the wip ref before creating a new wip commit.  This
   7839      makes it easier to inspect wip history and the wip commits are
   7840      never garbage collected.
   7841 
   7842      If nil and the current branch has new commits, then the wip ref is
   7843      reset to the tip of the branch before creating a new wip commit.
   7844      With this setting wip commits are eventually garbage collected.
   7845 
   7846    When ‘magit-wip-merge-branch’ is ‘t’, then the history looks like
   7847 this:
   7848 
   7849        *--*--*--*--*--*       refs/wip/index/refs/heads/master
   7850       /     /     /
   7851      A-----B-----C            refs/heads/master
   7852 
   7853    When ‘magit-wip-merge-branch’ is ‘nil’, then creating a commit on the
   7854 real branch and then making a change causes the wip refs to be recreated
   7855 to fork from the new commit.  But the old commits on the wip refs are
   7856 not lost.  They are still available from the reflog.  To make it easier
   7857 to see when the fork point of a wip ref was changed, an additional
   7858 commit with the message "restart autosaving" is created on it (‘xxO’
   7859 commits below are such boundary commits).
   7860 
   7861    Starting with
   7862 
   7863            BI0---BI1    refs/wip/index/refs/heads/master
   7864           /
   7865      A---B              refs/heads/master
   7866           \
   7867            BW0---BW1    refs/wip/wtree/refs/heads/master
   7868 
   7869    and committing the staged changes and editing and saving a file would
   7870 result in
   7871 
   7872            BI0---BI1        refs/wip/index/refs/heads/master
   7873           /
   7874      A---B---C              refs/heads/master
   7875           \   \
   7876            \   CW0---CW1    refs/wip/wtree/refs/heads/master
   7877             \
   7878              BW0---BW1      refs/wip/wtree/refs/heads/master@{2}
   7879 
   7880    The fork-point of the index wip ref is not changed until some change
   7881 is being staged.  Likewise just checking out a branch or creating a
   7882 commit does not change the fork-point of the working tree wip ref.  The
   7883 fork-points are not adjusted until there actually is a change that
   7884 should be committed to the respective wip ref.
   7885 
   7886 
   7887 File: magit.info,  Node: Legacy Wip Modes,  Prev: Wip Graph,  Up: Wip Modes
   7888 
   7889 8.9.2 Legacy Wip Modes
   7890 ----------------------
   7891 
   7892 It is recommended that you use the mode ‘magit-wip-mode’ (which see) and
   7893 ignore the existence of the following modes, which are preserved for
   7894 historic reasons.
   7895 
   7896    Setting the following variables directly does not take effect; either
   7897 use the Custom interface to do so or call the respective mode functions.
   7898 
   7899  -- User Option: magit-wip-after-save-mode
   7900      When this mode is enabled, then saving a buffer that visits a file
   7901      tracked in a Git repository causes its current state to be
   7902      committed to the working tree wip ref for the current branch.
   7903 
   7904  -- User Option: magit-wip-after-apply-mode
   7905      When this mode is enabled, then applying (i.e., staging, unstaging,
   7906      discarding, reversing, and regularly applying) a change to a file
   7907      tracked in a Git repository causes its current state to be
   7908      committed to the index and/or working tree wip refs for the current
   7909      branch.
   7910 
   7911    If you only ever edit files using Emacs and only ever interact with
   7912 Git using Magit, then the above two modes should be enough to protect
   7913 each and every change from accidental loss.  In practice nobody does
   7914 that.  Two additional modes exists that do commit to the wip refs before
   7915 making changes that could cause the loss of earlier changes.
   7916 
   7917  -- User Option: magit-wip-before-change-mode
   7918      When this mode is enabled, then certain commands commit the
   7919      existing changes to the files they are about to make changes to.
   7920 
   7921  -- User Option: magit-wip-initial-backup-mode
   7922      When this mode is enabled, then the current version of a file is
   7923      committed to the worktree wip ref before the buffer visiting that
   7924      file is saved for the first time since the buffer was created.
   7925 
   7926      This backs up the same version of the file that ‘backup-buffer’
   7927      would save.  While ‘backup-buffer’ uses a backup file, this mode
   7928      uses the same worktree wip ref as used by the other Magit Wip
   7929      modes.  Like ‘backup-buffer’, it only does this once; unless you
   7930      kill the buffer and visit the file again only one backup will be
   7931      created per Emacs session.
   7932 
   7933      This mode ignores the variables that affect ‘backup-buffer’ and can
   7934      be used along-side that function, which is recommended because it
   7935      only backs up files that are tracked in a Git repository.
   7936 
   7937  -- User Option: magit-wip-after-save-local-mode-lighter
   7938      Mode-line lighter for ‘magit-wip-after-save-local-mode’.
   7939 
   7940  -- User Option: magit-wip-after-apply-mode-lighter
   7941      Mode-line lighter for ‘magit-wip-after-apply-mode’.
   7942 
   7943  -- User Option: magit-wip-before-change-mode-lighter
   7944      Mode-line lighter for ‘magit-wip-before-change-mode’.
   7945 
   7946  -- User Option: magit-wip-initial-backup-mode-lighter
   7947      Mode-line lighter for ‘magit-wip-initial-backup-mode’.
   7948 
   7949 
   7950 File: magit.info,  Node: Commands for Buffers Visiting Files,  Next: Minor Mode for Buffers Visiting Blobs,  Prev: Wip Modes,  Up: Miscellaneous
   7951 
   7952 8.10 Commands for Buffers Visiting Files
   7953 ========================================
   7954 
   7955 By default Magit defines a few global key bindings.  These bindings are
   7956 a compromise between providing no bindings at all and providing the
   7957 better bindings I would have liked to use instead.  Magit cannot provide
   7958 the set of recommended bindings by default because those key sequences
   7959 are stricktly reserved for bindings added by the user.  Also see *note
   7960 Global Bindings:: and *note (elisp)Key Binding Conventions::.
   7961 
   7962    To use the recommended bindings, add this to your init file and
   7963 restart Emacs.
   7964 
   7965      (setq magit-define-global-key-bindings 'recommended)
   7966 
   7967    If you don’t want Magit to add any bindings to the global keymap at
   7968 all, add this to your init file and restart Emacs.
   7969 
   7970      (setq magit-define-global-key-bindings nil)
   7971 
   7972 ‘C-c f’ (‘magit-file-dispatch’)
   7973 ‘C-c f s’ (‘magit-stage-file’)
   7974 ‘C-c f s’ (‘magit-stage-buffer-file’)
   7975 ‘C-c f u’ (‘magit-unstage-file’)
   7976 ‘C-c f u’ (‘magit-unstage-buffer-file’)
   7977 ‘C-c f , x’ (‘magit-file-untrack’)
   7978 ‘C-c f , r’ (‘magit-file-rename’)
   7979 ‘C-c f , k’ (‘magit-file-delete’)
   7980 ‘C-c f , c’ (‘magit-file-checkout’)
   7981 ‘C-c f D’ (‘magit-diff’)
   7982 ‘C-c f d’ (‘magit-diff-buffer-file’)
   7983 ‘C-c f L’ (‘magit-log’)
   7984 ‘C-c f l’ (‘magit-log-buffer-file’)
   7985 ‘C-c f t’ (‘magit-log-trace-definition’)
   7986 ‘C-c f M’ (‘magit-log-merged’)
   7987 ‘C-c f B’ (‘magit-blame’)
   7988 ‘C-c f b’ (‘magit-blame-additions’)
   7989 ‘C-c f r’ (‘magit-blame-removal’)
   7990 ‘C-c f f’ (‘magit-blame-reverse’)
   7991 ‘C-c f m’ (‘magit-blame-echo’)
   7992 ‘C-c f q’ (‘magit-blame-quit’)
   7993 ‘C-c f p’ (‘magit-blob-previous’)
   7994 ‘C-c f n’ (‘magit-blob-next’)
   7995 ‘C-c f v’ (‘magit-find-file’)
   7996 ‘C-c f V’ (‘magit-blob-visit-file’)
   7997 ‘C-c f g’ (‘magit-status-here’)
   7998 ‘C-c f G’ (‘magit-display-repository-buffer’)
   7999 ‘C-c f c’ (‘magit-commit’)
   8000 ‘C-c f e’ (‘magit-edit-line-commit’)
   8001      Each of these commands is documented individually right below,
   8002      alongside their default key bindings.  The bindings shown above are
   8003      the recommended bindings, which you can enable by following the
   8004      instructions further up.
   8005 
   8006 ‘C-c M-g’ (‘magit-file-dispatch’)
   8007      This transient prefix command binds the following suffix commands
   8008      and displays them in a temporary buffer until a suffix is invoked.
   8009 
   8010 ‘C-c M-g s’ (‘magit-stage-file’)
   8011 ‘C-c M-g s’ (‘magit-stage-buffer-file’)
   8012      Stage all changes to the file being visited in the current buffer.
   8013      When not visiting a file, then the first command is used, which
   8014      prompts for a file.
   8015 
   8016 ‘C-c M-g u’ (‘magit-unstage-file’)
   8017 ‘C-c M-g u’ (‘magit-unstage-buffer-file’)
   8018      Unstage all changes to the file being visited in the current
   8019      buffer.  When not visiting a file, then the first command is used,
   8020      which prompts for a file.
   8021 
   8022 ‘C-c M-g , x’ (‘magit-file-untrack’)
   8023      This command untracks a file read from the user, defaulting to the
   8024      visited file.
   8025 
   8026 ‘C-c M-g , r’ (‘magit-file-rename’)
   8027      This command renames a file read from the user, defaulting to the
   8028      visited file.
   8029 
   8030 ‘C-c M-g , k’ (‘magit-file-delete’)
   8031      This command deletes a file read from the user, defaulting to the
   8032      visited file.
   8033 
   8034 ‘C-c M-g , c’ (‘magit-file-checkout’)
   8035      This command updates a file in the working tree and index to the
   8036      contents from a revision.  Both the revision and file are read from
   8037      the user.
   8038 
   8039 ‘C-c M-g D’ (‘magit-diff’)
   8040      This transient prefix command binds several diff suffix commands
   8041      and infix arguments and displays them in a temporary buffer until a
   8042      suffix is invoked.  See *note Diffing::.
   8043 
   8044      This is the same command that ‘d’ is bound to in Magit buffers.  If
   8045      this command is invoked from a file-visiting buffer, then the
   8046      initial value of the option (‘--’) that limits the diff to certain
   8047      file(s) is set to the visited file.
   8048 
   8049 ‘C-c M-g d’ (‘magit-diff-buffer-file’)
   8050      This command shows the diff for the file of blob that the current
   8051      buffer visits.
   8052 
   8053  -- User Option: magit-diff-buffer-file-locked
   8054      This option controls whether ‘magit-diff-buffer-file’ uses a
   8055      dedicated buffer.  See *note Modes and Buffers::.
   8056 
   8057 ‘C-c M-g L’ (‘magit-log’)
   8058      This transient prefix command binds several log suffix commands and
   8059      infix arguments and displays them in a temporary buffer until a
   8060      suffix is invoked.  See *note Logging::.
   8061 
   8062      This is the same command that ‘l’ is bound to in Magit buffers.  If
   8063      this command is invoked from a file-visiting buffer, then the
   8064      initial value of the option (‘--’) that limits the log to certain
   8065      file(s) is set to the visited file.
   8066 
   8067 ‘C-c M-g l’ (‘magit-log-buffer-file’)
   8068      This command shows the log for the file of blob that the current
   8069      buffer visits.  Renames are followed when a prefix argument is used
   8070      or when ‘--follow’ is an active log argument.  When the region is
   8071      active, the log is restricted to the selected line range.
   8072 
   8073  -- User Option: magit-log-buffer-file-locked
   8074      This option controls whether ‘magit-log-buffer-file’ uses a
   8075      dedicated buffer.  See *note Modes and Buffers::.
   8076 
   8077 ‘C-c M-g t’ (‘magit-log-trace-definition’)
   8078      This command shows the log for the definition at point.
   8079 
   8080 ‘C-c M-g M’ (‘magit-log-merged’)
   8081      This command reads a commit and a branch in shows a log concerning
   8082      the merge of the former into the latter.  This shows multiple
   8083      commits even in case of a fast-forward merge.
   8084 
   8085 ‘C-c M-g B’ (‘magit-blame’)
   8086      This transient prefix command binds all blaming suffix commands
   8087      along with the appropriate infix arguments and displays them in a
   8088      temporary buffer until a suffix is invoked.
   8089 
   8090      For more information about this and the following commands also see
   8091      *note Blaming::.
   8092 
   8093      In addition to the ‘magit-blame’ sub-transient, the dispatch
   8094      transient also binds several blaming suffix commands directly.  See
   8095      *note Blaming:: for information about those commands and bindings.
   8096 
   8097 ‘C-c M-g p’ (‘magit-blob-previous’)
   8098      This command visits the previous blob which modified the current
   8099      file.
   8100 
   8101 ‘C-c M-g n’ (‘magit-blob-next’)
   8102      This command visits the next blob which modified the current file.
   8103 
   8104 ‘C-c M-g v’ (‘magit-find-file’)
   8105      This command reads a revision and file and visits the respective
   8106      blob.
   8107 
   8108 ‘C-c M-g V’ (‘magit-blob-visit-file’)
   8109      This command visits the file from the working tree, corresponding
   8110      to the current blob.  When visiting a blob or the version from the
   8111      index, then it goes to the same location in the respective file in
   8112      the working tree.
   8113 
   8114 ‘C-c M-g g’ (‘magit-status-here’)
   8115      This command displays the status of the current repository in a
   8116      buffer, like ‘magit-status’ does.  Additionally it tries to go to
   8117      the position in that buffer, which corresponds to the position in
   8118      the current file-visiting buffer (if any).
   8119 
   8120 ‘C-c M-g G’ (‘magit-display-repository-buffer’)
   8121      This command reads and displays a Magit buffer belonging to the
   8122      current repository, without refreshing it.
   8123 
   8124 ‘C-c M-g c’ (‘magit-commit’)
   8125      This transient prefix command binds the following suffix commands
   8126      along with the appropriate infix arguments and displays them in a
   8127      temporary buffer until a suffix is invoked.  See *note Initiating a
   8128      Commit::.
   8129 
   8130 ‘C-c M-g e’ (‘magit-edit-line-commit’)
   8131      This command makes the commit editable that added the current line.
   8132 
   8133      With a prefix argument it makes the commit editable that removes
   8134      the line, if any.  The commit is determined using ‘git blame’ and
   8135      made editable using ‘git rebase --interactive’ if it is reachable
   8136      from ‘HEAD’, or by checking out the commit (or a branch that points
   8137      at it) otherwise.
   8138 
   8139 
   8140 File: magit.info,  Node: Minor Mode for Buffers Visiting Blobs,  Prev: Commands for Buffers Visiting Files,  Up: Miscellaneous
   8141 
   8142 8.11 Minor Mode for Buffers Visiting Blobs
   8143 ==========================================
   8144 
   8145 The ‘magit-blob-mode’ enables certain Magit features in blob-visiting
   8146 buffers.  Such buffers can be created using ‘magit-find-file’ and some
   8147 of the commands mentioned below, which also take care of turning on this
   8148 minor mode.  Currently this mode only establishes a few key bindings,
   8149 but this might be extended.
   8150 
   8151 ‘p’ (‘magit-blob-previous’)
   8152      Visit the previous blob which modified the current file.
   8153 
   8154 ‘n’ (‘magit-blob-next’)
   8155      Visit the next blob which modified the current file.
   8156 
   8157 ‘q’ (‘magit-kill-this-buffer’)
   8158      Kill the current buffer.
   8159 
   8160 
   8161 File: magit.info,  Node: Customizing,  Next: Plumbing,  Prev: Miscellaneous,  Up: Top
   8162 
   8163 9 Customizing
   8164 *************
   8165 
   8166 Both Git and Emacs are highly customizable.  Magit is both a Git
   8167 porcelain as well as an Emacs package, so it makes sense to customize it
   8168 using both Git variables as well as Emacs options.  However this
   8169 flexibility doesn’t come without problems, including but not limited to
   8170 the following.
   8171 
   8172    • Some Git variables automatically have an effect in Magit without
   8173      requiring any explicit support.  Sometimes that is desirable - in
   8174      other cases, it breaks Magit.
   8175 
   8176      When a certain Git setting breaks Magit but you want to keep using
   8177      that setting on the command line, then that can be accomplished by
   8178      overriding the value for Magit only by appending something like
   8179      ‘("-c" "some.variable=compatible-value")’ to
   8180      ‘magit-git-global-arguments’.
   8181 
   8182    • Certain settings like ‘fetch.prune=true’ are respected by Magit
   8183      commands (because they simply call the respective Git command) but
   8184      their value is not reflected in the respective transient buffers.
   8185      In this case the ‘--prune’ argument in ‘magit-fetch’ might be
   8186      active or inactive, but that doesn’t keep the Git variable from
   8187      being honored by the suffix commands anyway.  So pruning might
   8188      happen despite the ‘--prune’ arguments being displayed in a way
   8189      that seems to indicate that no pruning will happen.
   8190 
   8191    I intend to address these and similar issues in a future release.
   8192 
   8193 * Menu:
   8194 
   8195 * Per-Repository Configuration::
   8196 * Essential Settings::
   8197 
   8198 
   8199 File: magit.info,  Node: Per-Repository Configuration,  Next: Essential Settings,  Up: Customizing
   8200 
   8201 9.1 Per-Repository Configuration
   8202 ================================
   8203 
   8204 Magit can be configured on a per-repository level using both Git
   8205 variables as well as Emacs options.
   8206 
   8207    To set a Git variable for one repository only, simply set it in
   8208 ‘/path/to/repo/.git/config’ instead of ‘$HOME/.gitconfig’ or
   8209 ‘/etc/gitconfig’.  See *note (gitman)git-config::.
   8210 
   8211    Similarly, Emacs options can be set for one repository only by
   8212 editing ‘/path/to/repo/.dir-locals.el’.  See *note (emacs)Directory
   8213 Variables::.  For example to disable automatic refreshes of
   8214 file-visiting buffers in just one huge repository use this:
   8215 
   8216    • ‘/path/to/huge/repo/.dir-locals.el’
   8217 
   8218           ((nil . ((magit-refresh-buffers . nil))))
   8219 
   8220    It might only be costly to insert certain information into Magit
   8221 buffers for repositories that are exceptionally large, in which case you
   8222 can disable the respective section inserters just for that repository:
   8223 
   8224    • ‘/path/to/tag/invested/repo/.dir-locals.el’
   8225 
   8226           ((magit-status-mode
   8227             . ((eval . (magit-disable-section-inserter 'magit-insert-tags-header)))))
   8228 
   8229  -- Function: magit-disable-section-inserter fn
   8230      This function disables the section inserter FN in the current
   8231      repository.  It is only intended for use in ‘.dir-locals.el’ and
   8232      ‘.dir-locals-2.el’.
   8233 
   8234    If you want to apply the same settings to several, but not all,
   8235 repositories then keeping the repository-local config files in sync
   8236 would quickly become annoying.  To avoid that you can create config
   8237 files for certain classes of repositories (e.g., "huge repositories")
   8238 and then include those files in the per-repository config files.  For
   8239 example:
   8240 
   8241    • ‘/path/to/huge/repo/.git/config’
   8242 
   8243           [include]
   8244                   path = /path/to/huge-gitconfig
   8245 
   8246    • ‘/path/to/huge-gitconfig’
   8247 
   8248           [status]
   8249                   showUntrackedFiles = no
   8250 
   8251    • ‘$HOME/.emacs.d/init.el’
   8252 
   8253           (dir-locals-set-class-variables 'huge-git-repository
   8254              '((nil . ((magit-refresh-buffers . nil)))))
   8255 
   8256           (dir-locals-set-directory-class
   8257              "/path/to/huge/repo/" 'huge-git-repository)
   8258 
   8259 
   8260 File: magit.info,  Node: Essential Settings,  Prev: Per-Repository Configuration,  Up: Customizing
   8261 
   8262 9.2 Essential Settings
   8263 ======================
   8264 
   8265 The next three sections list and discuss several variables that many
   8266 users might want to customize, for safety and/or performance reasons.
   8267 
   8268 * Menu:
   8269 
   8270 * Safety::
   8271 * Performance::
   8272 * Global Bindings::
   8273 
   8274 
   8275 File: magit.info,  Node: Safety,  Next: Performance,  Up: Essential Settings
   8276 
   8277 9.2.1 Safety
   8278 ------------
   8279 
   8280 This section discusses various variables that you might want to change
   8281 (or *not* change) for safety reasons.
   8282 
   8283    Git keeps *committed* changes around long enough for users to recover
   8284 changes they have accidentally been deleted.  It does not do the same
   8285 for *uncommitted* changes in the working tree and not even the index
   8286 (the staging area).  Because Magit makes it so easy to modify
   8287 uncommitted changes, it also makes it easy to shoot yourself in the foot
   8288 in the process.  For that reason Magit provides three global modes that
   8289 save *tracked* files to work-in-progress references after or before
   8290 certain actions.  See *note Wip Modes::.
   8291 
   8292    These modes are not enabled by default because of performance
   8293 concerns.  Instead a lot of potentially destructive commands require
   8294 confirmation every time they are used.  In many cases this can be
   8295 disabled by adding a symbol to ‘magit-no-confirm’ (see *note Completion
   8296 and Confirmation::).  If you enable the various wip modes then you
   8297 should add ‘safe-with-wip’ to this list.
   8298 
   8299    Similarly it isn’t necessary to require confirmation before moving a
   8300 file to the system trash - if you trashed a file by mistake then you can
   8301 recover it from there.  Option ‘magit-delete-by-moving-to-trash’
   8302 controls whether the system trash is used, which is the case by default.
   8303 Nevertheless, ‘trash’ isn’t a member of ‘magit-no-confirm’ - you might
   8304 want to change that.
   8305 
   8306    By default buffers visiting files are automatically reverted when the
   8307 visited file changes on disk.  This isn’t as risky as it might seem, but
   8308 to make an informed decision you should see *note Risk of Reverting
   8309 Automatically::.
   8310 
   8311 
   8312 File: magit.info,  Node: Performance,  Next: Global Bindings,  Prev: Safety,  Up: Essential Settings
   8313 
   8314 9.2.2 Performance
   8315 -----------------
   8316 
   8317 After Magit has run ‘git’ for side-effects, it also refreshes the
   8318 current Magit buffer and the respective status buffer.  This is
   8319 necessary because otherwise outdated information might be displayed
   8320 without the user noticing.  Magit buffers are updated by recreating
   8321 their content from scratch, which makes updating simpler and less
   8322 error-prone, but also more costly.  Keeping it simple and just
   8323 re-creating everything from scratch is an old design decision and
   8324 departing from that will require major refactoring.
   8325 
   8326    Meanwhile you can tell Magit to only automatically refresh the
   8327 current Magit buffer, but not the status buffer.  If you do that, then
   8328 the status buffer is only refreshed automatically if it is the current
   8329 buffer.
   8330 
   8331      (setq magit-refresh-status-buffer nil)
   8332 
   8333    You should also check whether any third-party packages have added
   8334 anything to ‘magit-refresh-buffer-hook’, ‘magit-pre-refresh-hook’, and
   8335 ‘magit-post-refresh-hook’.  If so, then check whether those additions
   8336 impact performance significantly.
   8337 
   8338    Magit can be told to refresh buffers verbosely using ‘M-x
   8339 magit-toggle-verbose-refresh’.  Enabling this helps figuring out which
   8340 sections are bottlenecks.  Each line printed to the ‘*Messages*’ buffer
   8341 contains a section name, the number of seconds it took to show this
   8342 section, and from 0 to 2 exclamation marks: the more exclamation marks
   8343 the slower the section is.
   8344 
   8345    Magit also reverts buffers for visited files located inside the
   8346 current repository when the visited file changes on disk.  That is
   8347 implemented on top of ‘auto-revert-mode’ from the built-in library
   8348 ‘autorevert’.  To figure out whether that impacts performance, check
   8349 whether performance is significantly worse, when many buffers exist
   8350 and/or when some buffers visit files using TRAMP.  If so, then this
   8351 should help.
   8352 
   8353      (setq auto-revert-buffer-list-filter
   8354            'magit-auto-revert-repository-buffer-p)
   8355 
   8356    For alternative approaches see *note Automatic Reverting of
   8357 File-Visiting Buffers::.
   8358 
   8359    If you have enabled any features that are disabled by default, then
   8360 you should check whether they impact performance significantly.  It’s
   8361 likely that they were not enabled by default because it is known that
   8362 they reduce performance at least in large repositories.
   8363 
   8364    If performance is only slow inside certain unusually large
   8365 repositories, then you might want to disable certain features on a
   8366 per-repository or per-repository-class basis only.  See *note
   8367 Per-Repository Configuration::.  For example it takes a long time to
   8368 determine the next and current tag in repository with exceptional
   8369 numbers of tags.  It would therefore be a good idea to disable
   8370 ‘magit-insert-tags-headers’, as explained at the mentioned node.
   8371 
   8372 * Menu:
   8373 
   8374 * Microsoft Windows Performance::
   8375 * MacOS Performance::
   8376 
   8377 Log Performance
   8378 ...............
   8379 
   8380 When showing logs, Magit limits the number of commits initially shown in
   8381 the hope that this avoids unnecessary work.  When ‘--graph’ is used,
   8382 then this unfortunately does not have the desired effect for large
   8383 histories.  Junio, Git’s maintainer, said on the git mailing list
   8384 (<https://www.spinics.net/lists/git/msg232230.html>): "‘--graph’ wants
   8385 to compute the whole history and the max-count only affects the output
   8386 phase after ‘--graph’ does its computation".
   8387 
   8388    In other words, it’s not that Git is slow at outputting the
   8389 differences, or that Magit is slow at parsing the output - the problem
   8390 is that Git first goes outside and has a smoke.
   8391 
   8392    We actually work around this issue by limiting the number of commits
   8393 not only by using ‘-<N>’ but by also using a range.  But unfortunately
   8394 that’s not always possible.
   8395 
   8396    When more than a few thousand commits are shown, then the use of
   8397 ‘--graph’ can slow things down.
   8398 
   8399    Using ‘--color --graph’ is even slower.  Magit uses code that is part
   8400 of Emacs to turn control characters into faces.  That code is pretty
   8401 slow and this is quite noticeable when showing a log with many branches
   8402 and merges.  For that reason ‘--color’ is not enabled by default
   8403 anymore.  Consider leaving it at that.
   8404 
   8405 Diff Performance
   8406 ................
   8407 
   8408 If diffs are slow, then consider turning off some optional diff features
   8409 by setting all or some of the following variables to ‘nil’:
   8410 ‘magit-diff-highlight-indentation’, ‘magit-diff-highlight-trailing’,
   8411 ‘magit-diff-paint-whitespace’, ‘magit-diff-highlight-hunk-body’, and
   8412 ‘magit-diff-refine-hunk’.
   8413 
   8414    When showing a commit instead of some arbitrary diff, then some
   8415 additional information is displayed.  Calculating this information can
   8416 be quite expensive given certain circumstances.  If looking at a commit
   8417 using ‘magit-revision-mode’ takes considerably more time than looking at
   8418 the same commit in ‘magit-diff-mode’, then consider setting
   8419 ‘magit-revision-insert-related-refs’ to ‘nil’.
   8420 
   8421    When you are often confronted with diffs that contain deleted files,
   8422 then you might want to enable the ‘--irreversible-delete’ argument.  If
   8423 you do that then diffs still show that a file was deleted but without
   8424 also showing the complete deleted content of the file.  This argument is
   8425 not available by default, see *note (transient)Enabling and Disabling
   8426 Suffixes::.  Once you have done that you should enable it and save that
   8427 setting, see *note (transient)Saving Values::.  You should do this in
   8428 both the diff (‘d’) and the diff refresh (‘D’) transient popups.
   8429 
   8430 Refs Buffer Performance
   8431 .......................
   8432 
   8433 When refreshing the "references buffer" is slow, then that’s usually
   8434 because several hundred refs are being displayed.  The best way to
   8435 address that is to display fewer refs, obviously.
   8436 
   8437    If you are not, or only mildly, interested in seeing the list of
   8438 tags, then start by not displaying them:
   8439 
   8440      (remove-hook 'magit-refs-sections-hook 'magit-insert-tags)
   8441 
   8442    Then you should also make sure that the listed remote branches
   8443 actually all exist.  You can do so by pruning branches which no longer
   8444 exist using ‘f-pa’.
   8445 
   8446 Committing Performance
   8447 ......................
   8448 
   8449 When you initiate a commit, then Magit by default automatically shows a
   8450 diff of the changes you are about to commit.  For large commits this can
   8451 take a long time, which is especially distracting when you are
   8452 committing large amounts of generated data which you don’t actually
   8453 intend to inspect before committing.  This behavior can be turned off
   8454 using:
   8455 
   8456      (remove-hook 'server-switch-hook 'magit-commit-diff)
   8457      (remove-hook 'with-editor-filter-visit-hook 'magit-commit-diff)
   8458 
   8459    Then you can type ‘C-c C-d’ to show the diff when you actually want
   8460 to see it, but only then.  Alternatively you can leave the hook alone
   8461 and just type ‘C-g’ in those cases when it takes too long to generate
   8462 the diff.  If you do that, then you will end up with a broken diff
   8463 buffer, but doing it this way has the advantage that you usually get to
   8464 see the diff, which is useful because it increases the odds that you
   8465 spot potential issues.
   8466 
   8467 
   8468 File: magit.info,  Node: Microsoft Windows Performance,  Next: MacOS Performance,  Up: Performance
   8469 
   8470 Microsoft Windows Performance
   8471 .............................
   8472 
   8473 In order to update the status buffer, ‘git’ has to be run a few dozen
   8474 times.  That is problematic on Microsoft Windows, because that operating
   8475 system is exceptionally slow at starting processes.  Sadly this is an
   8476 issue that can only be fixed by Microsoft itself, and they don’t appear
   8477 to be particularly interested in doing so.
   8478 
   8479    Beside the subprocess issue, there are also other Windows-specific
   8480 performance issues.  Some of these have workarounds.  The maintainers of
   8481 "Git for Windows" try to improve performance on Windows.  Always use the
   8482 latest release in order to benefit from the latest performance tweaks.
   8483 Magit too tries to work around some Windows-specific issues.
   8484 
   8485    According to some sources, setting the following Git variables can
   8486 also help.
   8487 
   8488      git config --global core.preloadindex true   # default since v2.1
   8489      git config --global core.fscache true        # default since v2.8
   8490      git config --global gc.auto 256
   8491 
   8492    You should also check whether an anti-virus program is affecting
   8493 performance.
   8494 
   8495 
   8496 File: magit.info,  Node: MacOS Performance,  Prev: Microsoft Windows Performance,  Up: Performance
   8497 
   8498 MacOS Performance
   8499 .................
   8500 
   8501 Before Emacs 26.1 child processes were created using ‘fork’ on macOS.
   8502 That needlessly copied GUI resources, which is expensive.  The result
   8503 was that forking took about 30 times as long on Darwin than on Linux,
   8504 and because Magit starts many ‘git’ processes that made quite a
   8505 difference.
   8506 
   8507    So make sure that you are using at least Emacs 26.1, in which case
   8508 the faster ‘vfork’ will be used.  (The creation of child processes still
   8509 takes about twice as long on Darwin compared to Linux.)  See (1) for
   8510 more information.
   8511 
   8512    Additionally, ‘git’ installed from a package manager like ‘brew’ or
   8513 ‘nix’ seems to be slower than the native executable.  Profile the ‘git’
   8514 executable you’re running against the one at ‘/usr/bin/git’, and if you
   8515 notice a notable difference try using the latter as
   8516 ‘magit-git-executable’.
   8517 
   8518    ---------- Footnotes ----------
   8519 
   8520    (1) 
   8521 <https://lists.gnu.org/archive/html/bug-gnu-emacs/2017-04/msg00201.html>
   8522 
   8523 
   8524 File: magit.info,  Node: Global Bindings,  Prev: Performance,  Up: Essential Settings
   8525 
   8526 9.2.3 Global Bindings
   8527 ---------------------
   8528 
   8529  -- User Option: magit-define-global-key-bindings
   8530      This option controls which set of Magit key bindings, if any, may
   8531      be added to the global keymap, even before Magit is first used in
   8532      the current Emacs session.
   8533 
   8534         • If the value is ‘nil’, no bindings are added.
   8535 
   8536         • If ‘default’, maybe add:
   8537 
   8538           ‘C-x g’     ‘magit-status’
   8539           ‘C-x M-g’   ‘magit-dispatch’
   8540           ‘C-c M-g’   ‘magit-file-dispatch’
   8541 
   8542         • If ‘recommended’, maybe add:
   8543 
   8544           ‘C-x g’   ‘magit-status’
   8545           ‘C-c g’   ‘magit-dispatch’
   8546           ‘C-c f’   ‘magit-file-dispatch’
   8547 
   8548           These bindings are strongly recommended, but we cannot use
   8549           them by default, because the ‘C-c <LETTER>’ namespace is
   8550           strictly reserved for bindings added by the user (see *note
   8551           (elisp)Key Binding Conventions::).
   8552 
   8553      The bindings in the chosen set may be added when ‘after-init-hook’
   8554      is run.  Each binding is added if, and only if, at that time no
   8555      other key is bound to the same command, and no other command is
   8556      bound to the same key.  In other words we try to avoid adding
   8557      bindings that are unnecessary, as well as bindings that conflict
   8558      with other bindings.
   8559 
   8560      Adding these bindings is delayed until ‘after-init-hook’ is run to
   8561      allow users to set the variable anywhere in their init file
   8562      (without having to make sure to do so before ‘magit’ is loaded or
   8563      autoloaded) and to increase the likelihood that all the potentially
   8564      conflicting user bindings have already been added.
   8565 
   8566      To set this variable use either ‘setq’ or the Custom interface.  Do
   8567      not use the function ‘customize-set-variable’ because doing that
   8568      would cause Magit to be loaded immediately, when that form is
   8569      evaluated (this differs from ‘custom-set-variables’, which doesn’t
   8570      load the libraries that define the customized variables).
   8571 
   8572      Setting this variable has no effect if ‘after-init-hook’ has
   8573      already been run.
   8574 
   8575 
   8576 File: magit.info,  Node: Plumbing,  Next: FAQ,  Prev: Customizing,  Up: Top
   8577 
   8578 10 Plumbing
   8579 ***********
   8580 
   8581 The following sections describe how to use several of Magit’s core
   8582 abstractions to extend Magit itself or implement a separate extension.
   8583 
   8584    A few of the low-level features used by Magit have been factored out
   8585 into separate libraries/packages, so that they can be used by other
   8586 packages, without having to depend on Magit.  See *note
   8587 (with-editor)Top:: for information about ‘with-editor’.  ‘transient’
   8588 doesn’t have a manual yet.
   8589 
   8590    If you are trying to find an unused key that you can bind to a
   8591 command provided by your own Magit extension, then checkout
   8592 <https://github.com/magit/magit/wiki/Plugin-Dispatch-Key-Registry>.
   8593 
   8594 * Menu:
   8595 
   8596 * Calling Git::
   8597 * Section Plumbing::
   8598 * Refreshing Buffers::
   8599 * Conventions::
   8600 
   8601 
   8602 File: magit.info,  Node: Calling Git,  Next: Section Plumbing,  Up: Plumbing
   8603 
   8604 10.1 Calling Git
   8605 ================
   8606 
   8607 Magit provides many specialized functions for calling Git.  All of these
   8608 functions are defined in either ‘magit-git.el’ or ‘magit-process.el’ and
   8609 have one of the prefixes ‘magit-run-’, ‘magit-call-’, ‘magit-start-’, or
   8610 ‘magit-git-’ (which is also used for other things).
   8611 
   8612    All of these functions accept an indefinite number of arguments,
   8613 which are strings that specify command line arguments for Git (or in
   8614 some cases an arbitrary executable).  These arguments are flattened
   8615 before being passed on to the executable; so instead of strings they can
   8616 also be lists of strings and arguments that are ‘nil’ are silently
   8617 dropped.  Some of these functions also require a single mandatory
   8618 argument before these command line arguments.
   8619 
   8620    Roughly speaking, these functions run Git either to get some value or
   8621 for side-effects.  The functions that return a value are useful to
   8622 collect the information necessary to populate a Magit buffer, while the
   8623 others are used to implement Magit commands.
   8624 
   8625    The functions in the value-only group always run synchronously, and
   8626 they never trigger a refresh.  The function in the side-effect group can
   8627 be further divided into subgroups depending on whether they run Git
   8628 synchronously or asynchronously, and depending on whether they trigger a
   8629 refresh when the executable has finished.
   8630 
   8631 * Menu:
   8632 
   8633 * Getting a Value from Git::
   8634 * Calling Git for Effect::
   8635 
   8636 
   8637 File: magit.info,  Node: Getting a Value from Git,  Next: Calling Git for Effect,  Up: Calling Git
   8638 
   8639 10.1.1 Getting a Value from Git
   8640 -------------------------------
   8641 
   8642 These functions run Git in order to get a value, an exit status, or
   8643 output.  Of course you could also use them to run Git commands that have
   8644 side-effects, but that should be avoided.
   8645 
   8646  -- Function: magit-git-exit-code &rest args
   8647      Executes git with ARGS and returns its exit code.
   8648 
   8649  -- Function: magit-git-success &rest args
   8650      Executes git with ARGS and returns ‘t’ if the exit code is ‘0’,
   8651      ‘nil’ otherwise.
   8652 
   8653  -- Function: magit-git-failure &rest args
   8654      Executes git with ARGS and returns ‘t’ if the exit code is ‘1’,
   8655      ‘nil’ otherwise.
   8656 
   8657  -- Function: magit-git-true &rest args
   8658      Executes git with ARGS and returns ‘t’ if the first line printed by
   8659      git is the string "true", ‘nil’ otherwise.
   8660 
   8661  -- Function: magit-git-false &rest args
   8662      Executes git with ARGS and returns ‘t’ if the first line printed by
   8663      git is the string "false", ‘nil’ otherwise.
   8664 
   8665  -- Function: magit-git-insert &rest args
   8666      Executes git with ARGS and inserts its output at point.
   8667 
   8668  -- Function: magit-git-string &rest args
   8669      Executes git with ARGS and returns the first line of its output.
   8670      If there is no output or if it begins with a newline character,
   8671      then this returns ‘nil’.
   8672 
   8673  -- Function: magit-git-lines &rest args
   8674      Executes git with ARGS and returns its output as a list of lines.
   8675      Empty lines anywhere in the output are omitted.
   8676 
   8677  -- Function: magit-git-items &rest args
   8678      Executes git with ARGS and returns its null-separated output as a
   8679      list.  Empty items anywhere in the output are omitted.
   8680 
   8681      If the value of option ‘magit-git-debug’ is non-nil and git exits
   8682      with a non-zero exit status, then warn about that in the echo area
   8683      and add a section containing git’s standard error in the current
   8684      repository’s process buffer.
   8685 
   8686  -- Function: magit-process-git destination &rest args
   8687      Calls Git synchronously in a separate process, returning its exit
   8688      code.  DESTINATION specifies how to handle the output, like for
   8689      ‘call-process’, except that file handlers are supported.  Enables
   8690      Cygwin’s "noglob" option during the call and ensures unix eol
   8691      conversion.
   8692 
   8693  -- Function: magit-process-file process &optional infile buffer display
   8694           &rest args
   8695      Processes files synchronously in a separate process.  Identical to
   8696      ‘process-file’ but temporarily enables Cygwin’s "noglob" option
   8697      during the call and ensures unix eol conversion.
   8698 
   8699    If an error occurs when using one of the above functions, then that
   8700 is usually due to a bug, i.e., using an argument which is not actually
   8701 supported.  Such errors are usually not reported, but when they occur we
   8702 need to be able to debug them.
   8703 
   8704  -- User Option: magit-git-debug
   8705      Whether to report errors that occur when using ‘magit-git-insert’,
   8706      ‘magit-git-string’, ‘magit-git-lines’, or ‘magit-git-items’.  This
   8707      does not actually raise an error.  Instead a message is shown in
   8708      the echo area, and git’s standard error is insert into a new
   8709      section in the current repository’s process buffer.
   8710 
   8711  -- Function: magit-git-str &rest args
   8712      This is a variant of ‘magit-git-string’ that ignores the option
   8713      ‘magit-git-debug’.  It is mainly intended to be used while handling
   8714      errors in functions that do respect that option.  Using such a
   8715      function while handing an error could cause yet another error and
   8716      therefore lead to an infinite recursion.  You probably won’t ever
   8717      need to use this function.
   8718 
   8719 
   8720 File: magit.info,  Node: Calling Git for Effect,  Prev: Getting a Value from Git,  Up: Calling Git
   8721 
   8722 10.1.2 Calling Git for Effect
   8723 -----------------------------
   8724 
   8725 These functions are used to run git to produce some effect.  Most Magit
   8726 commands that actually run git do so by using such a function.
   8727 
   8728    Because we do not need to consume git’s output when using these
   8729 functions, their output is instead logged into a per-repository buffer,
   8730 which can be shown using ‘$’ from a Magit buffer or ‘M-x magit-process’
   8731 elsewhere.
   8732 
   8733    These functions can have an effect in two distinct ways.  Firstly,
   8734 running git may change something, i.e., create or push a new commit.
   8735 Secondly, that change may require that Magit buffers are refreshed to
   8736 reflect the changed state of the repository.  But refreshing isn’t
   8737 always desirable, so only some of these functions do perform such a
   8738 refresh after git has returned.
   8739 
   8740    Sometimes it is useful to run git asynchronously.  For example, when
   8741 the user has just initiated a push, then there is no reason to make her
   8742 wait until that has completed.  In other cases it makes sense to wait
   8743 for git to complete before letting the user do something else.  For
   8744 example after staging a change it is useful to wait until after the
   8745 refresh because that also automatically moves to the next change.
   8746 
   8747  -- Function: magit-call-git &rest args
   8748      Calls git synchronously with ARGS.
   8749 
   8750  -- Function: magit-call-process program &rest args
   8751      Calls PROGRAM synchronously with ARGS.
   8752 
   8753  -- Function: magit-run-git &rest args
   8754      Calls git synchronously with ARGS and then refreshes.
   8755 
   8756  -- Function: magit-run-git-with-input &rest args
   8757      Calls git synchronously with ARGS and sends it the content of the
   8758      current buffer on standard input.
   8759 
   8760      If the current buffer’s ‘default-directory’ is on a remote
   8761      filesystem, this function actually runs git asynchronously.  But
   8762      then it waits for the process to return, so the function itself is
   8763      synchronous.
   8764 
   8765  -- Function: magit-git &rest args
   8766      Calls git synchronously with ARGS for side-effects only.  This
   8767      function does not refresh the buffer.
   8768 
   8769  -- Function: magit-git-wash washer &rest args
   8770      Execute Git with ARGS, inserting washed output at point.  Actually
   8771      first insert the raw output at point.  If there is no output call
   8772      ‘magit-cancel-section’.  Otherwise temporarily narrow the buffer to
   8773      the inserted text, move to its beginning, and then call function
   8774      WASHER with ARGS as its sole argument.
   8775 
   8776    And now for the asynchronous variants.
   8777 
   8778  -- Function: magit-run-git-async &rest args
   8779      Start Git, prepare for refresh, and return the process object.
   8780      ARGS is flattened and then used as arguments to Git.
   8781 
   8782      Display the command line arguments in the echo area.
   8783 
   8784      After Git returns some buffers are refreshed: the buffer that was
   8785      current when this function was called (if it is a Magit buffer and
   8786      still alive), as well as the respective Magit status buffer.
   8787      Unmodified buffers visiting files that are tracked in the current
   8788      repository are reverted if ‘magit-revert-buffers’ is non-nil.
   8789 
   8790  -- Function: magit-run-git-with-editor &rest args
   8791      Export GIT_EDITOR and start Git.  Also prepare for refresh and
   8792      return the process object.  ARGS is flattened and then used as
   8793      arguments to Git.
   8794 
   8795      Display the command line arguments in the echo area.
   8796 
   8797      After Git returns some buffers are refreshed: the buffer that was
   8798      current when this function was called (if it is a Magit buffer and
   8799      still alive), as well as the respective Magit status buffer.
   8800 
   8801  -- Function: magit-start-git input &rest args
   8802      Start Git, prepare for refresh, and return the process object.
   8803 
   8804      If INPUT is non-nil, it has to be a buffer or the name of an
   8805      existing buffer.  The buffer content becomes the processes standard
   8806      input.
   8807 
   8808      Option ‘magit-git-executable’ specifies the Git executable and
   8809      option ‘magit-git-global-arguments’ specifies constant arguments.
   8810      The remaining arguments ARGS specify arguments to Git.  They are
   8811      flattened before use.
   8812 
   8813      After Git returns, some buffers are refreshed: the buffer that was
   8814      current when this function was called (if it is a Magit buffer and
   8815      still alive), as well as the respective Magit status buffer.
   8816      Unmodified buffers visiting files that are tracked in the current
   8817      repository are reverted if ‘magit-revert-buffers’ is non-nil.
   8818 
   8819  -- Function: magit-start-process &rest args
   8820      Start PROGRAM, prepare for refresh, and return the process object.
   8821 
   8822      If optional argument INPUT is non-nil, it has to be a buffer or the
   8823      name of an existing buffer.  The buffer content becomes the
   8824      processes standard input.
   8825 
   8826      The process is started using ‘start-file-process’ and then setup to
   8827      use the sentinel ‘magit-process-sentinel’ and the filter
   8828      ‘magit-process-filter’.  Information required by these functions is
   8829      stored in the process object.  When this function returns the
   8830      process has not started to run yet so it is possible to override
   8831      the sentinel and filter.
   8832 
   8833      After the process returns, ‘magit-process-sentinel’ refreshes the
   8834      buffer that was current when ‘magit-start-process’ was called (if
   8835      it is a Magit buffer and still alive), as well as the respective
   8836      Magit status buffer.  Unmodified buffers visiting files that are
   8837      tracked in the current repository are reverted if
   8838      ‘magit-revert-buffers’ is non-nil.
   8839 
   8840  -- Variable: magit-this-process
   8841      The child process which is about to start.  This can be used to
   8842      change the filter and sentinel.
   8843 
   8844  -- Variable: magit-process-raise-error
   8845      When this is non-nil, then ‘magit-process-sentinel’ raises an error
   8846      if git exits with a non-zero exit status.  For debugging purposes.
   8847 
   8848 
   8849 File: magit.info,  Node: Section Plumbing,  Next: Refreshing Buffers,  Prev: Calling Git,  Up: Plumbing
   8850 
   8851 10.2 Section Plumbing
   8852 =====================
   8853 
   8854 * Menu:
   8855 
   8856 * Creating Sections::
   8857 * Section Selection::
   8858 * Matching Sections::
   8859 
   8860 
   8861 File: magit.info,  Node: Creating Sections,  Next: Section Selection,  Up: Section Plumbing
   8862 
   8863 10.2.1 Creating Sections
   8864 ------------------------
   8865 
   8866  -- Macro: magit-insert-section &rest args
   8867      Insert a section at point.
   8868 
   8869      TYPE is the section type, a symbol.  Many commands that act on the
   8870      current section behave differently depending on that type.  Also if
   8871      a variable ‘magit-TYPE-section-map’ exists, then use that as the
   8872      text-property ‘keymap’ of all text belonging to the section (but
   8873      this may be overwritten in subsections).  TYPE can also have the
   8874      form ‘(eval FORM)’ in which case FORM is evaluated at runtime.
   8875 
   8876      Optional VALUE is the value of the section, usually a string that
   8877      is required when acting on the section.
   8878 
   8879      When optional HIDE is non-nil collapse the section body by default,
   8880      i.e., when first creating the section, but not when refreshing the
   8881      buffer.  Otherwise, expand it by default.  This can be overwritten
   8882      using ‘magit-section-set-visibility-hook’.  When a section is
   8883      recreated during a refresh, then the visibility of predecessor is
   8884      inherited and HIDE is ignored (but the hook is still honored).
   8885 
   8886      BODY is any number of forms that actually insert the section’s
   8887      heading and body.  Optional NAME, if specified, has to be a symbol,
   8888      which is then bound to the struct of the section being inserted.
   8889 
   8890      Before BODY is evaluated the ‘start’ of the section object is set
   8891      to the value of ‘point’ and after BODY was evaluated its ‘end’ is
   8892      set to the new value of ‘point’; BODY is responsible for moving
   8893      ‘point’ forward.
   8894 
   8895      If it turns out inside BODY that the section is empty, then
   8896      ‘magit-cancel-section’ can be used to abort and remove all traces
   8897      of the partially inserted section.  This can happen when creating a
   8898      section by washing Git’s output and Git didn’t actually output
   8899      anything this time around.
   8900 
   8901  -- Function: magit-insert-heading &rest args
   8902      Insert the heading for the section currently being inserted.
   8903 
   8904      This function should only be used inside ‘magit-insert-section’.
   8905 
   8906      When called without any arguments, then just set the ‘content’ slot
   8907      of the object representing the section being inserted to a marker
   8908      at ‘point’.  The section should only contain a single line when
   8909      this function is used like this.
   8910 
   8911      When called with arguments ARGS, which have to be strings, then
   8912      insert those strings at point.  The section should not contain any
   8913      text before this happens and afterwards it should again only
   8914      contain a single line.  If the ‘face’ property is set anywhere
   8915      inside any of these strings, then insert all of them unchanged.
   8916      Otherwise use the ‘magit-section-heading’ face for all inserted
   8917      text.
   8918 
   8919      The ‘content’ property of the section struct is the end of the
   8920      heading (which lasts from ‘start’ to ‘content’) and the beginning
   8921      of the body (which lasts from ‘content’ to ‘end’).  If the value of
   8922      ‘content’ is nil, then the section has no heading and its body
   8923      cannot be collapsed.  If a section does have a heading then its
   8924      height must be exactly one line, including a trailing newline
   8925      character.  This isn’t enforced; you are responsible for getting it
   8926      right.  The only exception is that this function does insert a
   8927      newline character if necessary.
   8928 
   8929  -- Function: magit-cancel-section
   8930      Cancel the section currently being inserted.  This exits the
   8931      innermost call to ‘magit-insert-section’ and removes all traces of
   8932      what has already happened inside that call.
   8933 
   8934  -- Function: magit-define-section-jumper sym title &optional value
   8935      Define an interactive function to go to section SYM.  TITLE is the
   8936      displayed title of the section.
   8937 
   8938 
   8939 File: magit.info,  Node: Section Selection,  Next: Matching Sections,  Prev: Creating Sections,  Up: Section Plumbing
   8940 
   8941 10.2.2 Section Selection
   8942 ------------------------
   8943 
   8944  -- Function: magit-current-section
   8945      Return the section at point.
   8946 
   8947  -- Function: magit-region-sections &optional condition multiple
   8948      Return a list of the selected sections.
   8949 
   8950      When the region is active and constitutes a valid section
   8951      selection, then return a list of all selected sections.  This is
   8952      the case when the region begins in the heading of a section and
   8953      ends in the heading of the same section or in that of a sibling
   8954      section.  If optional MULTIPLE is non-nil, then the region cannot
   8955      begin and end in the same section.
   8956 
   8957      When the selection is not valid, then return nil.  In this case,
   8958      most commands that can act on the selected sections will instead
   8959      act on the section at point.
   8960 
   8961      When the region looks like it would in any other buffer then the
   8962      selection is invalid.  When the selection is valid then the region
   8963      uses the ‘magit-section-highlight’ face.  This does not apply to
   8964      diffs where things get a bit more complicated, but even here if the
   8965      region looks like it usually does, then that’s not a valid
   8966      selection as far as this function is concerned.
   8967 
   8968      If optional CONDITION is non-nil, then the selection not only has
   8969      to be valid; all selected sections additionally have to match
   8970      CONDITION, or nil is returned.  See ‘magit-section-match’ for the
   8971      forms CONDITION can take.
   8972 
   8973  -- Function: magit-region-values &optional condition multiple
   8974      Return a list of the values of the selected sections.
   8975 
   8976      Return the values that themselves would be returned by
   8977      ‘magit-region-sections’ (which see).
   8978 
   8979 
   8980 File: magit.info,  Node: Matching Sections,  Prev: Section Selection,  Up: Section Plumbing
   8981 
   8982 10.2.3 Matching Sections
   8983 ------------------------
   8984 
   8985 ‘M-x magit-describe-section-briefly’
   8986      Show information about the section at point.  This command is
   8987      intended for debugging purposes.
   8988 
   8989  -- Function: magit-section-ident section
   8990      Return an unique identifier for SECTION.  The return value has the
   8991      form ‘((TYPE . VALUE)...)’.
   8992 
   8993  -- Function: magit-get-section ident &optional root
   8994      Return the section identified by IDENT.  IDENT has to be a list as
   8995      returned by ‘magit-section-ident’.
   8996 
   8997  -- Function: magit-section-match condition &optional section
   8998      Return ‘t’ if SECTION matches CONDITION.  SECTION defaults to the
   8999      section at point.  If SECTION is not specified and there also is no
   9000      section at point, then return ‘nil’.
   9001 
   9002      CONDITION can take the following forms:
   9003         • ‘(CONDITION...)’
   9004 
   9005           matches if any of the CONDITIONs matches.
   9006 
   9007         • ‘[CLASS...]’
   9008 
   9009           matches if the section’s class is the same as the first CLASS
   9010           or a subclass of that; the section’s parent class matches the
   9011           second CLASS; and so on.
   9012 
   9013         • ‘[* CLASS...]’
   9014 
   9015           matches sections that match ‘[CLASS...]’ and also recursively
   9016           all their child sections.
   9017 
   9018         • ‘CLASS’
   9019 
   9020           matches if the section’s class is the same as CLASS or a
   9021           subclass of that; regardless of the classes of the parent
   9022           sections.
   9023 
   9024      Each CLASS should be a class symbol, identifying a class that
   9025      derives from ‘magit-section’.  For backward compatibility CLASS can
   9026      also be a "type symbol".  A section matches such a symbol if the
   9027      value of its ‘type’ slot is ‘eq’.  If a type symbol has an entry in
   9028      ‘magit--section-type-alist’, then a section also matches that type
   9029      if its class is a subclass of the class that corresponds to the
   9030      type as per that alist.
   9031 
   9032      Note that it is not necessary to specify the complete section
   9033      lineage as printed by ‘magit-describe-section-briefly’, unless of
   9034      course you want to be that precise.
   9035 
   9036  -- Function: magit-section-value-if condition &optional section
   9037      If the section at point matches CONDITION, then return its value.
   9038 
   9039      If optional SECTION is non-nil then test whether that matches
   9040      instead.  If there is no section at point and SECTION is nil, then
   9041      return nil.  If the section does not match, then return nil.
   9042 
   9043      See ‘magit-section-match’ for the forms CONDITION can take.
   9044 
   9045  -- Function: magit-section-case &rest clauses
   9046      Choose among clauses on the type of the section at point.
   9047 
   9048      Each clause looks like (CONDITION BODY...).  The type of the
   9049      section is compared against each CONDITION; the BODY forms of the
   9050      first match are evaluated sequentially and the value of the last
   9051      form is returned.  Inside BODY the symbol ‘it’ is bound to the
   9052      section at point.  If no clause succeeds or if there is no section
   9053      at point return nil.
   9054 
   9055      See ‘magit-section-match’ for the forms CONDITION can take.
   9056      Additionally a CONDITION of t is allowed in the final clause and
   9057      matches if no other CONDITION match, even if there is no section at
   9058      point.
   9059 
   9060  -- Variable: magit-root-section
   9061      The root section in the current buffer.  All other sections are
   9062      descendants of this section.  The value of this variable is set by
   9063      ‘magit-insert-section’ and you should never modify it.
   9064 
   9065    For diff related sections a few additional tools exist.
   9066 
   9067  -- Function: magit-diff-type &optional section
   9068      Return the diff type of SECTION.
   9069 
   9070      The returned type is one of the symbols ‘staged’, ‘unstaged’,
   9071      ‘committed’, or ‘undefined’.  This type serves a similar purpose as
   9072      the general type common to all sections (which is stored in the
   9073      ‘type’ slot of the corresponding ‘magit-section’ struct) but takes
   9074      additional information into account.  When the SECTION isn’t
   9075      related to diffs and the buffer containing it also isn’t a
   9076      diff-only buffer, then return nil.
   9077 
   9078      Currently the type can also be one of ‘tracked’ and ‘untracked’,
   9079      but these values are not handled explicitly in every place they
   9080      should be.  A possible fix could be to just return nil here.
   9081 
   9082      The section has to be a ‘diff’ or ‘hunk’ section, or a section
   9083      whose children are of type ‘diff’.  If optional SECTION is nil,
   9084      return the diff type for the current section.  In buffers whose
   9085      major mode is ‘magit-diff-mode’ SECTION is ignored and the type is
   9086      determined using other means.  In ‘magit-revision-mode’ buffers the
   9087      type is always ‘committed’.
   9088 
   9089  -- Function: magit-diff-scope &optional section strict
   9090      Return the diff scope of SECTION or the selected section(s).
   9091 
   9092      A diff’s "scope" describes what part of a diff is selected, it is a
   9093      symbol, one of ‘region’, ‘hunk’, ‘hunks’, ‘file’, ‘files’, or
   9094      ‘list’.  Do not confuse this with the diff "type", as returned by
   9095      ‘magit-diff-type’.
   9096 
   9097      If optional SECTION is non-nil, then return the scope of that,
   9098      ignoring the sections selected by the region.  Otherwise return the
   9099      scope of the current section, or if the region is active and
   9100      selects a valid group of diff related sections, the type of these
   9101      sections, i.e., ‘hunks’ or ‘files’.  If SECTION (or if the current
   9102      section that is nil) is a ‘hunk’ section and the region starts and
   9103      ends inside the body of a that section, then the type is ‘region’.
   9104 
   9105      If optional STRICT is non-nil then return nil if the diff type of
   9106      the section at point is ‘untracked’ or the section at point is not
   9107      actually a ‘diff’ but a ‘diffstat’ section.
   9108 
   9109 
   9110 File: magit.info,  Node: Refreshing Buffers,  Next: Conventions,  Prev: Section Plumbing,  Up: Plumbing
   9111 
   9112 10.3 Refreshing Buffers
   9113 =======================
   9114 
   9115 All commands that create a new Magit buffer or change what is being
   9116 displayed in an existing buffer do so by calling ‘magit-mode-setup’.
   9117 Among other things, that function sets the buffer local values of
   9118 ‘default-directory’ (to the top-level of the repository),
   9119 ‘magit-refresh-function’, and ‘magit-refresh-args’.
   9120 
   9121    Buffers are refreshed by calling the function that is the local value
   9122 of ‘magit-refresh-function’ (a function named ‘magit-*-refresh-buffer’,
   9123 where ‘*’ may be something like ‘diff’) with the value of
   9124 ‘magit-refresh-args’ as arguments.
   9125 
   9126  -- Macro: magit-mode-setup buffer switch-func mode refresh-func
   9127           &optional refresh-args
   9128      This function displays and selects BUFFER, turns on MODE, and
   9129      refreshes a first time.
   9130 
   9131      This function displays and optionally selects BUFFER by calling
   9132      ‘magit-mode-display-buffer’ with BUFFER, MODE and SWITCH-FUNC as
   9133      arguments.  Then it sets the local value of
   9134      ‘magit-refresh-function’ to REFRESH-FUNC and that of
   9135      ‘magit-refresh-args’ to REFRESH-ARGS.  Finally it creates the
   9136      buffer content by calling REFRESH-FUNC with REFRESH-ARGS as
   9137      arguments.
   9138 
   9139      All arguments are evaluated before switching to BUFFER.
   9140 
   9141  -- Function: magit-mode-display-buffer buffer mode &optional
   9142           switch-function
   9143      This function display BUFFER in some window and select it.  BUFFER
   9144      may be a buffer or a string, the name of a buffer.  The buffer is
   9145      returned.
   9146 
   9147      Unless BUFFER is already displayed in the selected frame, store the
   9148      previous window configuration as a buffer local value, so that it
   9149      can later be restored by ‘magit-mode-bury-buffer’.
   9150 
   9151      The buffer is displayed and selected using SWITCH-FUNCTION.  If
   9152      that is ‘nil’ then ‘pop-to-buffer’ is used if the current buffer’s
   9153      major mode derives from ‘magit-mode’.  Otherwise ‘switch-to-buffer’
   9154      is used.
   9155 
   9156  -- Variable: magit-refresh-function
   9157      The value of this buffer-local variable is the function used to
   9158      refresh the current buffer.  It is called with ‘magit-refresh-args’
   9159      as arguments.
   9160 
   9161  -- Variable: magit-refresh-args
   9162      The list of arguments used by ‘magit-refresh-function’ to refresh
   9163      the current buffer.  ‘magit-refresh-function’ is called with these
   9164      arguments.
   9165 
   9166      The value is usually set using ‘magit-mode-setup’, but in some
   9167      cases it’s also useful to provide commands that can change the
   9168      value.  For example, the ‘magit-diff-refresh’ transient can be used
   9169      to change any of the arguments used to display the diff, without
   9170      having to specify again which differences should be shown, but
   9171      ‘magit-diff-more-context’, ‘magit-diff-less-context’ and
   9172      ‘magit-diff-default-context’ change just the ‘-U<N>’ argument.  In
   9173      both case this is done by changing the value of this variable and
   9174      then calling this ‘magit-refresh-function’.
   9175 
   9176 
   9177 File: magit.info,  Node: Conventions,  Prev: Refreshing Buffers,  Up: Plumbing
   9178 
   9179 10.4 Conventions
   9180 ================
   9181 
   9182 Also see *note Completion and Confirmation::.
   9183 
   9184 * Menu:
   9185 
   9186 * Theming Faces::
   9187 
   9188 
   9189 File: magit.info,  Node: Theming Faces,  Up: Conventions
   9190 
   9191 10.4.1 Theming Faces
   9192 --------------------
   9193 
   9194 The default theme uses blue for local branches, green for remote
   9195 branches, and goldenrod (brownish yellow) for tags.  When creating a new
   9196 theme, you should probably follow that example.  If your theme already
   9197 uses other colors, then stick to that.
   9198 
   9199    In older releases these reference faces used to have a background
   9200 color and a box around them.  The basic default faces no longer do so,
   9201 to make Magit buffers much less noisy, and you should follow that
   9202 example at least with regards to boxes.  (Boxes were used in the past to
   9203 work around a conflict between the highlighting overlay and text
   9204 property backgrounds.  That’s no longer necessary because highlighting
   9205 no longer causes other background colors to disappear.)  Alternatively
   9206 you can keep the background color and/or box, but then have to take
   9207 special care to adjust ‘magit-branch-current’ accordingly.  By default
   9208 it looks mostly like ‘magit-branch-local’, but with a box (by default
   9209 the former is the only face that uses a box, exactly so that it sticks
   9210 out).  If the former also uses a box, then you have to make sure that it
   9211 differs in some other way from the latter.
   9212 
   9213    The most difficult faces to theme are those related to diffs,
   9214 headings, highlighting, and the region.  There are faces that fall into
   9215 all four groups - expect to spend some time getting this right.
   9216 
   9217    The ‘region’ face in the default theme, in both the light and dark
   9218 variants, as well as in many other themes, distributed with Emacs or by
   9219 third-parties, is very ugly.  It is common to use a background color
   9220 that really sticks out, which is ugly but if that were the only problem
   9221 then it would be acceptable.  Unfortunately many themes also set the
   9222 foreground color, which ensures that all text within the region is
   9223 readable.  Without doing that there might be cases where some foreground
   9224 color is too close to the region background color to still be readable.
   9225 But it also means that text within the region loses all syntax
   9226 highlighting.
   9227 
   9228    I consider the work that went into getting the ‘region’ face right to
   9229 be a good indicator for the general quality of a theme.  My
   9230 recommendation for the ‘region’ face is this: use a background color
   9231 slightly different from the background color of the ‘default’ face, and
   9232 do not set the foreground color at all.  So for a light theme you might
   9233 use a light (possibly tinted) gray as the background color of ‘default’
   9234 and a somewhat darker gray for the background of ‘region’.  That should
   9235 usually be enough to not collide with the foreground color of any other
   9236 face.  But if some other faces also set a light gray as background
   9237 color, then you should also make sure it doesn’t collide with those (in
   9238 some cases it might be acceptable though).
   9239 
   9240    Magit only uses the ‘region’ face when the region is "invalid" by its
   9241 own definition.  In a Magit buffer the region is used to either select
   9242 multiple sibling sections, so that commands which support it act on all
   9243 of these sections instead of just the current section, or to select
   9244 lines within a single hunk section.  In all other cases, the section is
   9245 considered invalid and Magit won’t act on it.  But such invalid sections
   9246 happen, either because the user has not moved point enough yet to make
   9247 it valid or because she wants to use a non-magit command to act on the
   9248 region, e.g., ‘kill-region’.
   9249 
   9250    So using the regular ‘region’ face for invalid sections is a feature.
   9251 It tells the user that Magit won’t be able to act on it.  It’s
   9252 acceptable if that face looks a bit odd and even (but less so) if it
   9253 collides with the background colors of section headings and other things
   9254 that have a background color.
   9255 
   9256    Magit highlights the current section.  If a section has subsections,
   9257 then all of them are highlighted.  This is done using faces that have
   9258 "highlight" in their names.  For most sections,
   9259 ‘magit-section-highlight’ is used for both the body and the heading.
   9260 Like the ‘region’ face, it should only set the background color to
   9261 something similar to that of ‘default’.  The highlight background color
   9262 must be different from both the ‘region’ background color and the
   9263 ‘default’ background color.
   9264 
   9265    For diff related sections Magit uses various faces to highlight
   9266 different parts of the selected section(s).  Note that hunk headings,
   9267 unlike all other section headings, by default have a background color,
   9268 because it is useful to have very visible separators between hunks.
   9269 That face ‘magit-diff-hunk-heading’, should be different from both
   9270 ‘magit-diff-hunk-heading-highlight’ and ‘magit-section-highlight’, as
   9271 well as from ‘magit-diff-context’ and ‘magit-diff-context-highlight’.
   9272 By default we do that by changing the foreground color.  Changing the
   9273 background color would lead to complications, and there are already
   9274 enough we cannot get around.  (Also note that it is generally a good
   9275 idea for section headings to always be bold, but only for sections that
   9276 have subsections).
   9277 
   9278    When there is a valid region selecting diff-related sibling sections,
   9279 i.e., multiple files or hunks, then the bodies of all these sections use
   9280 the respective highlight faces, but additionally the headings instead
   9281 use one of the faces ‘magit-diff-file-heading-selection’ or
   9282 ‘magit-diff-hunk-heading-selection’.  These faces have to be different
   9283 from the regular highlight variants to provide explicit visual
   9284 indication that the region is active.
   9285 
   9286    When theming diff related faces, start by setting the option
   9287 ‘magit-diff-refine-hunk’ to ‘all’.  You might personally prefer to only
   9288 refine the current hunk or not use hunk refinement at all, but some of
   9289 the users of your theme want all hunks to be refined, so you have to
   9290 cater to that.
   9291 
   9292    (Also turn on ‘magit-diff-highlight-indentation’,
   9293 ‘magit-diff-highlight-trailing’, and ‘magit-diff-paint-whitespace’; and
   9294 insert some whitespace errors into the code you use for testing.)
   9295 
   9296    For added lines you have to adjust three faces: ‘magit-diff-added’,
   9297 ‘magit-diff-added-highlight’, and ‘diff-refined-added’.  Make sure that
   9298 the latter works well with both of the former, as well as ‘smerge-other’
   9299 and ‘diff-added’.  Then do the same for the removed lines, context
   9300 lines, lines added by us, and lines added by them.  Also make sure the
   9301 respective added, removed, and context faces use approximately the same
   9302 saturation for both the highlighted and unhighlighted variants.  Also
   9303 make sure the file and diff headings work nicely with context lines
   9304 (e.g., make them look different).  Line faces should set both the
   9305 foreground and the background color.  For example, for added lines use
   9306 two different greens.
   9307 
   9308    It’s best if the foreground color of both the highlighted and the
   9309 unhighlighted variants are the same, so you will need to have to find a
   9310 color that works well on the highlight and unhighlighted background, the
   9311 refine background, and the highlight context background.  When there is
   9312 an hunk internal region, then the added- and removed-lines background
   9313 color is used only within that region.  Outside the region the
   9314 highlighted context background color is used.  This makes it easier to
   9315 see what is being staged.  With an hunk internal region the hunk heading
   9316 is shown using ‘magit-diff-hunk-heading-selection’, and so are the thin
   9317 lines that are added around the lines that fall within the region.  The
   9318 background color of that has to be distinct enough from the various
   9319 other involved background colors.
   9320 
   9321    Nobody said this would be easy.  If your theme restricts itself to a
   9322 certain set of colors, then you should make an exception here.
   9323 Otherwise it would be impossible to make the diffs look good in each and
   9324 every variation.  Actually you might want to just stick to the default
   9325 definitions for these faces.  You have been warned.  Also please note
   9326 that if you do not get this right, this will in some cases look to users
   9327 like bugs in Magit - so please do it right or not at all.
   9328 
   9329 
   9330 File: magit.info,  Node: FAQ,  Next: Debugging Tools,  Prev: Plumbing,  Up: Top
   9331 
   9332 Appendix A FAQ
   9333 **************
   9334 
   9335 The next two nodes lists frequently asked questions.  For a list of
   9336 frequently *and recently* asked questions, i.e., questions that haven’t
   9337 made it into the manual yet, see
   9338 <https://github.com/magit/magit/wiki/FAQ>.
   9339 
   9340    Please also see *note Debugging Tools::.
   9341 
   9342 * Menu:
   9343 
   9344 * FAQ - How to ...?::
   9345 * FAQ - Issues and Errors::
   9346 
   9347 
   9348 File: magit.info,  Node: FAQ - How to ...?,  Next: FAQ - Issues and Errors,  Up: FAQ
   9349 
   9350 A.1 FAQ - How to ...?
   9351 =====================
   9352 
   9353 * Menu:
   9354 
   9355 * How to pronounce Magit?::
   9356 * How to show git's output?::
   9357 * How to install the gitman info manual?::
   9358 * How to show diffs for gpg-encrypted files?::
   9359 * How does branching and pushing work?::
   9360 * Should I disable VC?::
   9361 
   9362 
   9363 File: magit.info,  Node: How to pronounce Magit?,  Next: How to show git's output?,  Up: FAQ - How to ...?
   9364 
   9365 A.1.1 How to pronounce Magit?
   9366 -----------------------------
   9367 
   9368 Either ‘mu[m's] git’ or ‘magi{c => t}’ is fine.
   9369 
   9370    The slogan is "It’s Magit!  The magical Git client", so it makes
   9371 sense to pronounce Magit like magic, while taking into account that C
   9372 and T do not sound the same.
   9373 
   9374    The German "Magie" is not pronounced the same as the English "magic",
   9375 so if you speak German then you can use the above rationale to justify
   9376 using the former pronunciation; ‘Mag{ie => it}’.
   9377 
   9378    You can also choose to use the former pronunciation just because you
   9379 like it better.
   9380 
   9381    Also see <https://magit.vc/assets/videos/magic.mp4>.  Also see
   9382 <https://emacs.stackexchange.com/questions/13696>.
   9383 
   9384 
   9385 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 ...?
   9386 
   9387 A.1.2 How to show git’s output?
   9388 -------------------------------
   9389 
   9390 To show the output of recently run git commands, press ‘$’ (or, if that
   9391 isn’t available, ‘M-x magit-process-buffer’).  This will show a buffer
   9392 containing a section per git invocation; as always press ‘TAB’ to expand
   9393 or collapse them.
   9394 
   9395    By default, git’s output is only inserted into the process buffer if
   9396 it is run for side-effects.  When the output is consumed in some way,
   9397 also inserting it into the process buffer would be too expensive.  For
   9398 debugging purposes, it’s possible to do so anyway by setting
   9399 ‘magit-git-debug’ to ‘t’.
   9400 
   9401 
   9402 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 ...?
   9403 
   9404 A.1.3 How to install the gitman info manual?
   9405 --------------------------------------------
   9406 
   9407 Git’s manpages can be exported as an info manual called ‘gitman’.
   9408 Magit’s own info manual links to nodes in that manual instead of the
   9409 actual manpages because Info doesn’t support linking to manpages.
   9410 
   9411    Unfortunately some distributions do not install the ‘gitman’ manual
   9412 by default and you will have to install a separate documentation package
   9413 to get it.
   9414 
   9415    Magit patches Info adding the ability to visit links to the ‘gitman’
   9416 Info manual by instead viewing the respective manpage.  If you prefer
   9417 that approach, then set the value of ‘magit-view-git-manual-method’ to
   9418 one of the supported packages ‘man’ or ‘woman’, e.g.:
   9419 
   9420      (setq magit-view-git-manual-method 'man)
   9421 
   9422 
   9423 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 ...?
   9424 
   9425 A.1.4 How to show diffs for gpg-encrypted files?
   9426 ------------------------------------------------
   9427 
   9428 Git supports showing diffs for encrypted files, but has to be told to do
   9429 so.  Since Magit just uses Git to get the diffs, configuring Git also
   9430 affects the diffs displayed inside Magit.
   9431 
   9432      git config --global diff.gpg.textconv "gpg --no-tty --decrypt"
   9433      echo "*.gpg filter=gpg diff=gpg" > .gitattributes
   9434 
   9435 
   9436 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 ...?
   9437 
   9438 A.1.5 How does branching and pushing work?
   9439 ------------------------------------------
   9440 
   9441 Please see *note Branching:: and
   9442 <https://emacsair.me/2016/01/17/magit-2.4>
   9443 
   9444 
   9445 File: magit.info,  Node: Should I disable VC?,  Prev: How does branching and pushing work?,  Up: FAQ - How to ...?
   9446 
   9447 A.1.6 Should I disable VC?
   9448 --------------------------
   9449 
   9450 If you don’t use VC (the built-in version control interface) then you
   9451 might be tempted to disable it, not least because we used to recommend
   9452 that you do that.
   9453 
   9454    We no longer recommend that you disable VC.  Doing so would break
   9455 useful third-party packages (such as ‘diff-hl’), which depend on VC
   9456 being enabled.
   9457 
   9458    If you choose to disable VC anyway, then you can do so by changing
   9459 the value of ‘vc-handled-backends’.
   9460 
   9461 
   9462 File: magit.info,  Node: FAQ - Issues and Errors,  Prev: FAQ - How to ...?,  Up: FAQ
   9463 
   9464 A.2 FAQ - Issues and Errors
   9465 ===========================
   9466 
   9467 * Menu:
   9468 
   9469 * Magit is slow::
   9470 * I changed several thousand files at once and now Magit is unusable::
   9471 * I am having problems committing::
   9472 * I am using MS Windows and cannot push with Magit::
   9473 * 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.
   9474 * Expanding a file to show the diff causes it to disappear::
   9475 * Point is wrong in the COMMIT_EDITMSG buffer::
   9476 * The mode-line information isn't always up-to-date::
   9477 * A branch and tag sharing the same name breaks SOMETHING::
   9478 * My Git hooks work on the command-line but not inside Magit::
   9479 * git-commit-mode isn't used when committing from the command-line::
   9480 * Point ends up inside invisible text when jumping to a file-visiting buffer::
   9481 * I am no longer able to save popup defaults::
   9482 
   9483 
   9484 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
   9485 
   9486 A.2.1 Magit is slow
   9487 -------------------
   9488 
   9489 See *note Performance:: and *note I changed several thousand files at
   9490 once and now Magit is unusable::.
   9491 
   9492 
   9493 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
   9494 
   9495 A.2.2 I changed several thousand files at once and now Magit is unusable
   9496 ------------------------------------------------------------------------
   9497 
   9498 Magit is currently not expected to work well under such conditions.  It
   9499 sure would be nice if it did.  Reaching satisfactory performance under
   9500 such conditions will require some heavy refactoring.  This is no small
   9501 task but I hope to eventually find the time to make it happen.
   9502 
   9503    But for now we recommend you use the command line to complete this
   9504 one commit.  Also see *note Performance::.
   9505 
   9506 
   9507 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
   9508 
   9509 A.2.3 I am having problems committing
   9510 -------------------------------------
   9511 
   9512 That likely means that Magit is having problems finding an appropriate
   9513 emacsclient executable.  See *note (with-editor)Configuring
   9514 With-Editor:: and *note (with-editor)Debugging::.
   9515 
   9516 
   9517 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
   9518 
   9519 A.2.4 I am using MS Windows and cannot push with Magit
   9520 ------------------------------------------------------
   9521 
   9522 It’s almost certain that Magit is only incidental to this issue.  It is
   9523 much more likely that this is a configuration issue, even if you can
   9524 push on the command line.
   9525 
   9526    Detailed setup instructions can be found at
   9527 <https://github.com/magit/magit/wiki/Pushing-with-Magit-from-Windows>.
   9528 
   9529 
   9530 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
   9531 
   9532 A.2.5 I am using macOS and SOMETHING works in shell, but not in Magit
   9533 ---------------------------------------------------------------------
   9534 
   9535 This usually occurs because Emacs doesn’t have the same environment
   9536 variables as your shell.  Try installing and configuring
   9537 <https://github.com/purcell/exec-path-from-shell>.  By default it
   9538 synchronizes ‘$PATH’, which helps Magit find the same ‘git’ as the one
   9539 you are using on the shell.
   9540 
   9541    If SOMETHING is "passphrase caching with gpg-agent for commit and/or
   9542 tag signing", then you’ll also need to synchronize ‘$GPG_AGENT_INFO’.
   9543 
   9544 
   9545 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
   9546 
   9547 A.2.6 Expanding a file to show the diff causes it to disappear
   9548 --------------------------------------------------------------
   9549 
   9550 This is probably caused by a customization of a ‘diff.*’ Git variable.
   9551 You probably set that variable for a reason, and should therefore only
   9552 undo that setting in Magit by customizing ‘magit-git-global-arguments’.
   9553 
   9554 
   9555 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
   9556 
   9557 A.2.7 Point is wrong in the ‘COMMIT_EDITMSG’ buffer
   9558 ---------------------------------------------------
   9559 
   9560 Neither Magit nor ‘git-commit‘ fiddle with point in the buffer used to
   9561 write commit messages, so something else must be doing it.
   9562 
   9563    You have probably globally enabled a mode which restores point in
   9564 file-visiting buffers.  It might be a bit surprising, but when you write
   9565 a commit message, then you are actually editing a file.
   9566 
   9567    So you have to figure out which package is doing it.  ‘saveplace’,
   9568 ‘pointback’, and ‘session’ are likely candidates.  These snippets might
   9569 help:
   9570 
   9571      (setq session-name-disable-regexp "\\(?:\\`'\\.git/[A-Z_]+\\'\\)")
   9572 
   9573      (with-eval-after-load 'pointback
   9574        (lambda ()
   9575          (when (or git-commit-mode git-rebase-mode)
   9576            (pointback-mode -1))))
   9577 
   9578 
   9579 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
   9580 
   9581 A.2.8 The mode-line information isn’t always up-to-date
   9582 -------------------------------------------------------
   9583 
   9584 Magit is not responsible for the version control information that is
   9585 being displayed in the mode-line and looks something like ‘Git-master’.
   9586 The built-in "Version Control" package, also known as "VC", updates that
   9587 information, and can be told to do so more often:
   9588 
   9589      (setq auto-revert-check-vc-info t)
   9590 
   9591    But doing so isn’t good for performance.  For more (overly
   9592 optimistic) information see *note (emacs)VC Mode Line::.
   9593 
   9594    If you don’t really care about seeing this information in the
   9595 mode-line, but just don’t want to see _incorrect_ information, then
   9596 consider simply not displaying it in the mode-line:
   9597 
   9598      (setq-default mode-line-format
   9599                    (delete '(vc-mode vc-mode) mode-line-format))
   9600 
   9601 
   9602 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
   9603 
   9604 A.2.9 A branch and tag sharing the same name breaks SOMETHING
   9605 -------------------------------------------------------------
   9606 
   9607 Or more generally, ambiguous refnames break SOMETHING.
   9608 
   9609    Magit assumes that refs are named non-ambiguously across the
   9610 "refs/heads/", "refs/tags/", and "refs/remotes/" namespaces (i.e., all
   9611 the names remain unique when those prefixes are stripped).  We consider
   9612 ambiguous refnames unsupported and recommend that you use a
   9613 non-ambiguous naming scheme.  However, if you do work with a repository
   9614 that has ambiguous refnames, please report any issues you encounter, so
   9615 that we can investigate whether there is a simple fix.
   9616 
   9617 
   9618 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
   9619 
   9620 A.2.10 My Git hooks work on the command-line but not inside Magit
   9621 -----------------------------------------------------------------
   9622 
   9623 When Magit calls ‘git’ it adds a few global arguments including
   9624 ‘--literal-pathspecs’ and the ‘git’ process started by Magit then passes
   9625 that setting on to other ‘git’ process it starts itself.  It does so by
   9626 setting the environment variable ‘GIT_LITERAL_PATHSPECS’, not by calling
   9627 subprocesses with the ‘--literal-pathspecs’ argument.  You can therefore
   9628 override this setting in hook scripts using ‘unset
   9629 GIT_LITERAL_PATHSPECS’.
   9630 
   9631 
   9632 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
   9633 
   9634 A.2.11 ‘git-commit-mode’ isn’t used when committing from the command-line
   9635 -------------------------------------------------------------------------
   9636 
   9637 The reason for this is that ‘git-commit.el’ has not been loaded yet
   9638 and/or that the server has not been started yet.  These things have
   9639 always already been taken care of when you commit from Magit because in
   9640 order to do so, Magit has to be loaded and doing that involves loading
   9641 ‘git-commit’ and starting the server.
   9642 
   9643    If you want to commit from the command-line, then you have to take
   9644 care of these things yourself.  Your ‘init.el’ file should contain:
   9645 
   9646      (require 'git-commit)
   9647      (server-mode)
   9648 
   9649    Instead of ‘(require ’git-commit)‘ you may also use:
   9650 
   9651      (load "/path/to/magit-autoloads.el")
   9652 
   9653    You might want to do that because loading ‘git-commit’ causes large
   9654 parts of Magit to be loaded.
   9655 
   9656    There are also some variations of ‘(server-mode)’ that you might want
   9657 to try.  Personally I use:
   9658 
   9659      (use-package server
   9660        :config (or (server-running-p) (server-mode)))
   9661 
   9662    Now you can use:
   9663 
   9664      $ emacs&
   9665      $ EDITOR=emacsclient git commit
   9666 
   9667    However you cannot use:
   9668 
   9669      $ killall emacs
   9670      $ EDITOR="emacsclient --alternate-editor emacs" git commit
   9671 
   9672    This will actually end up using ‘emacs’, not ‘emacsclient’.  If you
   9673 do this, then you can still edit the commit message but
   9674 ‘git-commit-mode’ won’t be used and you have to exit ‘emacs’ to finish
   9675 the process.
   9676 
   9677    Tautology ahead.  If you want to be able to use ‘emacsclient’ to
   9678 connect to a running ‘emacs’ instance, even though no ‘emacs’ instance
   9679 is running, then you cannot use ‘emacsclient’ directly.
   9680 
   9681    Instead you have to create a script that does something like this:
   9682 
   9683    Try to use ‘emacsclient’ (without using ‘--alternate-editor’).  If
   9684 that succeeds, do nothing else.  Otherwise start ‘emacs &’ (and
   9685 ‘init.el’ must call ‘server-start’) and try to use ‘emacsclient’ again.
   9686 
   9687 
   9688 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
   9689 
   9690 A.2.12 Point ends up inside invisible text when jumping to a file-visiting buffer
   9691 ---------------------------------------------------------------------------------
   9692 
   9693 This can happen when you type ‘RET’ on a hunk to visit the respective
   9694 file at the respective position.  One solution to this problem is to use
   9695 ‘global-reveal-mode’.  It makes sure that text around point is always
   9696 visible.  If that is too drastic for your taste, then you may instead
   9697 use ‘magit-diff-visit-file-hook’ to reveal the text, possibly using
   9698 ‘reveal-post-command’ or for Org buffers ‘org-reveal’.
   9699 
   9700 
   9701 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
   9702 
   9703 A.2.13 I am no longer able to save popup defaults
   9704 -------------------------------------------------
   9705 
   9706 Magit used to use Magit-Popup to implement the transient popup menus.
   9707 Now it used Transient instead, which is Magit-Popup’s successor.
   9708 
   9709    In the older Magit-Popup menus, it was possible to save user settings
   9710 (e.g., setting the gpg signing key for commits) by using ‘C-c C-c’ in
   9711 the popup buffer.  This would dismiss the popup, but save the settings
   9712 as the defaults for future popups.
   9713 
   9714    When switching to Transient menus, this functionality is now
   9715 available via ‘C-x C-s’ instead; the ‘C-x’ prefix has other options as
   9716 well when using Transient, which will be displayed when it is typed.
   9717 See <https://magit.vc/manual/transient/Saving-Values.html#Saving-Values>
   9718 for more details.
   9719 
   9720 
   9721 File: magit.info,  Node: Debugging Tools,  Next: Keystroke Index,  Prev: FAQ,  Up: Top
   9722 
   9723 B Debugging Tools
   9724 *****************
   9725 
   9726 Magit and its dependencies provide a few debugging tools, and we
   9727 appreciate it very much if you use those tools before reporting an
   9728 issue.  Please include all relevant output when reporting an issue.
   9729 
   9730 ‘M-x magit-version’
   9731      This command shows the currently used versions of Magit, Git, and
   9732      Emacs in the echo area.  Non-interactively this just returns the
   9733      Magit version.
   9734 
   9735 ‘M-x magit-emacs-Q-command’
   9736      This command shows a debugging shell command in the echo area and
   9737      adds it to the kill ring.  Paste that command into a shell and run
   9738      it.
   9739 
   9740      This shell command starts ‘emacs’ with only ‘magit’ and its
   9741      dependencies loaded.  Neither your configuration nor other
   9742      installed packages are loaded.  This makes it easier to determine
   9743      whether some issue lays with Magit or something else.
   9744 
   9745      If you run Magit from its Git repository, then you should be able
   9746      to use ‘make emacs-Q’ instead of the output of this command.
   9747 
   9748 ‘M-x magit-toggle-git-debug’
   9749      This command toggles whether additional git errors are reported.
   9750 
   9751      Magit basically calls git for one of these two reasons: for
   9752      side-effects or to do something with its standard output.
   9753 
   9754      When git is run for side-effects then its output, including error
   9755      messages, go into the process buffer which is shown when using ‘$’.
   9756 
   9757      When git’s output is consumed in some way, then it would be too
   9758      expensive to also insert it into this buffer, but when this option
   9759      is non-nil and git returns with a non-zero exit status, then at
   9760      least its standard error is inserted into this buffer.
   9761 
   9762      This is only intended for debugging purposes.  Do not enable this
   9763      permanently, that would negatively affect performance.  Also note
   9764      that just because git exits with a non-zero exit status and prints
   9765      an error message that usually doesn’t mean that it is an error as
   9766      far as Magit is concerned, which is another reason we usually hide
   9767      these error messages.  Whether some error message is relevant in
   9768      the context of some unexpected behavior has to be judged on a case
   9769      by case basis.
   9770 
   9771 ‘M-x magit-toggle-verbose-refresh’
   9772      This command toggles whether Magit refreshes buffers verbosely.
   9773      Enabling this helps figuring out which sections are bottlenecks.
   9774      The additional output can be found in the ‘*Messages*’ buffer.
   9775 
   9776 ‘M-x magit-debug-git-executable’
   9777      This command displays a buffer containing information about the
   9778      available and used ‘git’ executable(s), and can be useful when
   9779      investigating ‘exec-path’ issues.
   9780 
   9781      Also see *note Git Executable::.
   9782 
   9783 ‘M-x with-editor-debug’
   9784      This command displays a buffer containing information about the
   9785      available and used ‘emacsclient’ executable(s), and can be useful
   9786      when investigating why Magit (or rather ‘with-editor’) cannot find
   9787      an appropriate ‘emacsclient’ executable.
   9788 
   9789      Also see *note (with-editor)Debugging::.
   9790 
   9791 Please also see *note FAQ::.
   9792 
   9793 
   9794 File: magit.info,  Node: Keystroke Index,  Next: Function and Command Index,  Prev: Debugging Tools,  Up: Top
   9795 
   9796 Appendix C Keystroke Index
   9797 **************************
   9798 
   9799 
   9800 * Menu:
   9801 
   9802 * !:                                     Running Git Manually.
   9803                                                               (line  13)
   9804 * ! !:                                   Running Git Manually.
   9805                                                               (line  17)
   9806 * ! a:                                   Running Git Manually.
   9807                                                               (line  53)
   9808 * ! b:                                   Running Git Manually.
   9809                                                               (line  56)
   9810 * ! g:                                   Running Git Manually.
   9811                                                               (line  59)
   9812 * ! k:                                   Running Git Manually.
   9813                                                               (line  50)
   9814 * ! m:                                   Running Git Manually.
   9815                                                               (line  62)
   9816 * ! p:                                   Running Git Manually.
   9817                                                               (line  25)
   9818 * ! s:                                   Running Git Manually.
   9819                                                               (line  34)
   9820 * ! S:                                   Running Git Manually.
   9821                                                               (line  38)
   9822 * $:                                     Viewing Git Output.  (line  17)
   9823 * +:                                     Log Buffer.          (line  64)
   9824 * + <1>:                                 Refreshing Diffs.    (line  65)
   9825 * -:                                     Log Buffer.          (line  67)
   9826 * - <1>:                                 Refreshing Diffs.    (line  62)
   9827 * 0:                                     Refreshing Diffs.    (line  68)
   9828 * 1:                                     Section Visibility.  (line  39)
   9829 * 2:                                     Section Visibility.  (line  39)
   9830 * 3:                                     Section Visibility.  (line  39)
   9831 * 4:                                     Section Visibility.  (line  39)
   9832 * 5:                                     Repository List.     (line 115)
   9833 * ::                                     Running Git Manually.
   9834                                                               (line  25)
   9835 * =:                                     Log Buffer.          (line  59)
   9836 * >:                                     Sparse checkouts.    (line  17)
   9837 * > a:                                   Sparse checkouts.    (line  39)
   9838 * > d:                                   Sparse checkouts.    (line  50)
   9839 * > e:                                   Sparse checkouts.    (line  21)
   9840 * > r:                                   Sparse checkouts.    (line  44)
   9841 * > s:                                   Sparse checkouts.    (line  33)
   9842 * ^:                                     Section Movement.    (line  28)
   9843 * a:                                     Applying.            (line  34)
   9844 * A:                                     Cherry Picking.      (line   9)
   9845 * A A:                                   Cherry Picking.      (line  17)
   9846 * A a:                                   Cherry Picking.      (line  23)
   9847 * A A <1>:                               Cherry Picking.      (line  85)
   9848 * A a <1>:                               Cherry Picking.      (line  91)
   9849 * A d:                                   Cherry Picking.      (line  51)
   9850 * A h:                                   Cherry Picking.      (line  40)
   9851 * A n:                                   Cherry Picking.      (line  62)
   9852 * A s:                                   Cherry Picking.      (line  72)
   9853 * A s <1>:                               Cherry Picking.      (line  88)
   9854 * B:                                     Bisecting.           (line   9)
   9855 * b:                                     Blaming.             (line 115)
   9856 * b <1>:                                 Branch Commands.     (line  13)
   9857 * b <2>:                                 Editing Rebase Sequences.
   9858                                                               (line  70)
   9859 * B B:                                   Bisecting.           (line  16)
   9860 * B b:                                   Bisecting.           (line  32)
   9861 * b b:                                   Branch Commands.     (line  47)
   9862 * b C:                                   Branch Commands.     (line  31)
   9863 * b c:                                   Branch Commands.     (line  63)
   9864 * B g:                                   Bisecting.           (line  36)
   9865 * B k:                                   Bisecting.           (line  46)
   9866 * b k:                                   Branch Commands.     (line 138)
   9867 * b l:                                   Branch Commands.     (line  69)
   9868 * B m:                                   Bisecting.           (line  40)
   9869 * b m:                                   Branch Commands.     (line 149)
   9870 * b n:                                   Branch Commands.     (line  54)
   9871 * B r:                                   Bisecting.           (line  51)
   9872 * B s:                                   Bisecting.           (line  26)
   9873 * b s:                                   Branch Commands.     (line  91)
   9874 * b S:                                   Branch Commands.     (line 118)
   9875 * b x:                                   Branch Commands.     (line 123)
   9876 * c:                                     Blaming.             (line 141)
   9877 * C:                                     Cloning Repository.  (line  20)
   9878 * c <1>:                                 Initiating a Commit. (line   9)
   9879 * c <2>:                                 Editing Rebase Sequences.
   9880                                                               (line  59)
   9881 * C >:                                   Cloning Repository.  (line  38)
   9882 * c a:                                   Initiating a Commit. (line  18)
   9883 * c A:                                   Initiating a Commit. (line  59)
   9884 * C b:                                   Cloning Repository.  (line  44)
   9885 * C C:                                   Cloning Repository.  (line  28)
   9886 * c c:                                   Initiating a Commit. (line  14)
   9887 * C d:                                   Cloning Repository.  (line  55)
   9888 * C e:                                   Cloning Repository.  (line  61)
   9889 * c e:                                   Initiating a Commit. (line  21)
   9890 * c f:                                   Initiating a Commit. (line  39)
   9891 * c F:                                   Initiating a Commit. (line  46)
   9892 * C m:                                   Cloning Repository.  (line  48)
   9893 * C s:                                   Cloning Repository.  (line  32)
   9894 * c s:                                   Initiating a Commit. (line  49)
   9895 * c S:                                   Initiating a Commit. (line  56)
   9896 * c w:                                   Initiating a Commit. (line  30)
   9897 * C-<return>:                            Visiting Files and Blobs from a Diff.
   9898                                                               (line  50)
   9899 * C-<tab>:                               Section Visibility.  (line  14)
   9900 * C-c C-a:                               Commit Pseudo Headers.
   9901                                                               (line  16)
   9902 * C-c C-b:                               Log Buffer.          (line  20)
   9903 * C-c C-b <1>:                           Refreshing Diffs.    (line  84)
   9904 * C-c C-c:                               Select from Log.     (line  21)
   9905 * C-c C-c <1>:                           Editing Commit Messages.
   9906                                                               (line  18)
   9907 * C-c C-c <2>:                           Editing Rebase Sequences.
   9908                                                               (line   7)
   9909 * C-c C-d:                               Refreshing Diffs.    (line  75)
   9910 * C-c C-d <1>:                           Editing Commit Messages.
   9911                                                               (line  54)
   9912 * C-c C-e:                               Commands Available in Diffs.
   9913                                                               (line  24)
   9914 * C-c C-f:                               Log Buffer.          (line  23)
   9915 * C-c C-f <1>:                           Refreshing Diffs.    (line  87)
   9916 * C-c C-i:                               Commit Pseudo Headers.
   9917                                                               (line  13)
   9918 * C-c C-k:                               Select from Log.     (line  26)
   9919 * C-c C-k <1>:                           Editing Commit Messages.
   9920                                                               (line  22)
   9921 * C-c C-k <2>:                           Editing Rebase Sequences.
   9922                                                               (line  11)
   9923 * C-c C-n:                               Log Buffer.          (line  26)
   9924 * C-c C-o:                               Commit Pseudo Headers.
   9925                                                               (line  28)
   9926 * C-c C-p:                               Commit Pseudo Headers.
   9927                                                               (line  31)
   9928 * C-c C-r:                               Commit Pseudo Headers.
   9929                                                               (line  19)
   9930 * C-c C-s:                               Commit Pseudo Headers.
   9931                                                               (line  22)
   9932 * C-c C-t:                               Commands Available in Diffs.
   9933                                                               (line  15)
   9934 * C-c C-t <1>:                           Commit Pseudo Headers.
   9935                                                               (line  25)
   9936 * C-c C-w:                               Using the Revision Stack.
   9937                                                               (line   7)
   9938 * C-c f:                                 Commands for Buffers Visiting Files.
   9939                                                               (line  52)
   9940 * C-c f , c:                             Commands for Buffers Visiting Files.
   9941                                                               (line  52)
   9942 * C-c f , k:                             Commands for Buffers Visiting Files.
   9943                                                               (line  52)
   9944 * C-c f , r:                             Commands for Buffers Visiting Files.
   9945                                                               (line  52)
   9946 * C-c f , x:                             Commands for Buffers Visiting Files.
   9947                                                               (line  52)
   9948 * C-c f B:                               Blaming.             (line  28)
   9949 * C-c f b:                               Blaming.             (line  28)
   9950 * C-c f B <1>:                           Commands for Buffers Visiting Files.
   9951                                                               (line  52)
   9952 * C-c f b <1>:                           Commands for Buffers Visiting Files.
   9953                                                               (line  52)
   9954 * C-c f B b:                             Blaming.             (line  28)
   9955 * C-c f B e:                             Blaming.             (line  28)
   9956 * C-c f B f:                             Blaming.             (line  28)
   9957 * C-c f B q:                             Blaming.             (line  28)
   9958 * C-c f B r:                             Blaming.             (line  28)
   9959 * C-c f c:                               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 d:                               Commands for Buffers Visiting Files.
   9964                                                               (line  52)
   9965 * C-c f e:                               Blaming.             (line  28)
   9966 * C-c f e <1>:                           Commands for Buffers Visiting Files.
   9967                                                               (line  52)
   9968 * C-c f f:                               Blaming.             (line  28)
   9969 * C-c f f <1>:                           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 G:                               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 l:                               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 m:                               Commands for Buffers Visiting Files.
   9982                                                               (line  52)
   9983 * C-c f n:                               Commands for Buffers Visiting Files.
   9984                                                               (line  52)
   9985 * C-c f p:                               Commands for Buffers Visiting Files.
   9986                                                               (line  52)
   9987 * C-c f q:                               Blaming.             (line  28)
   9988 * C-c f q <1>:                           Commands for Buffers Visiting Files.
   9989                                                               (line  52)
   9990 * C-c f r:                               Blaming.             (line  28)
   9991 * C-c f r <1>:                           Commands for Buffers Visiting Files.
   9992                                                               (line  52)
   9993 * C-c f s:                               Commands for Buffers Visiting Files.
   9994                                                               (line  52)
   9995 * C-c f s <1>:                           Commands for Buffers Visiting Files.
   9996                                                               (line  52)
   9997 * C-c f t:                               Commands for Buffers Visiting Files.
   9998                                                               (line  52)
   9999 * C-c f u:                               Commands for Buffers Visiting Files.
  10000                                                               (line  52)
  10001 * C-c f u <1>:                           Commands for Buffers Visiting Files.
  10002                                                               (line  52)
  10003 * C-c f v:                               Commands for Buffers Visiting Files.
  10004                                                               (line  52)
  10005 * C-c f V:                               Commands for Buffers Visiting Files.
  10006                                                               (line  52)
  10007 * C-c g:                                 Transient Commands.  (line  20)
  10008 * C-c M-g:                               Commands for Buffers Visiting Files.
  10009                                                               (line  58)
  10010 * C-c M-g , c:                           Commands for Buffers Visiting Files.
  10011                                                               (line  86)
  10012 * C-c M-g , k:                           Commands for Buffers Visiting Files.
  10013                                                               (line  82)
  10014 * C-c M-g , r:                           Commands for Buffers Visiting Files.
  10015                                                               (line  78)
  10016 * C-c M-g , x:                           Commands for Buffers Visiting Files.
  10017                                                               (line  74)
  10018 * C-c M-g B:                             Blaming.             (line  34)
  10019 * C-c M-g b:                             Blaming.             (line  45)
  10020 * C-c M-g B <1>:                         Commands for Buffers Visiting Files.
  10021                                                               (line 137)
  10022 * C-c M-g B b:                           Blaming.             (line  45)
  10023 * C-c M-g B e:                           Blaming.             (line  76)
  10024 * C-c M-g B f:                           Blaming.             (line  68)
  10025 * C-c M-g B q:                           Blaming.             (line  87)
  10026 * C-c M-g B r:                           Blaming.             (line  60)
  10027 * C-c M-g c:                             Commands for Buffers Visiting Files.
  10028                                                               (line 176)
  10029 * C-c M-g D:                             Commands for Buffers Visiting Files.
  10030                                                               (line  91)
  10031 * C-c M-g d:                             Commands for Buffers Visiting Files.
  10032                                                               (line 101)
  10033 * C-c M-g e:                             Blaming.             (line  76)
  10034 * C-c M-g e <1>:                         Commands for Buffers Visiting Files.
  10035                                                               (line 182)
  10036 * C-c M-g f:                             Blaming.             (line  68)
  10037 * C-c M-g g:                             Commands for Buffers Visiting Files.
  10038                                                               (line 166)
  10039 * C-c M-g G:                             Commands for Buffers Visiting Files.
  10040                                                               (line 172)
  10041 * C-c M-g L:                             Commands for Buffers Visiting Files.
  10042                                                               (line 109)
  10043 * C-c M-g l:                             Commands for Buffers Visiting Files.
  10044                                                               (line 119)
  10045 * C-c M-g M:                             Commands for Buffers Visiting Files.
  10046                                                               (line 132)
  10047 * C-c M-g n:                             Commands for Buffers Visiting Files.
  10048                                                               (line 153)
  10049 * C-c M-g p:                             Commands for Buffers Visiting Files.
  10050                                                               (line 149)
  10051 * C-c M-g q:                             Blaming.             (line  87)
  10052 * C-c M-g r:                             Blaming.             (line  60)
  10053 * C-c M-g s:                             Commands for Buffers Visiting Files.
  10054                                                               (line  63)
  10055 * C-c M-g s <1>:                         Commands for Buffers Visiting Files.
  10056                                                               (line  63)
  10057 * C-c M-g t:                             Commands for Buffers Visiting Files.
  10058                                                               (line 129)
  10059 * C-c M-g u:                             Commands for Buffers Visiting Files.
  10060                                                               (line  69)
  10061 * C-c M-g u <1>:                         Commands for Buffers Visiting Files.
  10062                                                               (line  69)
  10063 * C-c M-g v:                             Commands for Buffers Visiting Files.
  10064                                                               (line 156)
  10065 * C-c M-g V:                             Commands for Buffers Visiting Files.
  10066                                                               (line 160)
  10067 * C-c M-i:                               Commit Pseudo Headers.
  10068                                                               (line  35)
  10069 * C-c M-s:                               Editing Commit Messages.
  10070                                                               (line  33)
  10071 * C-c TAB:                               Section Visibility.  (line  14)
  10072 * C-w:                                   Common Commands.     (line  22)
  10073 * C-x g:                                 Status Buffer.       (line  23)
  10074 * C-x M-g:                               Transient Commands.  (line  20)
  10075 * C-x u:                                 Editing Rebase Sequences.
  10076                                                               (line  77)
  10077 * d:                                     Diffing.             (line  22)
  10078 * D:                                     Refreshing Diffs.    (line  16)
  10079 * d c:                                   Diffing.             (line  63)
  10080 * d d:                                   Diffing.             (line  27)
  10081 * D f:                                   Refreshing Diffs.    (line  45)
  10082 * D F:                                   Refreshing Diffs.    (line  49)
  10083 * D g:                                   Refreshing Diffs.    (line  21)
  10084 * d p:                                   Diffing.             (line  56)
  10085 * d r:                                   Diffing.             (line  30)
  10086 * D r:                                   Refreshing Diffs.    (line  41)
  10087 * d s:                                   Diffing.             (line  48)
  10088 * D s:                                   Refreshing Diffs.    (line  25)
  10089 * d t:                                   Diffing.             (line  67)
  10090 * D t:                                   Refreshing Diffs.    (line  38)
  10091 * d u:                                   Diffing.             (line  53)
  10092 * d w:                                   Diffing.             (line  43)
  10093 * D w:                                   Refreshing Diffs.    (line  31)
  10094 * DEL:                                   Log Buffer.          (line  50)
  10095 * DEL <1>:                               Commands Available in Diffs.
  10096                                                               (line  56)
  10097 * DEL <2>:                               Blaming.             (line 103)
  10098 * DEL <3>:                               Editing Rebase Sequences.
  10099                                                               (line  25)
  10100 * e:                                     Ediffing.            (line  10)
  10101 * E:                                     Ediffing.            (line  21)
  10102 * e <1>:                                 Editing Rebase Sequences.
  10103                                                               (line  46)
  10104 * E c:                                   Ediffing.            (line 100)
  10105 * E i:                                   Ediffing.            (line  94)
  10106 * E m:                                   Ediffing.            (line  33)
  10107 * E m <1>:                               Ediffing.            (line  48)
  10108 * E r:                                   Ediffing.            (line  25)
  10109 * E s:                                   Ediffing.            (line  87)
  10110 * E t:                                   Ediffing.            (line  79)
  10111 * E u:                                   Ediffing.            (line  91)
  10112 * E w:                                   Ediffing.            (line  97)
  10113 * E z:                                   Ediffing.            (line 103)
  10114 * f:                                     Repository List.     (line 111)
  10115 * f <1>:                                 Editing Rebase Sequences.
  10116                                                               (line  52)
  10117 * f <2>:                                 Fetching.            (line  10)
  10118 * F:                                     Pulling.             (line  10)
  10119 * f a:                                   Fetching.            (line  45)
  10120 * f C:                                   Branch Commands.     (line  31)
  10121 * F C:                                   Branch Commands.     (line  31)
  10122 * f e:                                   Fetching.            (line  34)
  10123 * F e:                                   Pulling.             (line  28)
  10124 * f m:                                   Fetching.            (line  48)
  10125 * f o:                                   Fetching.            (line  37)
  10126 * f p:                                   Fetching.            (line  15)
  10127 * F p:                                   Pulling.             (line  14)
  10128 * f r:                                   Fetching.            (line  41)
  10129 * f u:                                   Fetching.            (line  22)
  10130 * F u:                                   Pulling.             (line  21)
  10131 * g:                                     Automatic Refreshing of Magit Buffers.
  10132                                                               (line  26)
  10133 * G:                                     Automatic Refreshing of Magit Buffers.
  10134                                                               (line  34)
  10135 * H:                                     Section Types and Values.
  10136                                                               (line  14)
  10137 * I:                                     Creating Repository. (line   7)
  10138 * j:                                     Log Buffer.          (line  31)
  10139 * j <1>:                                 Commands Available in Diffs.
  10140                                                               (line  43)
  10141 * k:                                     Viewing Git Output.  (line  24)
  10142 * k <1>:                                 Applying.            (line  40)
  10143 * k <2>:                                 Editing Rebase Sequences.
  10144                                                               (line  56)
  10145 * k <3>:                                 Stashing.            (line 118)
  10146 * l:                                     Logging.             (line  30)
  10147 * L:                                     Refreshing Logs.     (line  12)
  10148 * L <1>:                                 Log Buffer.          (line   7)
  10149 * L <2>:                                 Log Margin.          (line  52)
  10150 * l <1>:                                 Editing Rebase Sequences.
  10151                                                               (line  94)
  10152 * l a:                                   Logging.             (line  61)
  10153 * l b:                                   Logging.             (line  58)
  10154 * L d:                                   Log Margin.          (line  66)
  10155 * L g:                                   Refreshing Logs.     (line  17)
  10156 * l h:                                   Logging.             (line  40)
  10157 * l H:                                   Reflog.              (line  18)
  10158 * l l:                                   Logging.             (line  35)
  10159 * l L:                                   Logging.             (line  55)
  10160 * L L:                                   Refreshing Logs.     (line  34)
  10161 * L L <1>:                               Log Margin.          (line  60)
  10162 * L l:                                   Log Margin.          (line  63)
  10163 * l o:                                   Logging.             (line  49)
  10164 * l O:                                   Reflog.              (line  15)
  10165 * l r:                                   Reflog.              (line  12)
  10166 * L s:                                   Refreshing Logs.     (line  21)
  10167 * l u:                                   Logging.             (line  43)
  10168 * L w:                                   Refreshing Logs.     (line  27)
  10169 * m:                                     Repository List.     (line 105)
  10170 * m <1>:                                 Merging.             (line  10)
  10171 * M:                                     Remote Commands.     (line  14)
  10172 * m a:                                   Merging.             (line  42)
  10173 * m a <1>:                               Merging.             (line  91)
  10174 * M a:                                   Remote Commands.     (line  48)
  10175 * M C:                                   Remote Commands.     (line  32)
  10176 * m e:                                   Merging.             (line  30)
  10177 * m i:                                   Merging.             (line  54)
  10178 * M k:                                   Remote Commands.     (line  60)
  10179 * m m:                                   Merging.             (line  18)
  10180 * m m <1>:                               Merging.             (line  86)
  10181 * m n:                                   Merging.             (line  36)
  10182 * m p:                                   Merging.             (line  75)
  10183 * M p:                                   Remote Commands.     (line  63)
  10184 * M P:                                   Remote Commands.     (line  67)
  10185 * M r:                                   Remote Commands.     (line  52)
  10186 * m s:                                   Merging.             (line  67)
  10187 * M u:                                   Remote Commands.     (line  56)
  10188 * M-1:                                   Section Visibility.  (line  45)
  10189 * M-2:                                   Section Visibility.  (line  45)
  10190 * M-3:                                   Section Visibility.  (line  45)
  10191 * M-4:                                   Section Visibility.  (line  45)
  10192 * M-<tab>:                               Section Visibility.  (line  29)
  10193 * M-n:                                   Section Movement.    (line  24)
  10194 * M-n <1>:                               Editing Commit Messages.
  10195                                                               (line  41)
  10196 * M-n <2>:                               Editing Rebase Sequences.
  10197                                                               (line  40)
  10198 * M-p:                                   Section Movement.    (line  19)
  10199 * M-p <1>:                               Editing Commit Messages.
  10200                                                               (line  36)
  10201 * M-p <2>:                               Editing Rebase Sequences.
  10202                                                               (line  37)
  10203 * M-w:                                   Blaming.             (line 134)
  10204 * M-w <1>:                               Common Commands.     (line  39)
  10205 * MM:                                    Editing Rebase Sequences.
  10206                                                               (line 102)
  10207 * Mt:                                    Editing Rebase Sequences.
  10208                                                               (line 108)
  10209 * n:                                     Section Movement.    (line  16)
  10210 * n <1>:                                 Blaming.             (line 118)
  10211 * N:                                     Blaming.             (line 121)
  10212 * n <2>:                                 Editing Rebase Sequences.
  10213                                                               (line  34)
  10214 * n <3>:                                 Minor Mode for Buffers Visiting Blobs.
  10215                                                               (line  16)
  10216 * o:                                     Submodule Transient. (line   7)
  10217 * O:                                     Subtree.             (line   9)
  10218 * o a:                                   Submodule Transient. (line  20)
  10219 * o d:                                   Submodule Transient. (line  45)
  10220 * O e:                                   Subtree.             (line  37)
  10221 * O e p:                                 Subtree.             (line  48)
  10222 * O e s:                                 Subtree.             (line  52)
  10223 * o f:                                   Submodule Transient. (line  51)
  10224 * O i:                                   Subtree.             (line  13)
  10225 * O i a:                                 Subtree.             (line  24)
  10226 * O i c:                                 Subtree.             (line  28)
  10227 * O i f:                                 Subtree.             (line  34)
  10228 * O i m:                                 Subtree.             (line  31)
  10229 * o l:                                   Submodule Transient. (line  48)
  10230 * o p:                                   Submodule Transient. (line  32)
  10231 * o r:                                   Submodule Transient. (line  26)
  10232 * o s:                                   Submodule Transient. (line  40)
  10233 * o u:                                   Submodule Transient. (line  36)
  10234 * p:                                     Section Movement.    (line  11)
  10235 * p <1>:                                 Blaming.             (line 124)
  10236 * P:                                     Blaming.             (line 127)
  10237 * p <2>:                                 Editing Rebase Sequences.
  10238                                                               (line  31)
  10239 * P <1>:                                 Pushing.             (line  10)
  10240 * p <3>:                                 Minor Mode for Buffers Visiting Blobs.
  10241                                                               (line  13)
  10242 * P C:                                   Branch Commands.     (line  31)
  10243 * P e:                                   Pushing.             (line  29)
  10244 * P m:                                   Pushing.             (line  45)
  10245 * P o:                                   Pushing.             (line  33)
  10246 * P p:                                   Pushing.             (line  15)
  10247 * P r:                                   Pushing.             (line  37)
  10248 * P t:                                   Pushing.             (line  52)
  10249 * P T:                                   Pushing.             (line  59)
  10250 * P u:                                   Pushing.             (line  22)
  10251 * q:                                     Quitting Windows.    (line   7)
  10252 * q <1>:                                 Log Buffer.          (line  14)
  10253 * q <2>:                                 Blaming.             (line 130)
  10254 * q <3>:                                 Minor Mode for Buffers Visiting Blobs.
  10255                                                               (line  19)
  10256 * r:                                     Rebasing.            (line  10)
  10257 * r <1>:                                 Editing Rebase Sequences.
  10258                                                               (line  43)
  10259 * r a:                                   Rebasing.            (line 111)
  10260 * r e:                                   Rebasing.            (line  42)
  10261 * r e <1>:                               Rebasing.            (line 107)
  10262 * r f:                                   Rebasing.            (line  79)
  10263 * r i:                                   Rebasing.            (line  76)
  10264 * r k:                                   Rebasing.            (line  91)
  10265 * r m:                                   Rebasing.            (line  83)
  10266 * r p:                                   Rebasing.            (line  28)
  10267 * r r:                                   Rebasing.            (line  97)
  10268 * r s:                                   Rebasing.            (line  47)
  10269 * r s <1>:                               Rebasing.            (line 103)
  10270 * r u:                                   Rebasing.            (line  35)
  10271 * r w:                                   Rebasing.            (line  87)
  10272 * RET:                                   Repository List.     (line 102)
  10273 * RET <1>:                               References Buffer.   (line 159)
  10274 * RET <2>:                               Visiting Files and Blobs from a Diff.
  10275                                                               (line   9)
  10276 * RET <3>:                               Blaming.             (line  91)
  10277 * RET <4>:                               Editing Rebase Sequences.
  10278                                                               (line  15)
  10279 * s:                                     Staging and Unstaging.
  10280                                                               (line  29)
  10281 * S:                                     Staging and Unstaging.
  10282                                                               (line  36)
  10283 * s <1>:                                 Editing Rebase Sequences.
  10284                                                               (line  49)
  10285 * S-<tab>:                               Section Visibility.  (line  33)
  10286 * SPC:                                   Log Buffer.          (line  41)
  10287 * SPC <1>:                               Commands Available in Diffs.
  10288                                                               (line  53)
  10289 * SPC <2>:                               Blaming.             (line  94)
  10290 * SPC <3>:                               Editing Rebase Sequences.
  10291                                                               (line  19)
  10292 * t:                                     Editing Rebase Sequences.
  10293                                                               (line  97)
  10294 * t <1>:                                 Tagging.             (line   9)
  10295 * T:                                     Notes.               (line   9)
  10296 * T a:                                   Notes.               (line  47)
  10297 * T c:                                   Notes.               (line  43)
  10298 * t k:                                   Tagging.             (line  37)
  10299 * T m:                                   Notes.               (line  35)
  10300 * t p:                                   Tagging.             (line  43)
  10301 * T p:                                   Notes.               (line  28)
  10302 * t r:                                   Tagging.             (line  18)
  10303 * T r:                                   Notes.               (line  21)
  10304 * t t:                                   Tagging.             (line  14)
  10305 * T T:                                   Notes.               (line  14)
  10306 * TAB:                                   Section Visibility.  (line  10)
  10307 * u:                                     Repository List.     (line 108)
  10308 * u <1>:                                 Staging and Unstaging.
  10309                                                               (line  42)
  10310 * U:                                     Staging and Unstaging.
  10311                                                               (line  50)
  10312 * v:                                     Applying.            (line  47)
  10313 * V:                                     Reverting.           (line   7)
  10314 * V a:                                   Reverting.           (line  35)
  10315 * V s:                                   Reverting.           (line  32)
  10316 * V V:                                   Reverting.           (line  15)
  10317 * V v:                                   Reverting.           (line  20)
  10318 * V V <1>:                               Reverting.           (line  29)
  10319 * W:                                     Plain Patches.       (line   7)
  10320 * w:                                     Maildir Patches.     (line   9)
  10321 * w a:                                   Plain Patches.       (line  20)
  10322 * w a <1>:                               Maildir Patches.     (line  23)
  10323 * w a <2>:                               Maildir Patches.     (line  38)
  10324 * W c:                                   Plain Patches.       (line  12)
  10325 * w m:                                   Maildir Patches.     (line  20)
  10326 * W s:                                   Plain Patches.       (line  26)
  10327 * w s:                                   Maildir Patches.     (line  34)
  10328 * w w:                                   Maildir Patches.     (line  14)
  10329 * w w <1>:                               Maildir Patches.     (line  31)
  10330 * x:                                     Editing Rebase Sequences.
  10331                                                               (line  62)
  10332 * x <1>:                                 Resetting.           (line   9)
  10333 * X f:                                   Resetting.           (line  44)
  10334 * X h:                                   Resetting.           (line  24)
  10335 * X i:                                   Resetting.           (line  33)
  10336 * X k:                                   Resetting.           (line  28)
  10337 * X m:                                   Resetting.           (line  15)
  10338 * X s:                                   Resetting.           (line  19)
  10339 * X w:                                   Resetting.           (line  39)
  10340 * X w <1>:                               Wip Modes.           (line  64)
  10341 * Y:                                     Cherries.            (line  18)
  10342 * y:                                     References Buffer.   (line   7)
  10343 * y <1>:                                 Editing Rebase Sequences.
  10344                                                               (line  74)
  10345 * y c:                                   References Buffer.   (line  25)
  10346 * y o:                                   References Buffer.   (line  30)
  10347 * y r:                                   References Buffer.   (line  34)
  10348 * y y:                                   References Buffer.   (line  21)
  10349 * z:                                     Stashing.            (line   9)
  10350 * Z:                                     Worktree.            (line   9)
  10351 * z a:                                   Stashing.            (line  52)
  10352 * z b:                                   Stashing.            (line 105)
  10353 * z B:                                   Stashing.            (line 110)
  10354 * Z b:                                   Worktree.            (line  13)
  10355 * Z c:                                   Worktree.            (line  16)
  10356 * z f:                                   Stashing.            (line 115)
  10357 * Z g:                                   Worktree.            (line  26)
  10358 * z i:                                   Stashing.            (line  20)
  10359 * z I:                                   Stashing.            (line  42)
  10360 * z k:                                   Stashing.            (line  98)
  10361 * Z k:                                   Worktree.            (line  22)
  10362 * z l:                                   Stashing.            (line 121)
  10363 * Z m:                                   Worktree.            (line  19)
  10364 * z p:                                   Stashing.            (line  74)
  10365 * z v:                                   Stashing.            (line 102)
  10366 * z w:                                   Stashing.            (line  24)
  10367 * z W:                                   Stashing.            (line  46)
  10368 * z x:                                   Stashing.            (line  30)
  10369 * z z:                                   Stashing.            (line  14)
  10370 * z Z:                                   Stashing.            (line  36)
  10371 
  10372 
  10373 File: magit.info,  Node: Function and Command Index,  Next: Variable Index,  Prev: Keystroke Index,  Up: Top
  10374 
  10375 Appendix D Function and Command Index
  10376 *************************************
  10377 
  10378 
  10379 * Menu:
  10380 
  10381 * bug-reference-mode:                    Commit Mode and Hooks.
  10382                                                               (line  48)
  10383 * forward-line:                          Editing Rebase Sequences.
  10384                                                               (line  34)
  10385 * git-commit-ack:                        Commit Pseudo Headers.
  10386                                                               (line  16)
  10387 * git-commit-cc:                         Commit Pseudo Headers.
  10388                                                               (line  28)
  10389 * git-commit-check-style-conventions:    Commit Message Conventions.
  10390                                                               (line  33)
  10391 * git-commit-insert-pseudo-header:       Commit Pseudo Headers.
  10392                                                               (line  13)
  10393 * git-commit-next-message:               Editing Commit Messages.
  10394                                                               (line  41)
  10395 * git-commit-prev-message:               Editing Commit Messages.
  10396                                                               (line  36)
  10397 * git-commit-propertize-diff:            Commit Mode and Hooks.
  10398                                                               (line  40)
  10399 * git-commit-reported:                   Commit Pseudo Headers.
  10400                                                               (line  31)
  10401 * git-commit-review:                     Commit Pseudo Headers.
  10402                                                               (line  19)
  10403 * git-commit-save-message:               Editing Commit Messages.
  10404                                                               (line  33)
  10405 * git-commit-save-message <1>:           Commit Mode and Hooks.
  10406                                                               (line  26)
  10407 * git-commit-setup-changelog-support:    Commit Mode and Hooks.
  10408                                                               (line  29)
  10409 * git-commit-signoff:                    Commit Pseudo Headers.
  10410                                                               (line  22)
  10411 * git-commit-suggested:                  Commit Pseudo Headers.
  10412                                                               (line  35)
  10413 * git-commit-test:                       Commit Pseudo Headers.
  10414                                                               (line  25)
  10415 * git-commit-turn-on-auto-fill:          Commit Mode and Hooks.
  10416                                                               (line  33)
  10417 * git-commit-turn-on-flyspell:           Commit Mode and Hooks.
  10418                                                               (line  36)
  10419 * git-rebase-backward-line:              Editing Rebase Sequences.
  10420                                                               (line  31)
  10421 * git-rebase-break:                      Editing Rebase Sequences.
  10422                                                               (line  70)
  10423 * git-rebase-edit:                       Editing Rebase Sequences.
  10424                                                               (line  46)
  10425 * git-rebase-exec:                       Editing Rebase Sequences.
  10426                                                               (line  62)
  10427 * git-rebase-fixup:                      Editing Rebase Sequences.
  10428                                                               (line  52)
  10429 * git-rebase-insert:                     Editing Rebase Sequences.
  10430                                                               (line  74)
  10431 * git-rebase-kill-line:                  Editing Rebase Sequences.
  10432                                                               (line  56)
  10433 * git-rebase-label:                      Editing Rebase Sequences.
  10434                                                               (line  94)
  10435 * git-rebase-merge:                      Editing Rebase Sequences.
  10436                                                               (line 102)
  10437 * git-rebase-merge-toggle-editmsg:       Editing Rebase Sequences.
  10438                                                               (line 108)
  10439 * git-rebase-move-line-down:             Editing Rebase Sequences.
  10440                                                               (line  40)
  10441 * git-rebase-move-line-up:               Editing Rebase Sequences.
  10442                                                               (line  37)
  10443 * git-rebase-pick:                       Editing Rebase Sequences.
  10444                                                               (line  59)
  10445 * git-rebase-reset:                      Editing Rebase Sequences.
  10446                                                               (line  97)
  10447 * git-rebase-reword:                     Editing Rebase Sequences.
  10448                                                               (line  43)
  10449 * git-rebase-show-commit:                Editing Rebase Sequences.
  10450                                                               (line  15)
  10451 * git-rebase-show-or-scroll-down:        Editing Rebase Sequences.
  10452                                                               (line  25)
  10453 * git-rebase-show-or-scroll-up:          Editing Rebase Sequences.
  10454                                                               (line  19)
  10455 * git-rebase-squash:                     Editing Rebase Sequences.
  10456                                                               (line  49)
  10457 * git-rebase-undo:                       Editing Rebase Sequences.
  10458                                                               (line  77)
  10459 * ido-enter-magit-status:                Status Buffer.       (line  96)
  10460 * magit-add-section-hook:                Section Hooks.       (line  20)
  10461 * magit-after-save-refresh-status:       Automatic Refreshing of Magit Buffers.
  10462                                                               (line  55)
  10463 * magit-am:                              Maildir Patches.     (line   9)
  10464 * magit-am-abort:                        Maildir Patches.     (line  38)
  10465 * magit-am-apply-maildir:                Maildir Patches.     (line  20)
  10466 * magit-am-apply-patches:                Maildir Patches.     (line  14)
  10467 * magit-am-continue:                     Maildir Patches.     (line  31)
  10468 * magit-am-skip:                         Maildir Patches.     (line  34)
  10469 * magit-apply:                           Applying.            (line  34)
  10470 * magit-bisect:                          Bisecting.           (line   9)
  10471 * magit-bisect-bad:                      Bisecting.           (line  32)
  10472 * magit-bisect-good:                     Bisecting.           (line  36)
  10473 * magit-bisect-mark:                     Bisecting.           (line  40)
  10474 * magit-bisect-reset:                    Bisecting.           (line  51)
  10475 * magit-bisect-run:                      Bisecting.           (line  26)
  10476 * magit-bisect-skip:                     Bisecting.           (line  46)
  10477 * magit-bisect-start:                    Bisecting.           (line  16)
  10478 * magit-blame:                           Blaming.             (line  28)
  10479 * magit-blame <1>:                       Blaming.             (line  34)
  10480 * magit-blame <2>:                       Blaming.             (line 115)
  10481 * magit-blame <3>:                       Commands for Buffers Visiting Files.
  10482                                                               (line  52)
  10483 * magit-blame <4>:                       Commands for Buffers Visiting Files.
  10484                                                               (line 137)
  10485 * magit-blame-addition:                  Blaming.             (line  28)
  10486 * magit-blame-addition <1>:              Blaming.             (line  45)
  10487 * magit-blame-additions:                 Commands for Buffers Visiting Files.
  10488                                                               (line  52)
  10489 * magit-blame-copy-hash:                 Blaming.             (line 134)
  10490 * magit-blame-cycle-style:               Blaming.             (line 141)
  10491 * magit-blame-echo:                      Blaming.             (line  28)
  10492 * magit-blame-echo <1>:                  Blaming.             (line  76)
  10493 * magit-blame-echo <2>:                  Commands for Buffers Visiting Files.
  10494                                                               (line  52)
  10495 * magit-blame-next-chunk:                Blaming.             (line 118)
  10496 * magit-blame-next-chunk-same-commit:    Blaming.             (line 121)
  10497 * magit-blame-previous-chunk:            Blaming.             (line 124)
  10498 * magit-blame-previous-chunk-same-commit: Blaming.            (line 127)
  10499 * magit-blame-quit:                      Blaming.             (line  28)
  10500 * magit-blame-quit <1>:                  Blaming.             (line  87)
  10501 * magit-blame-quit <2>:                  Blaming.             (line 130)
  10502 * magit-blame-quit <3>:                  Commands for Buffers Visiting Files.
  10503                                                               (line  52)
  10504 * magit-blame-removal:                   Blaming.             (line  28)
  10505 * magit-blame-removal <1>:               Blaming.             (line  60)
  10506 * magit-blame-removal <2>:               Commands for Buffers Visiting Files.
  10507                                                               (line  52)
  10508 * magit-blame-reverse:                   Blaming.             (line  28)
  10509 * magit-blame-reverse <1>:               Blaming.             (line  68)
  10510 * magit-blame-reverse <2>:               Commands for Buffers Visiting Files.
  10511                                                               (line  52)
  10512 * magit-blob-next:                       Commands for Buffers Visiting Files.
  10513                                                               (line  52)
  10514 * magit-blob-next <1>:                   Commands for Buffers Visiting Files.
  10515                                                               (line 153)
  10516 * magit-blob-next <2>:                   Minor Mode for Buffers Visiting Blobs.
  10517                                                               (line  16)
  10518 * magit-blob-previous:                   Commands for Buffers Visiting Files.
  10519                                                               (line  52)
  10520 * magit-blob-previous <1>:               Commands for Buffers Visiting Files.
  10521                                                               (line 149)
  10522 * magit-blob-previous <2>:               Minor Mode for Buffers Visiting Blobs.
  10523                                                               (line  13)
  10524 * magit-blob-visit-file:                 Commands for Buffers Visiting Files.
  10525                                                               (line  52)
  10526 * magit-blob-visit-file <1>:             Commands for Buffers Visiting Files.
  10527                                                               (line 160)
  10528 * magit-branch:                          Branch Commands.     (line  13)
  10529 * magit-branch-and-checkout:             Branch Commands.     (line  63)
  10530 * magit-branch-checkout:                 Branch Commands.     (line  69)
  10531 * magit-branch-configure:                Branch Commands.     (line  31)
  10532 * magit-branch-create:                   Branch Commands.     (line  54)
  10533 * magit-branch-delete:                   Branch Commands.     (line 138)
  10534 * magit-branch-or-checkout:              Branch Commands.     (line 257)
  10535 * magit-branch-orphan:                   Branch Commands.     (line 253)
  10536 * magit-branch-rename:                   Branch Commands.     (line 149)
  10537 * magit-branch-reset:                    Branch Commands.     (line 123)
  10538 * magit-branch-shelve:                   Auxiliary Branch Commands.
  10539                                                               (line   9)
  10540 * magit-branch-spinoff:                  Branch Commands.     (line  91)
  10541 * magit-branch-spinout:                  Branch Commands.     (line 118)
  10542 * magit-branch-unshelve:                 Auxiliary Branch Commands.
  10543                                                               (line  19)
  10544 * magit-builtin-completing-read:         Support for Completion Frameworks.
  10545                                                               (line  41)
  10546 * magit-bundle:                          Bundle.              (line   8)
  10547 * magit-call-git:                        Calling Git for Effect.
  10548                                                               (line  28)
  10549 * magit-call-process:                    Calling Git for Effect.
  10550                                                               (line  31)
  10551 * magit-cancel-section:                  Creating Sections.   (line  69)
  10552 * magit-checkout:                        Branch Commands.     (line  47)
  10553 * magit-cherry:                          Cherries.            (line  18)
  10554 * magit-cherry-apply:                    Cherry Picking.      (line  23)
  10555 * magit-cherry-copy:                     Cherry Picking.      (line  17)
  10556 * magit-cherry-donate:                   Cherry Picking.      (line  51)
  10557 * magit-cherry-harvest:                  Cherry Picking.      (line  40)
  10558 * magit-cherry-pick:                     Cherry Picking.      (line   9)
  10559 * magit-cherry-spinoff:                  Cherry Picking.      (line  72)
  10560 * magit-cherry-spinout:                  Cherry Picking.      (line  62)
  10561 * magit-clone:                           Cloning Repository.  (line  20)
  10562 * magit-clone-bare:                      Cloning Repository.  (line  44)
  10563 * magit-clone-mirror:                    Cloning Repository.  (line  48)
  10564 * magit-clone-regular:                   Cloning Repository.  (line  28)
  10565 * magit-clone-shallow:                   Cloning Repository.  (line  32)
  10566 * magit-clone-shallow-exclude:           Cloning Repository.  (line  61)
  10567 * magit-clone-shallow-since:             Cloning Repository.  (line  55)
  10568 * magit-clone-sparse:                    Cloning Repository.  (line  38)
  10569 * magit-commit:                          Initiating a Commit. (line   9)
  10570 * magit-commit <1>:                      Commands for Buffers Visiting Files.
  10571                                                               (line  52)
  10572 * magit-commit <2>:                      Commands for Buffers Visiting Files.
  10573                                                               (line 176)
  10574 * magit-commit-amend:                    Initiating a Commit. (line  18)
  10575 * magit-commit-augment:                  Initiating a Commit. (line  59)
  10576 * magit-commit-create:                   Initiating a Commit. (line  14)
  10577 * magit-commit-extend:                   Initiating a Commit. (line  21)
  10578 * magit-commit-fixup:                    Initiating a Commit. (line  39)
  10579 * magit-commit-instant-fixup:            Initiating a Commit. (line  46)
  10580 * magit-commit-instant-squash:           Initiating a Commit. (line  56)
  10581 * magit-commit-reword:                   Initiating a Commit. (line  30)
  10582 * magit-commit-squash:                   Initiating a Commit. (line  49)
  10583 * magit-completing-read:                 Support for Completion Frameworks.
  10584                                                               (line  57)
  10585 * magit-copy-buffer-revision:            Common Commands.     (line  39)
  10586 * magit-copy-section-value:              Common Commands.     (line  22)
  10587 * magit-current-section:                 Section Selection.   (line   6)
  10588 * magit-cycle-margin-style:              Log Margin.          (line  63)
  10589 * magit-debug-git-executable:            Git Executable.      (line  55)
  10590 * magit-debug-git-executable <1>:        Debugging Tools.     (line  57)
  10591 * magit-define-section-jumper:           Creating Sections.   (line  74)
  10592 * magit-describe-section:                Section Types and Values.
  10593                                                               (line  14)
  10594 * magit-describe-section-briefly:        Section Types and Values.
  10595                                                               (line  17)
  10596 * magit-describe-section-briefly <1>:    Matching Sections.   (line   7)
  10597 * magit-diff:                            Diffing.             (line  22)
  10598 * magit-diff <1>:                        Commands for Buffers Visiting Files.
  10599                                                               (line  52)
  10600 * magit-diff <2>:                        Commands for Buffers Visiting Files.
  10601                                                               (line  91)
  10602 * magit-diff-buffer-file:                Commands for Buffers Visiting Files.
  10603                                                               (line  52)
  10604 * magit-diff-buffer-file <1>:            Commands for Buffers Visiting Files.
  10605                                                               (line 101)
  10606 * magit-diff-default-context:            Refreshing Diffs.    (line  68)
  10607 * magit-diff-dwim:                       Diffing.             (line  27)
  10608 * magit-diff-edit-hunk-commit:           Commands Available in Diffs.
  10609                                                               (line  24)
  10610 * magit-diff-flip-revs:                  Refreshing Diffs.    (line  45)
  10611 * magit-diff-less-context:               Refreshing Diffs.    (line  62)
  10612 * magit-diff-more-context:               Refreshing Diffs.    (line  65)
  10613 * magit-diff-paths:                      Diffing.             (line  56)
  10614 * magit-diff-range:                      Diffing.             (line  30)
  10615 * magit-diff-refresh:                    Refreshing Diffs.    (line  16)
  10616 * magit-diff-refresh <1>:                Refreshing Diffs.    (line  21)
  10617 * magit-diff-save-default-arguments:     Refreshing Diffs.    (line  31)
  10618 * magit-diff-scope:                      Matching Sections.   (line 110)
  10619 * magit-diff-set-default-arguments:      Refreshing Diffs.    (line  25)
  10620 * magit-diff-show-or-scroll-down:        Log Buffer.          (line  50)
  10621 * magit-diff-show-or-scroll-down <1>:    Blaming.             (line 103)
  10622 * magit-diff-show-or-scroll-up:          Log Buffer.          (line  41)
  10623 * magit-diff-show-or-scroll-up <1>:      Blaming.             (line  94)
  10624 * magit-diff-staged:                     Diffing.             (line  48)
  10625 * magit-diff-switch-range-type:          Refreshing Diffs.    (line  41)
  10626 * magit-diff-toggle-file-filter:         Refreshing Diffs.    (line  49)
  10627 * magit-diff-toggle-refine-hunk:         Refreshing Diffs.    (line  38)
  10628 * magit-diff-trace-definition:           Commands Available in Diffs.
  10629                                                               (line  15)
  10630 * magit-diff-type:                       Matching Sections.   (line  88)
  10631 * magit-diff-unstaged:                   Diffing.             (line  53)
  10632 * magit-diff-visit-file:                 Visiting Files and Blobs from a Diff.
  10633                                                               (line   9)
  10634 * magit-diff-visit-file-other-frame:     Visiting Files and Blobs from a Diff.
  10635                                                               (line  71)
  10636 * magit-diff-visit-file-other-window:    Visiting Files and Blobs from a Diff.
  10637                                                               (line  70)
  10638 * magit-diff-visit-file-worktree:        Visiting Files and Blobs from a Diff.
  10639                                                               (line  50)
  10640 * magit-diff-visit-worktree-file-other-frame: Visiting Files and Blobs from a Diff.
  10641                                                               (line  73)
  10642 * magit-diff-visit-worktree-file-other-window: Visiting Files and Blobs from a Diff.
  10643                                                               (line  72)
  10644 * magit-diff-while-committing:           Refreshing Diffs.    (line  75)
  10645 * magit-diff-while-committing <1>:       Editing Commit Messages.
  10646                                                               (line  54)
  10647 * magit-diff-working-tree:               Diffing.             (line  43)
  10648 * magit-disable-section-inserter:        Per-Repository Configuration.
  10649                                                               (line  31)
  10650 * magit-discard:                         Applying.            (line  40)
  10651 * magit-dispatch:                        Transient Commands.  (line  20)
  10652 * magit-display-buffer:                  Switching Buffers.   (line   6)
  10653 * magit-display-buffer-fullcolumn-most-v1: Switching Buffers. (line  68)
  10654 * magit-display-buffer-fullframe-status-topleft-v1: Switching Buffers.
  10655                                                               (line  59)
  10656 * magit-display-buffer-fullframe-status-v1: Switching Buffers.
  10657                                                               (line  54)
  10658 * magit-display-buffer-same-window-except-diff-v1: Switching Buffers.
  10659                                                               (line  49)
  10660 * magit-display-buffer-traditional:      Switching Buffers.   (line  42)
  10661 * magit-display-repository-buffer:       Common Commands.     (line   9)
  10662 * magit-display-repository-buffer <1>:   Commands for Buffers Visiting Files.
  10663                                                               (line  52)
  10664 * magit-display-repository-buffer <2>:   Commands for Buffers Visiting Files.
  10665                                                               (line 172)
  10666 * magit-ediff:                           Ediffing.            (line  21)
  10667 * magit-ediff-compare:                   Ediffing.            (line  25)
  10668 * magit-ediff-dwim:                      Ediffing.            (line  10)
  10669 * magit-ediff-resolve-all:               Ediffing.            (line  48)
  10670 * magit-ediff-resolve-rest:              Ediffing.            (line  33)
  10671 * magit-ediff-show-commit:               Ediffing.            (line 100)
  10672 * magit-ediff-show-staged:               Ediffing.            (line  94)
  10673 * magit-ediff-show-stash:                Ediffing.            (line 103)
  10674 * magit-ediff-show-unstaged:             Ediffing.            (line  91)
  10675 * magit-ediff-show-working-tree:         Ediffing.            (line  97)
  10676 * magit-ediff-stage:                     Ediffing.            (line  87)
  10677 * magit-edit-line-commit:                Commands for Buffers Visiting Files.
  10678                                                               (line  52)
  10679 * magit-edit-line-commit <1>:            Commands for Buffers Visiting Files.
  10680                                                               (line 182)
  10681 * magit-emacs-Q-command:                 Debugging Tools.     (line  16)
  10682 * magit-fetch:                           Fetching.            (line  10)
  10683 * magit-fetch-all:                       Fetching.            (line  45)
  10684 * magit-fetch-branch:                    Fetching.            (line  37)
  10685 * magit-fetch-from-pushremote:           Fetching.            (line  15)
  10686 * magit-fetch-from-upstream:             Fetching.            (line  22)
  10687 * magit-fetch-modules:                   Submodule Transient. (line  51)
  10688 * magit-fetch-other:                     Fetching.            (line  34)
  10689 * magit-fetch-refspec:                   Fetching.            (line  41)
  10690 * magit-file-checkout:                   Resetting.           (line  44)
  10691 * magit-file-checkout <1>:               Commands for Buffers Visiting Files.
  10692                                                               (line  52)
  10693 * magit-file-checkout <2>:               Commands for Buffers Visiting Files.
  10694                                                               (line  86)
  10695 * magit-file-delete:                     Commands for Buffers Visiting Files.
  10696                                                               (line  52)
  10697 * magit-file-delete <1>:                 Commands for Buffers Visiting Files.
  10698                                                               (line  82)
  10699 * magit-file-dispatch:                   Commands for Buffers Visiting Files.
  10700                                                               (line  52)
  10701 * magit-file-dispatch <1>:               Commands for Buffers Visiting Files.
  10702                                                               (line  58)
  10703 * magit-file-rename:                     Commands for Buffers Visiting Files.
  10704                                                               (line  52)
  10705 * magit-file-rename <1>:                 Commands for Buffers Visiting Files.
  10706                                                               (line  78)
  10707 * magit-file-untrack:                    Commands for Buffers Visiting Files.
  10708                                                               (line  52)
  10709 * magit-file-untrack <1>:                Commands for Buffers Visiting Files.
  10710                                                               (line  74)
  10711 * magit-find-file:                       General-Purpose Visit Commands.
  10712                                                               (line   9)
  10713 * magit-find-file <1>:                   Commands for Buffers Visiting Files.
  10714                                                               (line  52)
  10715 * magit-find-file <2>:                   Commands for Buffers Visiting Files.
  10716                                                               (line 156)
  10717 * magit-find-file-other-frame:           General-Purpose Visit Commands.
  10718                                                               (line  19)
  10719 * magit-find-file-other-window:          General-Purpose Visit Commands.
  10720                                                               (line  14)
  10721 * magit-generate-buffer-name-default-function: Naming Buffers.
  10722                                                               (line  16)
  10723 * magit-get-section:                     Matching Sections.   (line  14)
  10724 * magit-git:                             Calling Git for Effect.
  10725                                                               (line  46)
  10726 * magit-git-command:                     Running Git Manually.
  10727                                                               (line  25)
  10728 * magit-git-command-topdir:              Running Git Manually.
  10729                                                               (line  17)
  10730 * magit-git-exit-code:                   Getting a Value from Git.
  10731                                                               (line  10)
  10732 * magit-git-failure:                     Getting a Value from Git.
  10733                                                               (line  17)
  10734 * magit-git-false:                       Getting a Value from Git.
  10735                                                               (line  25)
  10736 * magit-git-insert:                      Getting a Value from Git.
  10737                                                               (line  29)
  10738 * magit-git-items:                       Getting a Value from Git.
  10739                                                               (line  41)
  10740 * magit-git-lines:                       Getting a Value from Git.
  10741                                                               (line  37)
  10742 * magit-git-mergetool:                   Running Git Manually.
  10743                                                               (line  62)
  10744 * magit-git-mergetool <1>:               Ediffing.            (line  79)
  10745 * magit-git-str:                         Getting a Value from Git.
  10746                                                               (line  75)
  10747 * magit-git-string:                      Getting a Value from Git.
  10748                                                               (line  32)
  10749 * magit-git-success:                     Getting a Value from Git.
  10750                                                               (line  13)
  10751 * magit-git-true:                        Getting a Value from Git.
  10752                                                               (line  21)
  10753 * magit-git-wash:                        Calling Git for Effect.
  10754                                                               (line  50)
  10755 * magit-go-backward:                     Log Buffer.          (line  20)
  10756 * magit-go-backward <1>:                 Refreshing Diffs.    (line  84)
  10757 * magit-go-forward:                      Log Buffer.          (line  23)
  10758 * magit-go-forward <1>:                  Refreshing Diffs.    (line  87)
  10759 * magit-hunk-set-window-start:           Section Movement.    (line  45)
  10760 * magit-ido-completing-read:             Support for Completion Frameworks.
  10761                                                               (line  46)
  10762 * magit-init:                            Creating Repository. (line   7)
  10763 * magit-insert-am-sequence:              Status Sections.     (line  25)
  10764 * magit-insert-assumed-unchanged-files:  Status Sections.     (line  98)
  10765 * magit-insert-bisect-log:               Status Sections.     (line  39)
  10766 * magit-insert-bisect-output:            Status Sections.     (line  33)
  10767 * magit-insert-bisect-rest:              Status Sections.     (line  36)
  10768 * magit-insert-diff-filter-header:       Status Header Sections.
  10769                                                               (line  35)
  10770 * magit-insert-error-header:             Status Header Sections.
  10771                                                               (line  26)
  10772 * magit-insert-head-branch-header:       Status Header Sections.
  10773                                                               (line  38)
  10774 * magit-insert-heading:                  Creating Sections.   (line  41)
  10775 * magit-insert-ignored-files:            Status Sections.     (line  83)
  10776 * magit-insert-local-branches:           References Sections. (line  16)
  10777 * magit-insert-merge-log:                Status Sections.     (line  17)
  10778 * magit-insert-modules:                  Status Module Sections.
  10779                                                               (line  12)
  10780 * magit-insert-modules-overview:         Status Module Sections.
  10781                                                               (line  30)
  10782 * magit-insert-modules-unpulled-from-pushremote: Status Module Sections.
  10783                                                               (line  45)
  10784 * magit-insert-modules-unpulled-from-upstream: Status Module Sections.
  10785                                                               (line  40)
  10786 * magit-insert-modules-unpushed-to-pushremote: Status Module Sections.
  10787                                                               (line  55)
  10788 * magit-insert-modules-unpushed-to-upstream: Status Module Sections.
  10789                                                               (line  50)
  10790 * magit-insert-push-branch-header:       Status Header Sections.
  10791                                                               (line  45)
  10792 * magit-insert-rebase-sequence:          Status Sections.     (line  21)
  10793 * magit-insert-recent-commits:           Status Sections.     (line 110)
  10794 * magit-insert-remote-branches:          References Sections. (line  19)
  10795 * magit-insert-remote-header:            Status Header Sections.
  10796                                                               (line  58)
  10797 * magit-insert-repo-header:              Status Header Sections.
  10798                                                               (line  55)
  10799 * magit-insert-section:                  Creating Sections.   (line   6)
  10800 * magit-insert-sequencer-sequence:       Status Sections.     (line  29)
  10801 * magit-insert-skip-worktree-files:      Status Sections.     (line  92)
  10802 * magit-insert-staged-changes:           Status Sections.     (line  53)
  10803 * magit-insert-stashes:                  Status Sections.     (line  56)
  10804 * magit-insert-status-headers:           Status Header Sections.
  10805                                                               (line  12)
  10806 * magit-insert-tags:                     References Sections. (line  22)
  10807 * magit-insert-tags-header:              Status Header Sections.
  10808                                                               (line  49)
  10809 * magit-insert-tracked-files:            Status Sections.     (line  80)
  10810 * magit-insert-unpulled-cherries:        Status Sections.     (line 119)
  10811 * magit-insert-unpulled-from-pushremote: Status Sections.     (line  66)
  10812 * magit-insert-unpulled-from-upstream:   Status Sections.     (line  62)
  10813 * magit-insert-unpulled-or-recent-commits: Status Sections.   (line 104)
  10814 * magit-insert-unpushed-cherries:        Status Sections.     (line 125)
  10815 * magit-insert-unpushed-to-pushremote:   Status Sections.     (line  74)
  10816 * magit-insert-unpushed-to-upstream:     Status Sections.     (line  70)
  10817 * magit-insert-unstaged-changes:         Status Sections.     (line  50)
  10818 * magit-insert-untracked-files:          Status Sections.     (line  42)
  10819 * magit-insert-upstream-branch-header:   Status Header Sections.
  10820                                                               (line  41)
  10821 * magit-insert-user-header:              Status Header Sections.
  10822                                                               (line  65)
  10823 * magit-jump-to-diffstat-or-diff:        Commands Available in Diffs.
  10824                                                               (line  43)
  10825 * magit-kill-this-buffer:                Minor Mode for Buffers Visiting Blobs.
  10826                                                               (line  19)
  10827 * magit-list-repositories:               Repository List.     (line   6)
  10828 * magit-list-submodules:                 Listing Submodules.  (line  13)
  10829 * magit-list-submodules <1>:             Submodule Transient. (line  48)
  10830 * magit-log:                             Logging.             (line  30)
  10831 * magit-log <1>:                         Commands for Buffers Visiting Files.
  10832                                                               (line  52)
  10833 * magit-log <2>:                         Commands for Buffers Visiting Files.
  10834                                                               (line 109)
  10835 * magit-log-all:                         Logging.             (line  61)
  10836 * magit-log-all-branches:                Logging.             (line  58)
  10837 * magit-log-branches:                    Logging.             (line  55)
  10838 * magit-log-buffer-file:                 Commands for Buffers Visiting Files.
  10839                                                               (line  52)
  10840 * magit-log-buffer-file <1>:             Commands for Buffers Visiting Files.
  10841                                                               (line 119)
  10842 * magit-log-bury-buffer:                 Log Buffer.          (line  14)
  10843 * magit-log-current:                     Logging.             (line  35)
  10844 * magit-log-double-commit-limit:         Log Buffer.          (line  64)
  10845 * magit-log-half-commit-limit:           Log Buffer.          (line  67)
  10846 * magit-log-head:                        Logging.             (line  40)
  10847 * magit-log-maybe-show-more-commits:     Section Movement.    (line  58)
  10848 * magit-log-maybe-update-blob-buffer:    Section Movement.    (line  72)
  10849 * magit-log-maybe-update-revision-buffer: Section Movement.   (line  65)
  10850 * magit-log-merged:                      Commands for Buffers Visiting Files.
  10851                                                               (line  52)
  10852 * magit-log-merged <1>:                  Commands for Buffers Visiting Files.
  10853                                                               (line 132)
  10854 * magit-log-move-to-parent:              Log Buffer.          (line  26)
  10855 * magit-log-move-to-revision:            Log Buffer.          (line  31)
  10856 * magit-log-other:                       Logging.             (line  49)
  10857 * magit-log-refresh:                     Refreshing Logs.     (line  12)
  10858 * magit-log-refresh <1>:                 Refreshing Logs.     (line  17)
  10859 * magit-log-refresh <2>:                 Log Buffer.          (line   7)
  10860 * magit-log-related:                     Logging.             (line  43)
  10861 * magit-log-save-default-arguments:      Refreshing Logs.     (line  27)
  10862 * magit-log-select-pick:                 Select from Log.     (line  21)
  10863 * magit-log-select-quit:                 Select from Log.     (line  26)
  10864 * magit-log-set-default-arguments:       Refreshing Logs.     (line  21)
  10865 * magit-log-toggle-commit-limit:         Log Buffer.          (line  59)
  10866 * magit-log-trace-definition:            Commands for Buffers Visiting Files.
  10867                                                               (line  52)
  10868 * magit-log-trace-definition <1>:        Commands for Buffers Visiting Files.
  10869                                                               (line 129)
  10870 * magit-margin-settings:                 Log Margin.          (line  52)
  10871 * magit-maybe-set-dedicated:             Switching Buffers.   (line  89)
  10872 * magit-merge:                           Merging.             (line  10)
  10873 * magit-merge <1>:                       Merging.             (line  86)
  10874 * magit-merge-abort:                     Merging.             (line  91)
  10875 * magit-merge-absorb:                    Merging.             (line  42)
  10876 * magit-merge-editmsg:                   Merging.             (line  30)
  10877 * magit-merge-into:                      Merging.             (line  54)
  10878 * magit-merge-nocommit:                  Merging.             (line  36)
  10879 * magit-merge-plain:                     Merging.             (line  18)
  10880 * magit-merge-preview:                   Merging.             (line  75)
  10881 * magit-merge-squash:                    Merging.             (line  67)
  10882 * magit-mode-bury-buffer:                Quitting Windows.    (line   7)
  10883 * magit-mode-display-buffer:             Refreshing Buffers.  (line  32)
  10884 * magit-mode-quit-window:                Quitting Windows.    (line  34)
  10885 * magit-mode-setup:                      Refreshing Buffers.  (line  17)
  10886 * magit-notes:                           Notes.               (line   9)
  10887 * magit-notes-edit:                      Notes.               (line  14)
  10888 * magit-notes-merge:                     Notes.               (line  35)
  10889 * magit-notes-merge-abort:               Notes.               (line  47)
  10890 * magit-notes-merge-commit:              Notes.               (line  43)
  10891 * magit-notes-prune:                     Notes.               (line  28)
  10892 * magit-notes-remove:                    Notes.               (line  21)
  10893 * magit-patch:                           Plain Patches.       (line   7)
  10894 * magit-patch-apply:                     Plain Patches.       (line  20)
  10895 * magit-patch-apply <1>:                 Maildir Patches.     (line  23)
  10896 * magit-patch-create:                    Plain Patches.       (line  12)
  10897 * magit-patch-save:                      Plain Patches.       (line  26)
  10898 * magit-pop-revision-stack:              Using the Revision Stack.
  10899                                                               (line   7)
  10900 * magit-process:                         Viewing Git Output.  (line  17)
  10901 * magit-process-file:                    Getting a Value from Git.
  10902                                                               (line  57)
  10903 * magit-process-git:                     Getting a Value from Git.
  10904                                                               (line  50)
  10905 * magit-process-kill:                    Viewing Git Output.  (line  24)
  10906 * magit-pull:                            Pulling.             (line  10)
  10907 * magit-pull-branch:                     Pulling.             (line  28)
  10908 * magit-pull-from-pushremote:            Pulling.             (line  14)
  10909 * magit-pull-from-upstream:              Pulling.             (line  21)
  10910 * magit-push:                            Pushing.             (line  10)
  10911 * magit-push-current:                    Pushing.             (line  29)
  10912 * magit-push-current-to-pushremote:      Pushing.             (line  15)
  10913 * magit-push-current-to-upstream:        Pushing.             (line  22)
  10914 * magit-push-implicitly:                 Pushing.             (line  74)
  10915 * magit-push-matching:                   Pushing.             (line  45)
  10916 * magit-push-other:                      Pushing.             (line  33)
  10917 * magit-push-refspecs:                   Pushing.             (line  37)
  10918 * magit-push-tag:                        Pushing.             (line  59)
  10919 * magit-push-tags:                       Pushing.             (line  52)
  10920 * magit-push-to-remote:                  Pushing.             (line  91)
  10921 * magit-rebase:                          Rebasing.            (line  10)
  10922 * magit-rebase-abort:                    Rebasing.            (line 111)
  10923 * magit-rebase-autosquash:               Rebasing.            (line  79)
  10924 * magit-rebase-branch:                   Rebasing.            (line  42)
  10925 * magit-rebase-continue:                 Rebasing.            (line  97)
  10926 * magit-rebase-edit:                     Rebasing.            (line 107)
  10927 * magit-rebase-edit-commit:              Rebasing.            (line  83)
  10928 * magit-rebase-interactive:              Rebasing.            (line  76)
  10929 * magit-rebase-onto-pushremote:          Rebasing.            (line  28)
  10930 * magit-rebase-onto-upstream:            Rebasing.            (line  35)
  10931 * magit-rebase-remove-commit:            Rebasing.            (line  91)
  10932 * magit-rebase-reword-commit:            Rebasing.            (line  87)
  10933 * magit-rebase-skip:                     Rebasing.            (line 103)
  10934 * magit-rebase-subset:                   Rebasing.            (line  47)
  10935 * magit-reflog-current:                  Reflog.              (line  12)
  10936 * magit-reflog-head:                     Reflog.              (line  18)
  10937 * magit-reflog-other:                    Reflog.              (line  15)
  10938 * magit-refresh:                         Automatic Refreshing of Magit Buffers.
  10939                                                               (line  26)
  10940 * magit-refresh-all:                     Automatic Refreshing of Magit Buffers.
  10941                                                               (line  34)
  10942 * magit-refs-set-show-commit-count:      References Buffer.   (line  34)
  10943 * magit-region-sections:                 Section Selection.   (line   9)
  10944 * magit-region-values:                   Section Selection.   (line  35)
  10945 * magit-remote:                          Remote Commands.     (line  14)
  10946 * magit-remote-add:                      Remote Commands.     (line  48)
  10947 * magit-remote-configure:                Remote Commands.     (line  32)
  10948 * magit-remote-prune:                    Remote Commands.     (line  63)
  10949 * magit-remote-prune-refspecs:           Remote Commands.     (line  67)
  10950 * magit-remote-remove:                   Remote Commands.     (line  60)
  10951 * magit-remote-rename:                   Remote Commands.     (line  52)
  10952 * magit-remote-set-url:                  Remote Commands.     (line  56)
  10953 * magit-repolist-column-branch:          Repository List.     (line  51)
  10954 * magit-repolist-column-branches:        Repository List.     (line  58)
  10955 * magit-repolist-column-flag:            Repository List.     (line  64)
  10956 * magit-repolist-column-flags:           Repository List.     (line  76)
  10957 * magit-repolist-column-ident:           Repository List.     (line  40)
  10958 * magit-repolist-column-path:            Repository List.     (line  44)
  10959 * magit-repolist-column-stashes:         Repository List.     (line  61)
  10960 * magit-repolist-column-unpulled-from-pushremote: Repository List.
  10961                                                               (line  87)
  10962 * magit-repolist-column-unpulled-from-upstream: Repository List.
  10963                                                               (line  83)
  10964 * magit-repolist-column-unpushed-to-pushremote: Repository List.
  10965                                                               (line  95)
  10966 * magit-repolist-column-unpushed-to-upstream: Repository List.
  10967                                                               (line  91)
  10968 * magit-repolist-column-upstream:        Repository List.     (line  54)
  10969 * magit-repolist-column-version:         Repository List.     (line  47)
  10970 * magit-repolist-fetch:                  Repository List.     (line 111)
  10971 * magit-repolist-find-file-other-frame:  Repository List.     (line 115)
  10972 * magit-repolist-mark:                   Repository List.     (line 105)
  10973 * magit-repolist-status:                 Repository List.     (line 102)
  10974 * magit-repolist-unmark:                 Repository List.     (line 108)
  10975 * magit-reset-hard:                      Resetting.           (line  24)
  10976 * magit-reset-index:                     Staging and Unstaging.
  10977                                                               (line  78)
  10978 * magit-reset-index <1>:                 Resetting.           (line  33)
  10979 * magit-reset-keep:                      Resetting.           (line  28)
  10980 * magit-reset-mixed:                     Resetting.           (line  15)
  10981 * magit-reset-quickly:                   Resetting.           (line   9)
  10982 * magit-reset-soft:                      Resetting.           (line  19)
  10983 * magit-reset-worktree:                  Resetting.           (line  39)
  10984 * magit-reset-worktree <1>:              Wip Modes.           (line  64)
  10985 * magit-restore-window-configuration:    Quitting Windows.    (line  24)
  10986 * magit-reverse:                         Applying.            (line  47)
  10987 * magit-reverse-in-index:                Staging and Unstaging.
  10988                                                               (line  58)
  10989 * magit-revert:                          Reverting.           (line   7)
  10990 * magit-revert-and-commit:               Reverting.           (line  15)
  10991 * magit-revert-no-commit:                Reverting.           (line  20)
  10992 * magit-run:                             Running Git Manually.
  10993                                                               (line  13)
  10994 * magit-run-git:                         Calling Git for Effect.
  10995                                                               (line  34)
  10996 * magit-run-git-async:                   Calling Git for Effect.
  10997                                                               (line  59)
  10998 * magit-run-git-gui:                     Running Git Manually.
  10999                                                               (line  59)
  11000 * magit-run-git-with-editor:             Calling Git for Effect.
  11001                                                               (line  71)
  11002 * magit-run-git-with-input:              Calling Git for Effect.
  11003                                                               (line  37)
  11004 * magit-run-gitk:                        Running Git Manually.
  11005                                                               (line  50)
  11006 * magit-run-gitk-all:                    Running Git Manually.
  11007                                                               (line  53)
  11008 * magit-run-gitk-branches:               Running Git Manually.
  11009                                                               (line  56)
  11010 * magit-save-window-configuration:       Switching Buffers.   (line  80)
  11011 * magit-section-backward:                Section Movement.    (line  11)
  11012 * magit-section-backward-siblings:       Section Movement.    (line  19)
  11013 * magit-section-case:                    Matching Sections.   (line  66)
  11014 * magit-section-cycle:                   Section Visibility.  (line  14)
  11015 * magit-section-cycle-diffs:             Section Visibility.  (line  29)
  11016 * magit-section-cycle-global:            Section Visibility.  (line  33)
  11017 * magit-section-forward:                 Section Movement.    (line  16)
  11018 * magit-section-forward-siblings:        Section Movement.    (line  24)
  11019 * magit-section-hide:                    Section Visibility.  (line  55)
  11020 * magit-section-hide-children:           Section Visibility.  (line  67)
  11021 * magit-section-ident:                   Matching Sections.   (line  10)
  11022 * magit-section-match:                   Matching Sections.   (line  18)
  11023 * magit-section-set-window-start:        Section Movement.    (line  52)
  11024 * magit-section-show:                    Section Visibility.  (line  52)
  11025 * magit-section-show-children:           Section Visibility.  (line  62)
  11026 * magit-section-show-headings:           Section Visibility.  (line  58)
  11027 * magit-section-show-level-1:            Section Visibility.  (line  39)
  11028 * magit-section-show-level-1-all:        Section Visibility.  (line  45)
  11029 * magit-section-show-level-2:            Section Visibility.  (line  39)
  11030 * magit-section-show-level-2-all:        Section Visibility.  (line  45)
  11031 * magit-section-show-level-3:            Section Visibility.  (line  39)
  11032 * magit-section-show-level-3-all:        Section Visibility.  (line  45)
  11033 * magit-section-show-level-4:            Section Visibility.  (line  39)
  11034 * magit-section-show-level-4-all:        Section Visibility.  (line  45)
  11035 * magit-section-toggle:                  Section Visibility.  (line  10)
  11036 * magit-section-toggle-children:         Section Visibility.  (line  70)
  11037 * magit-section-up:                      Section Movement.    (line  28)
  11038 * magit-section-value-if:                Matching Sections.   (line  57)
  11039 * magit-sequence-abort:                  Cherry Picking.      (line  91)
  11040 * magit-sequence-abort <1>:              Reverting.           (line  35)
  11041 * magit-sequence-continue:               Cherry Picking.      (line  85)
  11042 * magit-sequence-continue <1>:           Reverting.           (line  29)
  11043 * magit-sequence-skip:                   Cherry Picking.      (line  88)
  11044 * magit-sequence-skip <1>:               Reverting.           (line  32)
  11045 * magit-shell-command:                   Running Git Manually.
  11046                                                               (line  38)
  11047 * magit-shell-command-topdir:            Running Git Manually.
  11048                                                               (line  34)
  11049 * magit-show-commit:                     Diffing.             (line  63)
  11050 * magit-show-commit <1>:                 Blaming.             (line  91)
  11051 * magit-show-refs:                       References Buffer.   (line   7)
  11052 * magit-show-refs-current:               References Buffer.   (line  25)
  11053 * magit-show-refs-head:                  References Buffer.   (line  21)
  11054 * magit-show-refs-other:                 References Buffer.   (line  30)
  11055 * magit-snapshot-both:                   Stashing.            (line  36)
  11056 * magit-snapshot-index:                  Stashing.            (line  42)
  11057 * magit-snapshot-worktree:               Stashing.            (line  46)
  11058 * magit-sparse-checkout:                 Sparse checkouts.    (line  17)
  11059 * magit-sparse-checkout-add:             Sparse checkouts.    (line  39)
  11060 * magit-sparse-checkout-disable:         Sparse checkouts.    (line  50)
  11061 * magit-sparse-checkout-enable:          Sparse checkouts.    (line  21)
  11062 * magit-sparse-checkout-reapply:         Sparse checkouts.    (line  44)
  11063 * magit-sparse-checkout-set:             Sparse checkouts.    (line  33)
  11064 * magit-stage:                           Staging and Unstaging.
  11065                                                               (line  29)
  11066 * magit-stage-buffer-file:               Commands for Buffers Visiting Files.
  11067                                                               (line  52)
  11068 * magit-stage-buffer-file <1>:           Commands for Buffers Visiting Files.
  11069                                                               (line  63)
  11070 * magit-stage-file:                      Staging from File-Visiting Buffers.
  11071                                                               (line  11)
  11072 * magit-stage-file <1>:                  Commands for Buffers Visiting Files.
  11073                                                               (line  52)
  11074 * magit-stage-file <2>:                  Commands for Buffers Visiting Files.
  11075                                                               (line  63)
  11076 * magit-stage-modified:                  Staging and Unstaging.
  11077                                                               (line  36)
  11078 * magit-start-git:                       Calling Git for Effect.
  11079                                                               (line  82)
  11080 * magit-start-process:                   Calling Git for Effect.
  11081                                                               (line 100)
  11082 * magit-stash:                           Stashing.            (line   9)
  11083 * magit-stash-apply:                     Stashing.            (line  52)
  11084 * magit-stash-both:                      Stashing.            (line  14)
  11085 * magit-stash-branch:                    Stashing.            (line 105)
  11086 * magit-stash-branch-here:               Stashing.            (line 110)
  11087 * magit-stash-clear:                     Stashing.            (line 118)
  11088 * magit-stash-drop:                      Stashing.            (line  98)
  11089 * magit-stash-format-patch:              Stashing.            (line 115)
  11090 * magit-stash-index:                     Stashing.            (line  20)
  11091 * magit-stash-keep-index:                Stashing.            (line  30)
  11092 * magit-stash-list:                      Stashing.            (line 121)
  11093 * magit-stash-pop:                       Stashing.            (line  74)
  11094 * magit-stash-show:                      Diffing.             (line  67)
  11095 * magit-stash-show <1>:                  Stashing.            (line 102)
  11096 * magit-stash-worktree:                  Stashing.            (line  24)
  11097 * magit-stashes-maybe-update-stash-buffer: Section Movement.  (line  92)
  11098 * magit-status:                          Status Buffer.       (line  23)
  11099 * magit-status-here:                     Commands for Buffers Visiting Files.
  11100                                                               (line  52)
  11101 * magit-status-here <1>:                 Commands for Buffers Visiting Files.
  11102                                                               (line 166)
  11103 * magit-status-maybe-update-blob-buffer: Section Movement.    (line  87)
  11104 * magit-status-maybe-update-revision-buffer: Section Movement.
  11105                                                               (line  77)
  11106 * magit-status-maybe-update-stash-buffer: Section Movement.   (line  82)
  11107 * magit-status-quick:                    Status Buffer.       (line  70)
  11108 * magit-submodule:                       Submodule Transient. (line   7)
  11109 * magit-submodule-add:                   Submodule Transient. (line  20)
  11110 * magit-submodule-fetch:                 Fetching.            (line  48)
  11111 * magit-submodule-populate:              Submodule Transient. (line  32)
  11112 * magit-submodule-register:              Submodule Transient. (line  26)
  11113 * magit-submodule-synchronize:           Submodule Transient. (line  40)
  11114 * magit-submodule-unpopulate:            Submodule Transient. (line  45)
  11115 * magit-submodule-update:                Submodule Transient. (line  36)
  11116 * magit-subtree:                         Subtree.             (line   9)
  11117 * magit-subtree-add:                     Subtree.             (line  24)
  11118 * magit-subtree-add-commit:              Subtree.             (line  28)
  11119 * magit-subtree-export:                  Subtree.             (line  37)
  11120 * magit-subtree-import:                  Subtree.             (line  13)
  11121 * magit-subtree-merge:                   Subtree.             (line  31)
  11122 * magit-subtree-pull:                    Subtree.             (line  34)
  11123 * magit-subtree-push:                    Subtree.             (line  48)
  11124 * magit-subtree-split:                   Subtree.             (line  52)
  11125 * magit-switch-to-repository-buffer:     Common Commands.     (line   6)
  11126 * magit-switch-to-repository-buffer-other-frame: Common Commands.
  11127                                                               (line   8)
  11128 * magit-switch-to-repository-buffer-other-window: Common Commands.
  11129                                                               (line   7)
  11130 * magit-tag:                             Tagging.             (line   9)
  11131 * magit-tag-create:                      Tagging.             (line  14)
  11132 * magit-tag-delete:                      Tagging.             (line  37)
  11133 * magit-tag-prune:                       Tagging.             (line  43)
  11134 * magit-tag-release:                     Tagging.             (line  18)
  11135 * magit-toggle-buffer-lock:              Modes and Buffers.   (line  18)
  11136 * magit-toggle-git-debug:                Debugging Tools.     (line  29)
  11137 * magit-toggle-margin:                   Refreshing Logs.     (line  34)
  11138 * magit-toggle-margin <1>:               Log Margin.          (line  60)
  11139 * magit-toggle-margin-details:           Log Margin.          (line  66)
  11140 * magit-toggle-verbose-refresh:          Debugging Tools.     (line  52)
  11141 * magit-unstage:                         Staging and Unstaging.
  11142                                                               (line  42)
  11143 * magit-unstage-all:                     Staging and Unstaging.
  11144                                                               (line  50)
  11145 * magit-unstage-buffer-file:             Commands for Buffers Visiting Files.
  11146                                                               (line  52)
  11147 * magit-unstage-buffer-file <1>:         Commands for Buffers Visiting Files.
  11148                                                               (line  69)
  11149 * magit-unstage-file:                    Staging from File-Visiting Buffers.
  11150                                                               (line  18)
  11151 * magit-unstage-file <1>:                Commands for Buffers Visiting Files.
  11152                                                               (line  52)
  11153 * magit-unstage-file <2>:                Commands for Buffers Visiting Files.
  11154                                                               (line  69)
  11155 * magit-version:                         Git Executable.      (line  59)
  11156 * magit-version <1>:                     Debugging Tools.     (line  11)
  11157 * magit-visit-ref:                       References Buffer.   (line 159)
  11158 * magit-wip-commit:                      Wip Modes.           (line  85)
  11159 * magit-wip-log:                         Wip Modes.           (line  47)
  11160 * magit-wip-log-current:                 Wip Modes.           (line  55)
  11161 * magit-worktree:                        Worktree.            (line   9)
  11162 * magit-worktree-branch:                 Worktree.            (line  16)
  11163 * magit-worktree-checkout:               Worktree.            (line  13)
  11164 * magit-worktree-delete:                 Worktree.            (line  22)
  11165 * magit-worktree-move:                   Worktree.            (line  19)
  11166 * magit-worktree-status:                 Worktree.            (line  26)
  11167 * scroll-down:                           Commands Available in Diffs.
  11168                                                               (line  56)
  11169 * scroll-up:                             Commands Available in Diffs.
  11170                                                               (line  53)
  11171 * with-editor-cancel:                    Editing Commit Messages.
  11172                                                               (line  22)
  11173 * with-editor-cancel <1>:                Editing Rebase Sequences.
  11174                                                               (line  11)
  11175 * with-editor-debug:                     Debugging Tools.     (line  64)
  11176 * with-editor-finish:                    Editing Commit Messages.
  11177                                                               (line  18)
  11178 * with-editor-finish <1>:                Editing Rebase Sequences.
  11179                                                               (line   7)
  11180 * with-editor-usage-message:             Commit Mode and Hooks.
  11181                                                               (line  51)
  11182 
  11183 
  11184 File: magit.info,  Node: Variable Index,  Prev: Function and Command Index,  Up: Top
  11185 
  11186 Appendix E Variable Index
  11187 *************************
  11188 
  11189 
  11190 * Menu:
  11191 
  11192 * auto-revert-buffer-list-filter:        Automatic Reverting of File-Visiting Buffers.
  11193                                                               (line  73)
  11194 * auto-revert-interval:                  Automatic Reverting of File-Visiting Buffers.
  11195                                                               (line  69)
  11196 * auto-revert-mode:                      Automatic Reverting of File-Visiting Buffers.
  11197                                                               (line  57)
  11198 * auto-revert-stop-on-user-input:        Automatic Reverting of File-Visiting Buffers.
  11199                                                               (line  65)
  11200 * auto-revert-use-notify:                Automatic Reverting of File-Visiting Buffers.
  11201                                                               (line  46)
  11202 * auto-revert-verbose:                   Automatic Reverting of File-Visiting Buffers.
  11203                                                               (line  94)
  11204 * branch.autoSetupMerge:                 Branch Git Variables.
  11205                                                               (line  71)
  11206 * branch.autoSetupRebase:                Branch Git Variables.
  11207                                                               (line  85)
  11208 * branch.NAME.description:               Branch Git Variables.
  11209                                                               (line  42)
  11210 * branch.NAME.merge:                     Branch Git Variables.
  11211                                                               (line  10)
  11212 * branch.NAME.pushRemote:                Branch Git Variables.
  11213                                                               (line  29)
  11214 * branch.NAME.rebase:                    Branch Git Variables.
  11215                                                               (line  20)
  11216 * branch.NAME.remote:                    Branch Git Variables.
  11217                                                               (line  15)
  11218 * core.notesRef:                         Notes.               (line  53)
  11219 * git-commit-finish-query-functions:     Commit Message Conventions.
  11220                                                               (line  18)
  11221 * git-commit-known-pseudo-headers:       Commit Pseudo Headers.
  11222                                                               (line   9)
  11223 * git-commit-major-mode:                 Commit Mode and Hooks.
  11224                                                               (line  12)
  11225 * git-commit-post-finish-hook:           Commit Mode and Hooks.
  11226                                                               (line  54)
  11227 * git-commit-setup-hook:                 Commit Mode and Hooks.
  11228                                                               (line  21)
  11229 * git-commit-style-convention-checks:    Commit Message Conventions.
  11230                                                               (line  38)
  11231 * git-commit-summary-max-length:         Commit Message Conventions.
  11232                                                               (line  13)
  11233 * git-rebase-auto-advance:               Editing Rebase Sequences.
  11234                                                               (line  80)
  11235 * git-rebase-confirm-cancel:             Editing Rebase Sequences.
  11236                                                               (line  86)
  11237 * git-rebase-show-instructions:          Editing Rebase Sequences.
  11238                                                               (line  83)
  11239 * global-auto-revert-mode:               Automatic Reverting of File-Visiting Buffers.
  11240                                                               (line  21)
  11241 * magit-auto-revert-immediately:         Automatic Reverting of File-Visiting Buffers.
  11242                                                               (line  30)
  11243 * magit-auto-revert-mode:                Automatic Reverting of File-Visiting Buffers.
  11244                                                               (line  17)
  11245 * magit-auto-revert-tracked-only:        Automatic Reverting of File-Visiting Buffers.
  11246                                                               (line  51)
  11247 * magit-bisect-show-graph:               Bisecting.           (line  57)
  11248 * magit-blame-disable-modes:             Blaming.             (line 165)
  11249 * magit-blame-echo-style:                Blaming.             (line 151)
  11250 * magit-blame-goto-chunk-hook:           Blaming.             (line 170)
  11251 * magit-blame-read-only:                 Blaming.             (line 161)
  11252 * magit-blame-styles:                    Blaming.             (line 147)
  11253 * magit-blame-time-format:               Blaming.             (line 157)
  11254 * magit-branch-adjust-remote-upstream-alist: Branch Commands. (line 202)
  11255 * magit-branch-direct-configure:         Branch Commands.     (line  19)
  11256 * magit-branch-prefer-remote-upstream:   Branch Commands.     (line 158)
  11257 * magit-branch-read-upstream-first:      Branch Commands.     (line 153)
  11258 * magit-buffer-name-format:              Naming Buffers.      (line  25)
  11259 * magit-bury-buffer-function:            Quitting Windows.    (line  16)
  11260 * magit-cherry-margin:                   Cherries.            (line  21)
  11261 * magit-clone-always-transient:          Cloning Repository.  (line  12)
  11262 * magit-clone-default-directory:         Cloning Repository.  (line  84)
  11263 * magit-clone-name-alist:                Cloning Repository.  (line  94)
  11264 * magit-clone-set-remote-head:           Cloning Repository.  (line  66)
  11265 * magit-clone-set-remote.pushDefault:    Cloning Repository.  (line  75)
  11266 * magit-clone-url-format:                Cloning Repository.  (line 114)
  11267 * magit-commit-ask-to-stage:             Initiating a Commit. (line  65)
  11268 * magit-commit-diff-inhibit-same-window: Initiating a Commit. (line  97)
  11269 * magit-commit-extend-override-date:     Initiating a Commit. (line  72)
  11270 * magit-commit-reword-override-date:     Initiating a Commit. (line  75)
  11271 * magit-commit-show-diff:                Initiating a Commit. (line  69)
  11272 * magit-commit-squash-confirm:           Initiating a Commit. (line  78)
  11273 * magit-completing-read-function:        Support for Completion Frameworks.
  11274                                                               (line  27)
  11275 * magit-define-global-key-bindings:      Global Bindings.     (line   6)
  11276 * magit-diff-adjust-tab-width:           Diff Options.        (line  17)
  11277 * magit-diff-buffer-file-locked:         Commands for Buffers Visiting Files.
  11278                                                               (line 104)
  11279 * magit-diff-extra-stat-arguments:       Diff Options.        (line 112)
  11280 * magit-diff-hide-trailing-cr-characters: Diff Options.       (line  77)
  11281 * magit-diff-highlight-hunk-region-functions: Diff Options.   (line  80)
  11282 * magit-diff-highlight-indentation:      Diff Options.        (line  63)
  11283 * magit-diff-highlight-trailing:         Diff Options.        (line  59)
  11284 * magit-diff-paint-whitespace:           Diff Options.        (line  38)
  11285 * magit-diff-paint-whitespace-lines:     Diff Options.        (line  52)
  11286 * magit-diff-refine-hunk:                Diff Options.        (line   6)
  11287 * magit-diff-refine-ignore-whitespace:   Diff Options.        (line  13)
  11288 * magit-diff-unmarked-lines-keep-foreground: Diff Options.    (line 105)
  11289 * magit-diff-visit-previous-blob:        Visiting Files and Blobs from a Diff.
  11290                                                               (line  38)
  11291 * magit-direct-use-buffer-arguments:     Transient Arguments and Buffer Variables.
  11292                                                               (line  73)
  11293 * magit-display-buffer-function:         Switching Buffers.   (line  25)
  11294 * magit-display-buffer-noselect:         Switching Buffers.   (line  17)
  11295 * magit-dwim-selection:                  Completion and Confirmation.
  11296                                                               (line  42)
  11297 * magit-ediff-dwim-resolve-function:     Ediffing.            (line 105)
  11298 * magit-ediff-dwim-show-on-hunks:        Ediffing.            (line 111)
  11299 * magit-ediff-quit-hook:                 Ediffing.            (line 124)
  11300 * magit-ediff-show-stash-with-index:     Ediffing.            (line 118)
  11301 * magit-generate-buffer-name-function:   Naming Buffers.      (line   6)
  11302 * magit-git-debug:                       Viewing Git Output.  (line  26)
  11303 * magit-git-debug <1>:                   Getting a Value from Git.
  11304                                                               (line  68)
  11305 * magit-git-executable:                  Git Executable.      (line  26)
  11306 * magit-git-global-arguments:            Global Git Arguments.
  11307                                                               (line   6)
  11308 * magit-keep-region-overlay:             The Selection.       (line  52)
  11309 * magit-list-refs-sortby:                Additional Completion Options.
  11310                                                               (line   6)
  11311 * magit-log-auto-more:                   Log Buffer.          (line  69)
  11312 * magit-log-buffer-file-locked:          Commands for Buffers Visiting Files.
  11313                                                               (line 124)
  11314 * magit-log-margin:                      Log Margin.          (line  12)
  11315 * magit-log-margin-show-committer-date:  Log Margin.          (line  44)
  11316 * magit-log-section-commit-count:        Status Sections.     (line 114)
  11317 * magit-log-select-margin:               Select from Log.     (line  28)
  11318 * magit-log-show-color-graph-limit:      Log Buffer.          (line  78)
  11319 * magit-log-show-refname-after-summary:  Log Buffer.          (line  74)
  11320 * magit-log-show-signatures-limit:       Log Buffer.          (line  84)
  11321 * magit-log-trace-definition-function:   Commands Available in Diffs.
  11322                                                               (line  17)
  11323 * magit-module-sections-hook:            Status Module Sections.
  11324                                                               (line  19)
  11325 * magit-module-sections-nested:          Status Module Sections.
  11326                                                               (line  22)
  11327 * magit-no-confirm:                      Action Confirmation. (line  18)
  11328 * magit-pop-revision-stack-format:       Using the Revision Stack.
  11329                                                               (line  34)
  11330 * magit-post-clone-hook:                 Cloning Repository.  (line 133)
  11331 * magit-post-commit-hook:                Initiating a Commit. (line  86)
  11332 * magit-post-display-buffer-hook:        Switching Buffers.   (line  85)
  11333 * magit-pre-display-buffer-hook:         Switching Buffers.   (line  76)
  11334 * magit-prefer-remote-upstream:          Branch Git Variables.
  11335                                                               (line 109)
  11336 * magit-prefix-use-buffer-arguments:     Transient Arguments and Buffer Variables.
  11337                                                               (line  65)
  11338 * magit-process-extreme-logging:         Viewing Git Output.  (line  56)
  11339 * magit-process-raise-error:             Calling Git for Effect.
  11340                                                               (line 125)
  11341 * magit-pull-or-fetch:                   Fetching.            (line  51)
  11342 * magit-reflog-margin:                   Reflog.              (line  20)
  11343 * magit-refresh-args:                    Refreshing Buffers.  (line  52)
  11344 * magit-refresh-buffer-hook:             Automatic Refreshing of Magit Buffers.
  11345                                                               (line  41)
  11346 * magit-refresh-function:                Refreshing Buffers.  (line  47)
  11347 * magit-refresh-status-buffer:           Automatic Refreshing of Magit Buffers.
  11348                                                               (line  46)
  11349 * magit-refs-filter-alist:               References Buffer.   (line 137)
  11350 * magit-refs-focus-column-width:         References Buffer.   (line  75)
  11351 * magit-refs-margin:                     References Buffer.   (line  89)
  11352 * magit-refs-margin-for-tags:            References Buffer.   (line 112)
  11353 * magit-refs-pad-commit-counts:          References Buffer.   (line  45)
  11354 * magit-refs-primary-column-width:       References Buffer.   (line  63)
  11355 * magit-refs-sections-hook:              References Sections. (line  13)
  11356 * magit-refs-show-commit-count:          References Buffer.   (line  36)
  11357 * magit-refs-show-remote-prefix:         References Buffer.   (line  57)
  11358 * magit-remote-add-set-remote.pushDefault: Remote Commands.   (line  83)
  11359 * magit-remote-direct-configure:         Remote Commands.     (line  20)
  11360 * magit-remote-git-executable:           Git Executable.      (line  32)
  11361 * magit-repolist-columns:                Repository List.     (line  12)
  11362 * magit-repository-directories:          Status Buffer.       (line  57)
  11363 * magit-revision-filter-files-on-follow: Revision Buffer.     (line  55)
  11364 * magit-revision-insert-related-refs:    Revision Buffer.     (line   6)
  11365 * magit-revision-show-gravatars:         Revision Buffer.     (line  15)
  11366 * magit-revision-use-hash-sections:      Revision Buffer.     (line  31)
  11367 * magit-root-section:                    Matching Sections.   (line  81)
  11368 * magit-save-repository-buffers:         Automatic Saving of File-Visiting Buffers.
  11369                                                               (line  13)
  11370 * magit-section-cache-visibility:        Section Visibility.  (line  95)
  11371 * magit-section-initial-visibility-alist: Section Visibility. (line  79)
  11372 * magit-section-movement-hook:           Section Movement.    (line  41)
  11373 * magit-section-set-visibility-hook:     Section Visibility.  (line 105)
  11374 * magit-section-show-child-count:        Section Options.     (line   9)
  11375 * magit-section-visibility-indicator:    Section Visibility.  (line 122)
  11376 * magit-shell-command-verbose-prompt:    Running Git Manually.
  11377                                                               (line  43)
  11378 * magit-stashes-margin:                  Stashing.            (line 123)
  11379 * magit-status-headers-hook:             Status Header Sections.
  11380                                                               (line  17)
  11381 * magit-status-margin:                   Status Options.      (line   6)
  11382 * magit-status-sections-hook:            Status Sections.     (line  10)
  11383 * magit-submodule-list-columns:          Listing Submodules.  (line  20)
  11384 * magit-this-process:                    Calling Git for Effect.
  11385                                                               (line 121)
  11386 * magit-uniquify-buffer-names:           Naming Buffers.      (line  65)
  11387 * magit-unstage-committed:               Staging and Unstaging.
  11388                                                               (line  52)
  11389 * magit-update-other-window-delay:       Section Movement.    (line  97)
  11390 * magit-visit-ref-behavior:              References Buffer.   (line 168)
  11391 * magit-wip-after-apply-mode:            Legacy Wip Modes.    (line  18)
  11392 * magit-wip-after-apply-mode-lighter:    Legacy Wip Modes.    (line  54)
  11393 * magit-wip-after-save-local-mode-lighter: Legacy Wip Modes.  (line  51)
  11394 * magit-wip-after-save-mode:             Legacy Wip Modes.    (line  13)
  11395 * magit-wip-before-change-mode:          Legacy Wip Modes.    (line  31)
  11396 * magit-wip-before-change-mode-lighter:  Legacy Wip Modes.    (line  57)
  11397 * magit-wip-initial-backup-mode:         Legacy Wip Modes.    (line  35)
  11398 * magit-wip-initial-backup-mode-lighter: Legacy Wip Modes.    (line  60)
  11399 * magit-wip-merge-branch:                Wip Graph.           (line   6)
  11400 * magit-wip-mode:                        Wip Modes.           (line  30)
  11401 * magit-wip-mode-lighter:                Wip Modes.           (line  98)
  11402 * magit-wip-namespace:                   Wip Modes.           (line  91)
  11403 * notes.displayRef:                      Notes.               (line  57)
  11404 * pull.rebase:                           Branch Git Variables.
  11405                                                               (line  50)
  11406 * remote.NAME.fetch:                     Remote Git Variables.
  11407                                                               (line  14)
  11408 * remote.NAME.push:                      Remote Git Variables.
  11409                                                               (line  23)
  11410 * remote.NAME.pushurl:                   Remote Git Variables.
  11411                                                               (line  18)
  11412 * remote.NAME.tagOpts:                   Remote Git Variables.
  11413                                                               (line  27)
  11414 * remote.NAME.url:                       Remote Git Variables.
  11415                                                               (line  10)
  11416 * remote.pushDefault:                    Branch Git Variables.
  11417                                                               (line  62)
  11418 
  11419 
  11420 
  11421 Tag Table:
  11422 Node: Top774
  11423 Node: Introduction6566
  11424 Node: Installation11282
  11425 Node: Installing from Melpa11612
  11426 Node: Installing from the Git Repository12687
  11427 Node: Post-Installation Tasks15501
  11428 Node: Getting Started16786
  11429 Node: Interface Concepts22597
  11430 Node: Modes and Buffers22976
  11431 Node: Switching Buffers24687
  11432 Node: Naming Buffers29426
  11433 Node: Quitting Windows32501
  11434 Node: Automatic Refreshing of Magit Buffers34436
  11435 Node: Automatic Saving of File-Visiting Buffers37317
  11436 Node: Automatic Reverting of File-Visiting Buffers38501
  11437 Node: Risk of Reverting Automatically43486
  11438 Node: Sections45868
  11439 Node: Section Movement46794
  11440 Node: Section Visibility51668
  11441 Node: Section Hooks58355
  11442 Node: Section Types and Values60761
  11443 Node: Section Options62176
  11444 Node: Transient Commands62647
  11445 Node: Transient Arguments and Buffer Variables64123
  11446 Node: Completion Confirmation and the Selection71140
  11447 Node: Action Confirmation71586
  11448 Node: Completion and Confirmation80091
  11449 Node: The Selection83276
  11450 Node: The hunk-internal region86174
  11451 Node: Support for Completion Frameworks87263
  11452 Node: Additional Completion Options92166
  11453 Node: Mouse Support92764
  11454 Node: Running Git93340
  11455 Node: Viewing Git Output93585
  11456 Node: Git Process Status96289
  11457 Node: Running Git Manually97254
  11458 Node: Git Executable99944
  11459 Node: Global Git Arguments102952
  11460 Node: Inspecting103757
  11461 Node: Status Buffer104914
  11462 Node: Status Sections109925
  11463 Node: Status Header Sections115452
  11464 Node: Status Module Sections118071
  11465 Node: Status Options120568
  11466 Node: Repository List121931
  11467 Node: Logging126709
  11468 Node: Refreshing Logs129551
  11469 Node: Log Buffer130972
  11470 Node: Log Margin135795
  11471 Node: Select from Log138948
  11472 Node: Reflog141158
  11473 Node: Cherries142795
  11474 Node: Diffing144633
  11475 Node: Refreshing Diffs147667
  11476 Node: Commands Available in Diffs151356
  11477 Node: Diff Options153869
  11478 Node: Revision Buffer159332
  11479 Node: Ediffing162652
  11480 Node: References Buffer168702
  11481 Node: References Sections179296
  11482 Node: Bisecting180153
  11483 Node: Visiting Files and Blobs182464
  11484 Node: General-Purpose Visit Commands182992
  11485 Node: Visiting Files and Blobs from a Diff183945
  11486 Node: Blaming187389
  11487 Node: Manipulating194377
  11488 Node: Creating Repository194719
  11489 Node: Cloning Repository195256
  11490 Node: Staging and Unstaging201697
  11491 Node: Staging from File-Visiting Buffers205678
  11492 Node: Applying206784
  11493 Node: Committing208857
  11494 Node: Initiating a Commit209440
  11495 Node: Editing Commit Messages214630
  11496 Node: Using the Revision Stack217403
  11497 Node: Commit Pseudo Headers220448
  11498 Node: Commit Mode and Hooks221743
  11499 Node: Commit Message Conventions224601
  11500 Node: Branching226588
  11501 Node: The Two Remotes226814
  11502 Node: Branch Commands229467
  11503 Node: Branch Git Variables242317
  11504 Node: Auxiliary Branch Commands247691
  11505 Node: Merging248807
  11506 Node: Resolving Conflicts252963
  11507 Node: Rebasing258337
  11508 Node: Editing Rebase Sequences263126
  11509 Node: Information About In-Progress Rebase267342
  11510 Ref: Information About In-Progress Rebase-Footnote-1276455
  11511 Node: Cherry Picking277051
  11512 Node: Reverting281385
  11513 Node: Resetting282804
  11514 Node: Stashing284630
  11515 Node: Transferring291011
  11516 Node: Remotes291233
  11517 Node: Remote Commands291385
  11518 Node: Remote Git Variables295424
  11519 Node: Fetching296695
  11520 Node: Pulling299141
  11521 Node: Pushing300167
  11522 Node: Plain Patches304458
  11523 Node: Maildir Patches305929
  11524 Node: Miscellaneous307408
  11525 Node: Tagging307754
  11526 Node: Notes309647
  11527 Node: Submodules311982
  11528 Node: Listing Submodules312200
  11529 Node: Submodule Transient314348
  11530 Node: Subtree316835
  11531 Node: Worktree318766
  11532 Node: Sparse checkouts319842
  11533 Node: Bundle322618
  11534 Node: Common Commands322993
  11535 Node: Wip Modes325621
  11536 Node: Wip Graph330512
  11537 Node: Legacy Wip Modes332825
  11538 Node: Commands for Buffers Visiting Files335712
  11539 Node: Minor Mode for Buffers Visiting Blobs343940
  11540 Node: Customizing344738
  11541 Node: Per-Repository Configuration346334
  11542 Node: Essential Settings348588
  11543 Node: Safety348934
  11544 Node: Performance350695
  11545 Ref: Log Performance353658
  11546 Ref: Diff Performance354963
  11547 Ref: Refs Buffer Performance356304
  11548 Ref: Committing Performance356879
  11549 Node: Microsoft Windows Performance357861
  11550 Node: MacOS Performance359052
  11551 Ref: MacOS Performance-Footnote-1360075
  11552 Node: Global Bindings360157
  11553 Node: Plumbing362385
  11554 Node: Calling Git363214
  11555 Node: Getting a Value from Git364739
  11556 Node: Calling Git for Effect368467
  11557 Node: Section Plumbing374361
  11558 Node: Creating Sections374589
  11559 Node: Section Selection378485
  11560 Node: Matching Sections380281
  11561 Node: Refreshing Buffers386202
  11562 Node: Conventions389346
  11563 Node: Theming Faces389538
  11564 Node: FAQ397643
  11565 Node: FAQ - How to ...?398081
  11566 Node: How to pronounce Magit?398438
  11567 Node: How to show git's output?399241
  11568 Node: How to install the gitman info manual?400027
  11569 Node: How to show diffs for gpg-encrypted files?400997
  11570 Node: How does branching and pushing work?401593
  11571 Node: Should I disable VC?401926
  11572 Node: FAQ - Issues and Errors402529
  11573 Node: Magit is slow403474
  11574 Node: I changed several thousand files at once and now Magit is unusable403767
  11575 Node: I am having problems committing404493
  11576 Node: I am using MS Windows and cannot push with Magit404974
  11577 Node: I am using macOS and SOMETHING works in shell but not in Magit405592
  11578 Node: Expanding a file to show the diff causes it to disappear406426
  11579 Node: Point is wrong in the COMMIT_EDITMSG buffer407014
  11580 Node: The mode-line information isn't always up-to-date408059
  11581 Node: A branch and tag sharing the same name breaks SOMETHING409122
  11582 Node: My Git hooks work on the command-line but not inside Magit410009
  11583 Node: git-commit-mode isn't used when committing from the command-line410855
  11584 Node: Point ends up inside invisible text when jumping to a file-visiting buffer413126
  11585 Node: I am no longer able to save popup defaults413975
  11586 Node: Debugging Tools414956
  11587 Node: Keystroke Index418130
  11588 Node: Function and Command Index459744
  11589 Node: Variable Index517945
  11590 
  11591 End Tag Table
  11592 
  11593 
  11594 Local Variables:
  11595 coding: utf-8
  11596 End: