Le jeudi 23 février 2012 à 08:48 +0100, Alfredo Palhares a écrit :
Hello Don,
You create a bare repo: $ mkdir etc.git $ git init --bare Now lets congigure it to chek the files elsewhere: $ git config core.worktree /etc And export these vars to you current session $ export GIT_DIR=/path/to/etc.git $ export GIT_WORK_TREE=/etc
hi all, "git config core.worktree /etc" is not really needed in your setup I would like to suggest to use alias instead of env var. This way you can work easily on multiple git repo in the same shell for example alias etc-git='git --git-dir=/path/to/etc.git --work-dir=/etc' alias home-git='git --git-dir=/path/to/home.git --work-dir=$HOME' #just check that $HOME is defined and run etc-git add /etc/pacman.conf etc-git rc.conf home-git add anyfileinhome home-git commit -a etc-git commit -a place the aliases in your .bashrc or aliases file