Next: , Previous: , Up: Running Git   [Contents][Index]


4.5.3 Running Git Manually

While Magit provides many Emacs commands to interact with Git, it does not cover everything. In those cases your existing Git knowledge will come in handy. Magit provides some commands for running arbitrary Git commands by typing them into the minibuffer, instead of having to switch to a shell.

!     (magit-run)

This transient prefix command binds the following suffix commands and displays them in a temporary buffer until a suffix is invoked.

! !     (magit-git-command-topdir)

This command reads a command from the user and executes it in the top-level directory of the current working tree.

The string "git " is used as initial input when prompting the user for the command. It can be removed to run another command.

! p     (magit-git-command)

This command reads a command from the user and executes it in default-directory. With a prefix argument the command is executed in the top-level directory of the current working tree instead.

The string "git " is used as initial input when prompting the user for the command. It can be removed to run another command.

! s     (magit-shell-command-topdir)

This command reads a command from the user and executes it in the top-level directory of the current working tree.

! S     (magit-shell-command)

This command reads a command from the user and executes it in default-directory. With a prefix argument the command is executed in the top-level directory of the current working tree instead.

User Option: magit-shell-command-verbose-prompt

Whether the prompt, used by the the above commands when reading a shell command, shows the directory in which it will be run.

These suffix commands start external gui tools.

! k     (magit-run-gitk)

This command runs gitk in the current repository.

! a     (magit-run-gitk-all)

This command runs gitk --all in the current repository.

! b     (magit-run-gitk-branches)

This command runs gitk --branches in the current repository.

! g     (magit-run-git-gui)

This command runs git gui in the current repository.


Next: , Previous: , Up: Running Git   [Contents][Index]