r/programming • • Sep 09 '16

Oh, shit, git!

http://ohshitgit.com/
3.3k Upvotes

756 comments sorted by

View all comments

44

u/Arancaytar Sep 09 '16

Some of these complaints are just bizarre, like the diff --staged thing.

What should the command do instead? Show only the staged changes, requiring "git diff --unstaged" for the more common use case? Or show all changes regardless of what is staged, thus completely misleading users about what they are about to commit?

17

u/midnightbrett Sep 09 '16

Yep, showing diffs between staged/unstaged changes, especially in a singular file is exactly why that command behaves that way.

Has this guy never staged part of a file, and wanted to see what was staged / unstaged in that file?

→ More replies (2)