How do I list just the files that would be committed? How do I list just the files that would be committed? git git

How do I list just the files that would be committed?


This is what I was looking for. Thanks to notnoop for the lead I needed. I wanted to post back my solution in case it helps others.

git diff HEAD  --name-only

Since I intended to do

git commit -s -F mesage.txt

with the files found in the first line.

My intent is to create a little system that totally ignores the index i.e. that I never need to do git add. (From what I understand, the index is useful when creating patches, which isn't by no means the norm in my workflow.)


This command will tell you what files in your index/cache/staging area differ from the current HEAD (and whether they are additions, modifications or deletions) which is the changes which will be committed if you use git commit without explicit paths or the -a option. It's format is reasonably similar to the svn status output which you show.

git diff --cached --name-status


You can try:

git diff --name-status

I get the following:

$ git diff --name-statusM       README.markdown

Without the untracked files.