3

Gitからのフォローアップ:作業ツリーに触れることなく特定のファイルコンテンツをステージングする機能

作業ツリーファイルの状態を変更せずに、パッチを(HEADに対して)ステージングすることにより、1つの(テキスト)ファイルのインデックスを変更したいと思います。これは可能ですか?

4

1 に答える 1

4

あなたがしたいgit apply --cached

マニュアルページから:

   --cached
       Apply a patch without touching the working tree. Instead take the cached data, apply the patch, and store
       the result in the index without using the working tree. This implies --index.
于 2011-12-21T10:32:37.437 に答える