Why isn't git reading the added file?

69 views Asked by At

I was reading an article that told me to add a file and place it in my path. Not knowing what the author meant by path, i simply put it in my root directory.

Trying to run 'git diffall', git says diffall is not a command, any ideas? Thanks in advance.

The article snippet for more information:

Write the following code to a file called git-diffall and place in your path (I put it in >…/my-git-install-dir/cmd/ )

#!/bin/sh
git diff --name-only "$@" | while read filename; do
git difftool "$@" --no-prompt "$filename" &
done

And run it in git (with usual diff input parameters), for example:

git diffall git diffall HEAD

1

There are 1 answers

0
Yeraze On BEST ANSWER

your 'path' is the collection of directories where the system looks for executables. To see it, simply execute echo $PATH at the commandline. Then put your script in one of those directories.