我想創建一個修改後的git文件的字符串數組,因此我可以在bash程序中使用它們。輸出示例:從git狀態bash輸出創建字符串數組
On branch restructured
Your branch is up-to-date with 'origin/restructured'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: path/to/file1
modified: path/to/file2
我tryig modified:
後,但搶到了文本我學到了什麼的grep不support new line所以我很茫然,我怎麼能原始輸出轉換成的東西我可以與...合作。
我建議以'git的狀態--porcelain',這是專門對易於(-er)面向解析... – twalberg