Sto scrivendo uno script bash per aggiungere, commettere, spingere tutti i file in una directory.Git commit bash script
#!/bin/bash
git add .
read -p "Commit description: " desc
git commit -m $desc
git push origin master
Sto ottenendo il seguente errore:
$ ./togithub
Commit description:
test commit script
error: pathspec 'commit' did not match any file(s) known to git.
error: pathspec 'script"' did not match any file(s) known to git.
Everything up-to-date
Non sono sicuro se questo è un problema con la lettura del testo (è echo
s bene) o di passarlo a git commit -m
.
"Fare quotazioni corrette" non può mai essere esagerato abbastanza. Troppi "suggerimenti" e consigli/esempi semi-corretti sulla rete ... –