I set up a system to keep track of my dotfiles in my home directory as 
follows:

$ mkdir dotfiles.git
$ cd dotfiles.git
$ git init --bare

>From here I edited dotfiles.git/config to read

[core]
repositoryformatversion = 0
filemode = true
bare = false
ignorecase = true
worktree = /Users/nick

I also made a lengthy info/exclude file.

This works in that I was able to add files from my home directory and push 
them to github.

Here is the problem I'm having with ls-files:

$ git ls-files
$ git --work-tree=~ ls-files
.bash_profile
.bashrc
.gemrc
.profile
.rvmrc
.screenrc
$ git --work-tree=/Users/nick ls-files
$ git --work-tree=.. ls-files

I'm not sure why ~ works, but the absolute and relative paths do not.

Changing the config file to read worktree = ~ results in

$ git ls-files
fatal: Could not chdir to '~/': No such file or directory

I'm using the latest MacPorts version of git under OS X Lion, if 
that matters at all.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/git-users/-/EpvW6NvqHSEJ.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.

Reply via email to