I’m working on Git command to filter the author names based on the file names
So, when I enter the following two commands,
gh@ubuntu:~$ cd git
gh@ubuntu:~/git$ git log --pretty="format:%an" t/t0030-stripspace.sh
it works great and gives my the list of authors.
However, I need to execute the same thing with the following command:
gh@ubuntu:~$ git --git-dir=/home/ghadeer/git/.git --work-tree=/home/ghadeer/git log --pretty="format:%an" t/t0030-stripspace.sh
but it shows this following error:
fatal: ambiguous argument 't/t0030-stripspace.sh': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions"
anybody knows the error ?
Just as the error message suggests, you can get around this by placing a
--before the path to the file: