私はしばしばgit add
をコミットのために一連のファイルを編集したが、それらのファイルを修正しなければならないChanged but not updated
の同じファイル。gitはすでにステージングされているファイルのみを再追加します
git add
に実行できるライナーは、Changed but not updated
とChanges to be committed
のファイルのみですか?上記の例の場合
markdsievers$git status
# On branch master
#
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: src/com/foo/Bar.java
# modified: src/com/foo/Foo.java
#
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: src/com/foo/Bar.java
# modified: src/com/foo/Foo.java
# modified: src/com/foobar/FooBar.java
私だけFoo.java
とBar.java
なくFooBar.java
がChanges to be committed:
リストに追加します。
あなたは 'git add -u'以外のものを考えていますか? –
'git add -u'はfilepatternを必要としているようですが、そうでなければ' Foobar.java'を追加する '.'を使います。はい私は、私の考案した例を得るためにファイルパターンを追加することができ、それはうまくいくかもしれませんが、変更は単純ではなく、単一のファイルパターンが機能することはめったにありません。 – markdsievers