Skip to main content

A simple script to make the commands 'git status'/'git diff' or 'hg status'/'hg diff' run with a one key command - the s key.

Project description


Get the status of a git repo with a one key command:

$ cd ~/mygitrepo
$ s
On branch master
Your branch is up-to-date with 'origin/master'.

nothing to commit, working directory clean

Or a mercurial repo, and it will show a diff for either type of repo if it is < 80 lines:

$ cd ~/mymercurialrepo
$ s
diff -r d511abd3422a bin/p
--- a/bin/p Thu Feb 19 21:25:35 2015 +0800
+++ b/bin/p Thu Feb 19 23:52:35 2015 +0800
@@ -25,8 +25,8 @@

-#if [ "$1" == "d" ]; then
-# bash
+if [ "$1" == "d" ]; then
+ bash

M bin/p


First ensure you have python pip installed, then run:

$ sudo pip install statkey

Project details

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page