I googled this command and it said it is provided via git-man, which I have installed. Anybody having issues with this command not being found?

It appears based on git-ls-files manpage that we can use git ls-files. However, this breaks existing tool. Is there a workaround for this?


git ls-files $args



git-ls-files is a manual page on Ubuntu. A search with apt-file search git-ls-files confirmed it.

If you want to use git-ls-files instead of git ls-files, create a symlink for it:

sudo ln -s /usr/bin/git /usr/local/bin/git-ls-files

Unless some other program depends on this name, I'd just use git ls-files, the only difference is the first separator, dash (-) vs a space ().

If you wish to create such an alias for each git command, run the below bash command:

for file in /usr/lib/git-core/*; do name=${file##*/}; [[ $name != git ]] && [ -x "$file" ] && sudo ln -s "$file" "/usr/local/bin/$name"; done

This will create the symlinks in /usr/local/bin.

  • Works, you answered so fast I can't flag it as the answer. The issue lies in the tool github.com/tsgates/git-emacs. Thanks! – Drew Jul 22 '11 at 14:06
  • I just tested another approach and it seems that I can even make a symlink to get git-ls-files working. – Lekensteyn Jul 22 '11 at 14:07
  • Well I may go that route, it's looking for a diff-status too. Thanks for posting that – Drew Jul 22 '11 at 18:33

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.