help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to handle bare git repositories with emacs 23?


From: Gregor Zattler
Subject: How to handle bare git repositories with emacs 23?
Date: Wed, 14 Oct 2009 02:59:18 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

Dear emacs users,

I use bare git repositories for version contol of some dotfiles
but they do not show up in vc nor dvc.

For use cases like this git uses environment variables:

These environment variables point to the repository and the
working tree respectively:
   grfz@shi:~$ export GIT_DIR=~/.fgits/emacs.git
   grfz@shi:~$ export GIT_WORK_TREE="$GIT_DIR/$(git config --get core.worktree)"

There are several files/directories under ~/.emacs.d:
   grfz@shi:~$ ls .emacs.d/
   _abbrev_defs      elisp          games        init.el   tramp
   _abbrev_defs.old  elpa           _gnus        lisp
   update-org.sh
   auto-save-list    _emacs.bmk     history      _recentf
   _backup           _emacs_orig    _ido.last    todo-do
   _diary            _emms-history  image-dired  todo-top
   
And some of them are version controlled:
   grfz@shi:~$ git ls-files
   .emacs.d/_abbrev_defs
   .emacs.d/_diary
   .emacs.d/_gnus
   .emacs.d/init.el

When I visit one of the version controlled files with an emacs
session which inherited the above mentioned environment variables
neither vc nor dvc recognises the file as version controlled.

But wired enough vc-dir shows only the files in ~/.emacs.d which
are *not* version controlled.  The state of all these files is
"unregistered".  If I vc-dir-show-fileentry one of the version
controlled files it appears in the vc-dir buffer and its state is
"nil".  Now I vc-dir-find this file: The mode line gives no
indication that the file is version controlled.  I modify the
file, save it and refresh the vc-dir buffer.  Now the state of
the file is "unregistered" whilst on the bash command line a git
status shows the file as modified. 

dvc-status does not recognise the directories ~/ nor ~/.emacs.d
as version controlled.


Any ideas how to manipulate these files as version controlled ones?

Ciao, Gregor
-- 
 -... --- .-. . -.. ..--.. ...-.-




reply via email to

[Prev in Thread] Current Thread [Next in Thread]