How do I show the changes which have been staged?

It should just be: –cached means show the changes in the cache/index (i.e. staged changes) against the current HEAD. –staged is a synonym for –cached. –staged and –cached does not point to HEAD, just difference with respect to HEAD. If you cherry pick what to commit using git add –patch (or git add -p), –staged will return what is staged.

Staging Deleted files

Since Git 2.0.0, git add will also stage file deletions. Git 2.0.0 Docs – git-add < pathspec >… Files to add content from. Fileglobs (e.g. *.c) can be given to add all matching files. Also a leading directory name (e.g. dir to add dir/file1 and dir/file2) can be given to update the index to match the current … Read more

tech