3 ms·
If you are using a recent git version, you can use diff --staged instead - diff --cached is there for existing users. Specifying names at commit time is really
by richardwhiuk 13y ago
If you are using a recent git version, you can use diff --staged instead - diff --cached is there for existing users.
Specifying names at commit time is really horrible - it's more error prone and harder to get a diff of exactly what you are committing.
You can also commit part of files using the staging area by doing git add -p. My workflow is often git add -p; git diff --staged; git commit
- ghayes 13y agoAnd, alternatively, you can use `git commit -a` if you want to bypass the staging area.