Add tip: git log -n

This commit is contained in:
shfshanyue 2017-02-21 13:57:24 +08:00
parent 2e8cfda782
commit 6fd5b4b52d
2 changed files with 16 additions and 0 deletions

View File

@ -104,6 +104,7 @@ P.S: All these commands are tested on `git version 2.7.4 (Apple Git-66)`.
* [List ignored files.](#list-ignored-files)
* [Status of ignored files.](#status-of-ignored-files)
* [Commits in Branch1 that are not in Branch2](#commits-in-branch1-that-are-not-in-branch2)
* [List n last commits](#list-n-last-commits)
* [Reuse recorded resolution, record and reuse previous conflicts resolutions.](#reuse-recorded-resolution-record-and-reuse-previous-conflicts-resolutions)
* [Open all conflicted files in an editor.](#open-all-conflicted-files-in-an-editor)
* [Count unpacked number of objects and their disk consumption.](#count-unpacked-number-of-objects-and-their-disk-consumption)
@ -777,6 +778,17 @@ git status --ignored
git log Branch1 ^Branch2
```
## List n last commits
```sh
git log -<n>
```
__Alternatives:__
```sh
git log -n <n>
```
## Reuse recorded resolution, record and reuse previous conflicts resolutions.
```sh
git config --global rerere.enabled 1

View File

@ -300,6 +300,10 @@
}, {
"title": "Commits in Branch1 that are not in Branch2",
"tip": "git log Branch1 ^Branch2"
}, {
"title": "List n last commits",
"tip": "git log -<n>",
"alternatives": ["git log -n <n>"]
}, {
"title": "Reuse recorded resolution, record and reuse previous conflicts resolutions.",
"tip": "git config --global rerere.enabled 1"