에서 멀티 워드 텍스트를 읽을 로 나에게 오류를 제공합니다 :명령 줄
Enter description of new version: hope it works
error: pathspec 'it' did not match any file(s) known to git.
error: pathspec 'works'' did not match any file(s) known to git.
fatal: too many params
때로는 같은주고있다 :
Enter description of new version: final check
error: pathspec 'check'' did not match any file(s) known to git.
fatal: Failed to resolve 'check'' as a valid ref.
Everything up-to-date
이 페이지 무엇입니까 내 대본에 문제가있어?
내가 사용 해봤 변수 $ 내림차순
에 명령 줄에서 여러 단어 설명을 읽을 수있는 원인과 해결 방법을 제안하십시오 :
echo -n 'Enter description of new version: ';
read text;
desc="'"$text"'";
git commit -m $desc;
하지만 사용. 에
git commit -m hope it works
및
git commit -m "hope it works"
첫 번째 시도 :
이git commit -m "$desc"
차이가 하나 사이입니다 :
는
''git commit -m '$ desc''과'git commit -m' " '$ desc'" ''시도했는데 왜 작동하지 않았습니까? – sivareddy963