我在OSX上使用Aquamacs Emacs和GitHub。我正在尝试将我的Emacs配置文件添加到我的Git存储库中以获取我的Emacs文件。
我的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")
有什么想法?谢谢。