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

git: How do I recursively add all files in a directory subtree that match a glob pattern?

It’s a bug in the documentation. Quote the asterisk with $ git add documentation/\*.screen or $ git add ‘documentation/*.screen’ to get the behavior you want. If instead you want to add files in the current directory only, use $ git add *.screen UPDATE: I submitted a patch that corrects the issue, now fixed as of … Read more

GitHub – error: failed to push some refs to ‘git@github.com:myrepo.git’

Your origin repository is ahead of your local repository. You’ll need to pull down changes from the origin repository as follows before you can push. This can be executed between your commit and push. git pull origin development development refers to the branch you want to pull from. If you want to pull from master … Read more