Paradox in understanding the "order of booting" of programs given by $PATH

Solution 1:

The tutorial is badly worded, one should never include a binary (like /usr/bin/git) into PATH, only directories. A better alternative would be to write

To run the latest version you need to adjust your shell path so that /usr/local/bin is searched before /usr/bin

So if you set PATH to /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin the manually installed version of git will be picked from /usr/local/bin.

PS: Handling of PATH works the same for all Unix-based systems, the various directories are searched for the command from left to right.