मैं एक निर्देशिका में सभी फ़ाइलों को जोड़ने, प्रतिबद्ध करने, धक्का देने के लिए एक बैश स्क्रिप्ट लिख रहा हूं।गिट प्रतिबद्ध बैश स्क्रिप्ट
#!/bin/bash
git add .
read -p "Commit description: " desc
git commit -m $desc
git push origin master
मैं निम्न त्रुटि हो रही है:
$ ./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
मुझे यकीन है कि नहीं कर रहा हूँ अगर यह पाठ में पढ़ने के साथ एक समस्या है (यह echo
रों ठीक) है या git commit -m
को इसे पारित।
git commit -m "$desc"
वर्तमान स्क्रिप्ट में, test
के रूप में जा रहा है संदेश और commit
और script
अगले तर्क के रूप में इलाज किया जा रहा है के लिए प्रतिबद्ध:
"उचित उद्धरण करें" को कभी भी अतिरंजित नहीं किया जा सकता है। नेट पर बहुत सारे उपपर "हाउटोस" और अर्ध-सही सलाह/उदाहरण ... –