Skip to content

Commit 39d1012

Browse files
committed
Checkout a commit prior to a day ago.
1 parent 40253a4 commit 39d1012

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

.vscode/settings.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"eslint.enable": false
2+
"eslint.enable": false,
3+
"vsicons.presets.angular": false
34
}

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ P.S: All these commands are tested on `git version 2.7.4 (Apple Git-66)`.
163163
* [Backup untracked files.](#backup-untracked-files)
164164
* [List all git aliases](#list-all-git-aliases)
165165
* [Show git status short](#show-git-status-short)
166+
* [Checkout a commit prior to a day ago](#checkout-a-commit-prior-to-a-day-ago)
166167

167168
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
168169
<!-- @doxie.inject end toc -->
@@ -1150,5 +1151,10 @@ git config -l | grep alias | cut -d '.' -f 2
11501151
git status --short --branch
11511152
```
11521153
1154+
## Checkout a commit prior to a day ago
1155+
```sh
1156+
git checkout master@{yesterday}
1157+
```
1158+
11531159
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
11541160
<!-- @doxie.inject end -->

tips.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -484,5 +484,9 @@
484484
},{
485485
"title": "Show git status short",
486486
"tip": "git status --short --branch"
487-
}
487+
},
488+
{
489+
"title": "Checkout a commit prior to a day ago",
490+
"tip": "git checkout master@{yesterday}"
491+
}
488492
]

0 commit comments

Comments
 (0)