-
Notifications
You must be signed in to change notification settings - Fork 5
/
aliases
35 lines (30 loc) · 1.13 KB
/
aliases
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#
# Useful aliases to put in the [alias] section of your ~/.gitconfig
#
# Usage:
# git plush <push args>
# Description:
# push to your origin and github in one go
plush = "!f(){ git push origin \"$@\" && git push github \"$@\";};f"
# Usage:
# git ardis <n> <commit args>
# Description:
# a Teeny Tiny Time Machine, the git ardis will make your commit
# appear to have been performed with an offset of n hours from now
ardis = "!f(){ perl -e'@ENV{<GIT_{AUTHO,COMMITTE}R_DATE>}=(~~localtime$^T+3600*shift)x2;exec git,commit,@ARGV' -- \"$@\";};f"
# Usage:
# git graph <rev-list>
# Description:
# a nice graph with all the interestings bits, one commit per line
graph = log --graph --pretty='format:%C(auto)%h %C(cyan)%ad%C(reset)%C(auto)%d %s' --date=short --date-order
# Usage:
# git blead
# Description:
# a graph of just the unpublished stuff (assuming releases use v* tags)
blead = "!f(){ git graph `git tag -l v* | tail -1`.. ;};f"
# Usage:
# git last <rev-list>
# Description:
# When was the last commit on the optional rev-list?
# (in a human-readable format)
last = log --pretty=%ad -1 --relative-date