From 5815b101d9a87921305e023db3ccb421f15d427f Mon Sep 17 00:00:00 2001 From: Diogo Lemos Date: Thu, 23 Feb 2017 12:29:39 +0000 Subject: [PATCH] Add follow up your last commit --- README.md | 6 ++++++ tips.json | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b3be0f2..6499587 100644 --- a/README.md +++ b/README.md @@ -160,6 +160,7 @@ P.S: All these commands are tested on `git version 2.7.4 (Apple Git-66)`. * [Backup untracked files.](#backup-untracked-files) * [List all git aliases](#list-all-git-aliases) * [Show git status short](#show-git-status-short) +* [Follow up your last commit](#follow-up-your-last-commit) @@ -1105,5 +1106,10 @@ git config -l | grep alias | cut -d '.' -f 2 git status --short --branch ``` +## Follow up your last commit +```sh +git log --oneline --max-count=1 --date=short --pretty="%C(auto)%h %C(auto)%ad %C(auto)%C(auto)|%d %s %C(cyan)[%cn]" --author "$(git config --global user.email)" +``` + diff --git a/tips.json b/tips.json index a48a076..072960f 100644 --- a/tips.json +++ b/tips.json @@ -473,5 +473,7 @@ },{ "title": "Show git status short", "tip": "git status --short --branch" -} -] +},{ + "title": "Follow up your last commit", + "tip": "git log --oneline --max-count=1 --date=short --pretty=\"%C(auto)%h %C(auto)%ad %C(auto)%C(auto)|%d %s %C(cyan)[%cn]\" --author \"$(git config --global user.email)\"" +}]