我在 OSX 上使用 Aquamacs Emacs 和 GitHub。我正在尝试将我的 Emacs 配置文件添加到我的 Emacs 文件的 Git 存储库中。
我的 Emacs 文件的 Git 存储库位于~/elisp/
我在另外两个地方有 Emacs 配置文件: 1. 一个文件:~/.emacs
2. 一个目录:~/Library/Application Support/Aquamacs\ Emacs
我尝试将文件和目录移动到~/elisp
其中,以便可以在 Git 中跟踪它们,然后使用符号链接将它们虚拟地恢复到原始位置。
在我的~/elisp
目录中,我这样做了:
mv .emacs elisp/.emacs
ln -s elisp/.emacs .emacs
mv Aquamacs\ Emacs ~/elisp/Aquamacs\ Emacs
ln -sf ~/elisp/Aquamacs\ Emacs ~/Library/Application\ Support/Aquamacs\ Emacs
这似乎有效,并且 Emacs 似乎运行正常。
但是,现在我无法将目录提交到存储库:
~/elisp/ git:(master) $ git status
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
# (commit or discard the untracked or modified content in submodules)
#
# modified: Aquamacs Emacs (modified content)
#
no changes added to commit (use "git add" and/or "git commit -a")
~/elisp/ git:(master) $ git add .
~/elisp/ git:(master) $ git status
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
# (commit or discard the untracked or modified content in submodules)
#
# modified: Aquamacs Emacs (modified content)
#
no changes added to commit (use "git add" and/or "git commit -a")
~/elisp/ git:(master) $ git add Aquamacs\ Emacs
~/elisp/ git:(master) $ git status
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
# (commit or discard the untracked or modified content in submodules)
#
# modified: Aquamacs Emacs (modified content)
#
no changes added to commit (use "git add" and/or "git commit -a")
~/elisp/ git:(master) $ git commit -m "moved folder"
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
# (commit or discard the untracked or modified content in submodules)
#
# modified: Aquamacs Emacs (modified content)
#
no changes added to commit (use "git add" and/or "git commit -a")
有什么想法吗?谢谢你。