git コミット対象になっているファイルを確認する

  • 作成日 2022.10.05
  • git
git コミット対象になっているファイルを確認する

gitでコミット対象になっているファイルを確認する手順を記述してます。

環境

  • git version 2.36.1.windows.1

手順

以下のコマンドで確認可能です。
※「Changes not staged for commit:」の後に記述されている

$ git status

On branch develop
Your branch is ahead of 'origin/develop' by 1 commit.
  (use "git push" to publish your local commits)

Changes to be committed: ← addされたファイル
  (use "git restore --staged <file>..." to unstage)
        modified:   hoge.txt
        new file:   huge.txt

Changes not staged for commit: ← 編集されてaddされてないファイル
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   foo2.txt

Untracked files: ← 追加されてaddされてないファイル
  (use "git add <file>..." to include in what will be committed)
        bar.txt

画像