我试图使用git来管理我的.emacs.d/,但是我没有添加一些文件:

下面是.gitignore文件:
*~
auto-save-list为什么git add -A无法添加这些文件?对于使用git管理.emacs.d有什么实用的建议吗?
编辑:
~/.emacs.d $ git config -l
user.email=nickleeh@hotmail.com
user.name=Nick Lee
core.autocrlf=input
core.editor=sublime -wl1
push.default=simple
color.ui=true
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
user.email=nickleeh@hotmail.com
~/.emacs.d $ 编辑2
当我试图添加未跟踪的文件时,我得到了以下致命错误:
~/.emacs.d $ git add el-get/ace-jump-mode/*
fatal: Pathspec 'el-get/ace-jump-mode/README.md' is in submodule 'el-get/ace-jump-mode'结果表明,ace-jump-mode是一个子模块。我怎么能骑上这辆车?
这是否意味着使用git来管理emacs配置文件不是一个好主意?
发布于 2014-12-28 03:10:32
据http://git-scm.com/docs/git-add称,
如果在使用
-A选项时没有指定,则整个工作树中的所有文件都将被更新( Git的旧版本用于将更新限制在当前目录及其子目录中)。
我认为这是您的问题,虽然我确实看到一个文件是在一个子目录中添加的。
发布于 2014-12-28 07:22:58
显然,在过去,您已经创建了至少两个不同的存储库。
一个存储库位于~/.emacs.d中,因此git init不创建,而是创建一个新的存储库,但只再次初始化它:
来自git help init
Running git init in an existing repository is safe. It will not
overwrite things that are already there. The primary reason for
rerunning git init is to pick up newly added templates (or to move the
repository to another place if --separate-git-dir is given).另一个存储库位于~/.emacs.d/el-get中。这个存储库是“未跟踪内容”消息的原因,也是不将这些文件添加到外部存储库的原因。
你有三种可能性:
发布于 2014-12-28 03:35:19
显然,现在requires the path argument为git add -A命令.
请注意,启动git2.0 (Q1或Q2 2014)时,讨论git。(工作树中的当前路径),必须使用“。”在另一个git中,也添加命令。
这意味着:
“加-A。”相当于"git .;git添加-u“。 (请注意额外的‘’。)对于git,添加-A,git添加-u)
因为git添加-A或git添加-u将在整个工作树上操作(仅启动git2.0),而不只是在当前路径上操作。
https://stackoverflow.com/questions/27673297
复制相似问题