0

I am getting error as fatal: pathspec '*?' did not match any files when trying to run the git add * command from the shell script. Please find the details below.

OABLN1234:/mnt/d/Git_Repos/pipeline$ ll
total 4
drwxrwxrwx 1 harman harman  512 Feb 19 21:05 ./
drwxrwxrwx 1 harman harman  512 Feb 19 14:56 ../
drwxrwxrwx 1 harman harman  512 Feb 19 21:18 .git/
-rwxrwxrwx 1 harman harman 3906 Feb 19 18:39 Jenkinsfile*
-rwxrwxrwx 1 harman harman   66 Feb 19 21:18 push.sh*

OABLN1234:/mnt/d/Git_Repos/pipeline$ cat push.sh
git add *
git commit -m "Push everything from Laptop"
git push

OABLN1234:/mnt/d/Git_Repos/pipeline$ ./push.sh
fatal: pathspec '*?' did not match any files
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
        modified:   push.sh

no changes added to commit
' is not a git command. See 'git --help'.

The most similar command is
        push

How can I fix this?

9769953
  • 10,344
  • 3
  • 26
  • 37
Chetu
  • 29
  • 3

0 Answers0