Created
August 8, 2020 15:16
-
-
Save renodesper/dca1ce0408c90bb6f213f0e2d56a8350 to your computer and use it in GitHub Desktop.
Git Alias
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
a = add | |
ai = add --interactive | |
b = branch | |
bs = bisect | |
c = commit | |
ca = commit --amend | |
cam = commit --amend -m | |
cm = commit -m | |
co = checkout | |
cob = checkout -b | |
coh = checkout HEAD -- | |
cl = clone | |
cp = cherry-pick | |
d = diff | |
di = !"d() { git diff --patch-with-stat HEAD~$1; }; git diff-index --quiet HEAD -- || clear; d" # `git di $number` shows the diff between the state `$number` revisions ago and the current state | |
dt = difftool | |
f = fetch | |
fo = fetch origin | |
fp = fetch --prune | |
fu = fetch upstream | |
g = grep | |
gp = grep -p | |
l = log --color --graph --pretty=format:'%C(yellow)%h%d %C(reset)%s %C(green)(%cr) %C(blue)<%an>' --abbrev-commit -- | |
m = merge | |
mm = merge master | |
p = pull | |
ps = push | |
psf = push --force-with-lease | |
r = remote | |
rb = rebase | |
rs = reset | |
rv = revert | |
s = status -sb | |
st = stash | |
t = tag | |
u = reset HEAD^ | |
uh = reset --hard HEAD^ | |
us = reset --soft HEAD^ | |
aliases = !git config -l | grep alias | cut -c 7- # List git aliases | |
last = for-each-ref — sort=-committerdate refs/heads/ | |
what = whatchanged | |
who = shortlog -n -s --no-merges |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment