0

Given: Emacs 28.1

Windows 11

git version 2.47.1.windows.1

Here my init.el

;; https://github.com/Malabarba/smart-mode-line
(use-package smart-mode-line
  :ensure t
  :config
  ;;(setq sml/theme 'light)
  (sml/setup))
  

;;https://github.com/10sr/git-ps1-mode-el
(use-package git-ps1-mode
  :ensure t
  :config
  (git-ps1-mode t))

If in dired mode open directory contain .git folder then git branch show in the modeline.

enter image description here

This is because I use package git-ps1-mode. But this work only on Linux.

On Windows modeline not show git branch name enter image description here

4
  • Maybe a trivial question, but is git in $PATH? IOW, if you open Windows terminal and execute git --help, do you see a git help message? Commented Jan 16 at 22:37
  • @Hi-Angel Yes, git version 2.47.1.windows.1 Commented Jan 17 at 7:15
  • I looked at the code, and I see it seem to be also using bash. Do you have bash in $PATH as well? And btw, please check *Messages* buffer for warnings or errors, I presume it should have something on the matter. Commented Jan 17 at 7:42
  • @Hi-Angel In my $PATH I has path to bash.exe - c:\Program Files\Git\bin Commented Jan 17 at 9:33

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.