0

私のgitステータスでは、これが表示されます

Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

modified: file1
modified: file2
modified: file4

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: file1
modified: file4

ファイルを現在のステージングされた変更にリセットし、ステージングされていない変更のみを破棄するにはどうすればよいですか。

4

1 に答える 1

2

次のように、checkout コマンドを使用して実行できます。

git checkout file1
git checkout file4

この助けを願っています

于 2015-05-28T17:36:46.550 に答える