From c147aa64e21080a823d51217542ac1ebe973d11a Mon Sep 17 00:00:00 2001 From: Ranhiru Cooray Date: Sun, 12 Jun 2016 19:53:00 +0800 Subject: [PATCH] Added git diff --staged to be synonym for git diff --cached --- README.md | 8 +------- tips.json | 5 +---- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index bf29687..f09d3a0 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,6 @@ P.S: All these commands are tested on `git version 2.7.4 (Apple Git-66)`. * [View the GPG signatures in the commit log](#view-the-gpg-signatures-in-the-commit-log) * [Remove entry in the global config.](#remove-entry-in-the-global-config) * [Checkout a new branch without any history](#checkout-a-new-branch-without-any-history) -* [File diff between staging and the last file version.](#file-diff-between-staging-and-the-last-file-version) * [Extract file from another branch.](#extract-file-from-another-branch) * [List only the root and merge commits.](#list-only-the-root-and-merge-commits) * [Merge previous two commits into one.](#merge-previous-two-commits-into-one) @@ -159,7 +158,7 @@ git diff ## Changes staged for commit ```sh -git diff --cached +git diff --cached or git diff --staged ``` ## Show both staged and unstaged changes @@ -689,11 +688,6 @@ git config --global --unset git checkout --orphan ``` -## File diff between staging and the last file version. -```sh -git diff --staged -``` - ## Extract file from another branch. ```sh git show : diff --git a/tips.json b/tips.json index beeb746..0c06687 100644 --- a/tips.json +++ b/tips.json @@ -24,7 +24,7 @@ "tip": "git diff" }, { "title": "Changes staged for commit", - "tip": "git diff --cached" + "tip": "git diff --cached or git diff --staged" }, { "title": "Show both staged and unstaged changes", "tip": "git diff HEAD" @@ -300,9 +300,6 @@ }, { "title": "Checkout a new branch without any history", "tip": "git checkout --orphan " -}, { - "title": "File diff between staging and the last file version.", - "tip": "git diff --staged" }, { "title": "Extract file from another branch.", "tip": "git show :"