结帐 commitID 不工作

checkout commitID not working

我正在尝试结帐以在 windows 中编写 bash 脚本以从文本文件中读取提交 ID,然后结帐。如以下步骤:

while IFS='' read -r line || [[ -n "$line" ]]; 
do
   cd C:/.....
   git checkout $line
done < ""

我收到以下错误:

did not match any file(s) known to git.

感谢您的建议。所以,我唯一要做的就是在 Notepad++ 中打开文本文件并使用 EOL 转换为 Unix (LF)

进行编辑