why `git diff` reports no file change after `git add`

Please try git diff –staged command. Alternative options available are listed below. git diff shows changes between index/staging and working files. Since, in your case, git add moved your files-with-changes to staging area, there were no modifications shown/seen. git diff –staged shows changes between HEAD and index/staging. git diff –cached also does the same thing. …

Read more

hg equivalent of git add -p?

Have a look at the record extension (which comes bundled with Mercurial). Note that since Mercurial doesn’t have the concept of the staging area like git, running hg record will simply allow you to examine, hunk by hunk, the modifications in your working copy. Any changes you choose to record will be committed, and any …

Read more