Change one branch from master to main
This commit is contained in:
@@ -13,12 +13,13 @@ Welcome to my research pages.
|
||||
|
||||
* Add a submodule :noexport:
|
||||
#+begin_src emacs-lisp :results none
|
||||
(let* ((url (read-string "Add submodule (remote url) "))
|
||||
(url-match (string-match "\\([^./]+\\)\\(\\.git\\)?$" url))
|
||||
(path (match-string 1 url))
|
||||
(path (read-string "Submodule directory " path)))
|
||||
(shell-command (concat "git submodule add " url " " path))
|
||||
(shell-command (concat "git submodule deinit -f " path)))
|
||||
(let* ((url (read-string "Add submodule (remote url): "))
|
||||
(url-match (string-match "\\([^./]+\\)\\(\\.git\\)?$" url))
|
||||
(default-path (match-string 1 url))
|
||||
(path (read-string "Submodule directory: " default-path))
|
||||
(branch (read-string "Branch to use (default: main): " nil nil "main")))
|
||||
(shell-command (format "git submodule add --branch %s %s %s" branch url path))
|
||||
(shell-command (format "git submodule deinit -f %s" path)))
|
||||
#+end_src
|
||||
|
||||
* Change submodule url :noexport:
|
||||
|
||||
Reference in New Issue
Block a user