Skip to content

Instantly share code, notes, and snippets.

@kazuho
Created March 31, 2014 02:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kazuho/9883861 to your computer and use it in GitHub Desktop.
Save kazuho/9883861 to your computer and use it in GitHub Desktop.
$ alias git='unco record -- git' <-- set alias
$ git status <-- now on 'master'
# On branch master
nothing to commit, working directory clean
$ git checkout wip <-- switch to 'wip'
Switched to branch 'wip'
$ git status <-- now on 'wip'
# On branch wip
nothing to commit, working directory clean
$ unco history <-- print history
1 git status
2 git checkout wip
3 git status
$ unco revert 2 <-- revert the checkout
$ git status <-- now on 'master'
# On branch master
nothing to commit, working directory clean
$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment