mirror of
https://github.com/namibia/tips.git
synced 2024-12-23 02:28:58 +00:00
Merge pull request #81 from Ranhiru/add-staged-as-a-synonym-for-cached
Added git diff --staged to be synonym for git diff --cached
This commit is contained in:
commit
1c07f20d21
12
README.md
12
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)
|
||||
@ -163,6 +162,12 @@ git diff
|
||||
git diff --cached
|
||||
```
|
||||
|
||||
|
||||
__Alternatives:__
|
||||
```sh
|
||||
git diff --staged
|
||||
```
|
||||
|
||||
## Show both staged and unstaged changes
|
||||
```sh
|
||||
git diff HEAD
|
||||
@ -690,11 +695,6 @@ git config --global --unset <entry-name>
|
||||
git checkout --orphan <branch_name>
|
||||
```
|
||||
|
||||
## File diff between staging and the last file version.
|
||||
```sh
|
||||
git diff --staged
|
||||
```
|
||||
|
||||
## Extract file from another branch.
|
||||
```sh
|
||||
git show <branch_name>:<file_name>
|
||||
|
@ -24,7 +24,8 @@
|
||||
"tip": "git diff"
|
||||
}, {
|
||||
"title": "Changes staged for commit",
|
||||
"tip": "git diff --cached"
|
||||
"tip": "git diff --cached",
|
||||
"alternatives": ["git diff --staged"]
|
||||
}, {
|
||||
"title": "Show both staged and unstaged changes",
|
||||
"tip": "git diff HEAD"
|
||||
@ -300,9 +301,6 @@
|
||||
}, {
|
||||
"title": "Checkout a new branch without any history",
|
||||
"tip": "git checkout --orphan <branch_name>"
|
||||
}, {
|
||||
"title": "File diff between staging and the last file version.",
|
||||
"tip": "git diff --staged"
|
||||
}, {
|
||||
"title": "Extract file from another branch.",
|
||||
"tip": "git show <branch_name>:<file_name>"
|
||||
|
Loading…
Reference in New Issue
Block a user