[英]Gitignore not ignoring elpa emacs folder
I'm not sure why the gitignore isn't working, but for some reason it continually tries to add the /elpa/ directory to version control. 我不确定gitignore为什么不起作用,但是由于某种原因,它会不断尝试将/ elpa /目录添加到版本控制中。 Here is my gitignore (in the root of my dotfiles repository) 这是我的gitignore(在我的dotfiles存储库的根目录中)
*.swp
*.swo
*~
\#*\#
/.emacs.desktop
/.emacs.desktop.lock
*.elc
auto-save-list
tramp
.\#*
.org-id-locations
*_archive
*_flymake.*
/eshell/history
/eshell/lastdir
/elpa/
*.rel
/auto/
.cask/
*.last
/elpa/*
/.emacs.d/elpa/*
Notice I tried 3 different elpas in here and none of them are working. 请注意,我在这里尝试了3种不同的Elpas,但它们都没有起作用。 Does anyone know why? 有人知道为什么吗?
The directory structure is 目录结构是
|- configurations
- .gitignore
|- dotfiles
|- emacs.d
| -elpa
- init.el
- etc
/elpa/
(starting with a ' /
') means it will only ignore the one at the level of the .gitignore
. /elpa/
(以' /
'开头)意味着它只会忽略.gitignore
级别的那个。
Not any elpa
folder below that .gitignore
file. .gitignore
文件下面没有任何elpa
文件夹。
elpa/
would ignore all elpa
folders. elpa/
将忽略所有elpa
文件夹。
(no need for elpa/*
) (不需要elpa/*
)
From gitignore
man page : 从gitignore
手册页 :
A leading slash matches the beginning of the pathname. 前导斜杠与路径名的开头匹配。
For example, "/*.c
" matches "cat-file.c
" but not "mozilla-sha1/sha1.c
". 例如,“/*.c
”匹配“cat-file.c
”,但不匹配“mozilla-sha1/sha1.c
”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.