変更をステージングしていないすべてのファイルに対してシェルコマンドを実行したいとします。GIT、変更されたファイルごとにコマンドを実行しますか?
など。 git status
が
On branch xxxxxxx
Your branch is up-to-date with 'origin/xxxxxxxxx'.
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: client/.../reports.coffee
modified: client.../tools.coffee
を示していた場合、私は、ファイルreports.coffee
とtools.coffee
上でコマンドを実行します。
find
を使用したくないのは、ファイルが異なる時間に変更される可能性があるためです。どのように私はそれを達成することができますか考えていますか?
私のマシンでは動作しません。私はgrep '??'に誤りがあると思う。 –
git status -sは "M go-lib /..../ user.go"を出力します。 –
'git status -s':ショートフォーマットの作業ツリーステータスを表示します。 'grep '??' ':追跡されていないファイルの場合である" ?? "を含む行だけをフィルタリングします。 'cut -f2 -d ''':文字列の2番目の部分だけを保持し、部分は空白で区切ります。 – dvxam