MAGIT: Add example command to update submodules
This commit is contained in:
parent
5395706577
commit
584a0b1b7c
1 changed files with 22 additions and 2 deletions
|
|
@ -572,16 +572,36 @@ https://github.com/victorhge/iedit
|
||||||
Magit depends on this and it seems it's not installed as a dependency, so install it explicitly.
|
Magit depends on this and it seems it's not installed as a dependency, so install it explicitly.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package transient)
|
(use-package transient
|
||||||
|
:ensure (:wait t)
|
||||||
|
)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
*** Core
|
*** Core
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package magit)
|
(use-package magit
|
||||||
|
:ensure (:wait t)
|
||||||
|
)
|
||||||
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
**** Extra commands
|
||||||
|
|
||||||
|
***** Update all submodules
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(transient-define-suffix magit-submodule-update-all ()
|
||||||
|
"Update all submodules"
|
||||||
|
:description "Update All git submodule update --init --recursive"
|
||||||
|
(interactive)
|
||||||
|
(magit-with-toplevel
|
||||||
|
(magit-run-git-async "submodule" "update" "--force")))
|
||||||
|
|
||||||
|
(transient-append-suffix 'magit-submodule "f"
|
||||||
|
'("U" magit-submodule-update-all))
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
** Dumb-jump
|
** Dumb-jump
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue