As joesdiner and Gordon Davisson point out, the error is likely happening because the script starts with an env shebang that ends with a CR/LF line terminator, e.g. #!/usr/bin/env bash\r\n
When the script is executed, something like /usr/bin/env $'bash\r' ~/scripts/git-ftp is actually run. A program called bash\r (with a CR character at the end) is - hopefully! - unlikely to be found, and env will print:
env: bash\r: No such file or directory
But the \r will send the cursor back to the start of the line, and the env: bash text will be overwritten by what follows, i.e.:
: No such file or directory
Some versions of env will at least be decent enough to escape the literal \r:
env: ‘bash\r’: No such file or directory
But either way, it will first look for a bash\r executable in the path and try to execute it.
This is arguably a dangerous thing for env to do, since it raises the possibility of someone adding a bash\r executable somewhere in the user's path.
ls ~/scripts/git-ftpwork?