Git list of staged files

The best way to do this is by running the command: git diff –name-only –cached When you check the manual you will likely find the following: –name-only Show only names of changed files. And on the example part of the manual: git diff –cached Changes between the index and your current HEAD. Combined together, you … Read more

Staging Deleted files

Use git rm foo to stage the file for deletion. (This will also delete the file from the file system, if it hadn’t been previously deleted. It can, of course, be restored from git, since it was previously checked in.) To stage the file for deletion without deleting it from the file system, use git … Read more