Skip to content

Commit

Permalink
Update git aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
RustyTake-Off committed Oct 29, 2024
1 parent ca84b42 commit d6a687f
Showing 1 changed file with 31 additions and 20 deletions.
51 changes: 31 additions & 20 deletions shared/.gitconfig
Original file line number Diff line number Diff line change
Expand Up @@ -67,58 +67,69 @@
# Get all git aliases
# alias = config --get-regexp '^alias.'
al = "!f() { [ $# -eq 0 ] && git config --get-regexp '^alias.' || git config --get-regexp '^alias.' | grep --color=always -E "$(echo "$@" | sed 's/ /|/g')"; }; f"

# Configuration
conli = config --list
unm = config user.name
uem = config user.email

# Initialization & Adding
i = init
cl = clone
ic = !git init && git commit --allow-empty -m 'Initial commit'
a = !git add ${@} && git status --short
aa = !git add --all && git status --short
aac = !git add --all && git status --short && git commit -m
autocp = !git add --all && git status --short && git commit -m 'Update' && git push
cl = clone
s = status --short
su = status --short --untracked-files

d = diff
ds = diff --stat
dc = diff --cached
dsc = diff --stat --cached
dcs = diff --cached --stat

# Committing
c = commit
cm = commit -m
ca = commit --amend
cam = commit --amend -m

rv = revert
rs = reset
# Diff and Reset
d = diff
ds = diff --stat
dc = diff --cached
dsc = diff --stat --cached
dcs = diff --cached --stat
rv = revert
rs = reset

# Push, Pull, and Status
s = status --short
su = status --short --untracked-files
pl = pull
plr = pull --rebase
pu = push

# Branching and Switching
br = branch
sw = switch
ch = checkout
chb = checkout -b

# Stashing
stl = stash list
sts = stash save
sta = stash apply
std = stash drop
stc = stash clear

br = branch
sw = switch
ch = checkout
chb = checkout -b

# Remotes
rmt = remote
rmta = remote add
rmtsu = remote set-url
rmtrm = remote remove

sh = show
l = log --graph --oneline
ll = "!f() { [ $# -eq 0 ] && git log --graph --oneline || git log --graph --oneline -"$1"; }; f"
ls = "!f() { [ $# -eq 0 ] && git log --graph --oneline --stat || git log --graph --oneline --stat -"$1"; }; f"
# Viewing Logs
sh = show
l = log --graph --oneline
ll = "!f() { [ $# -eq 0 ] && git log --graph --oneline || git log --graph --oneline -"$1"; }; f"
ls = "!f() { [ $# -eq 0 ] && git log --graph --oneline --stat || git log --graph --oneline --stat -"$1"; }; f"
rl = "!f() { [ $# -eq 0 ] && git reflog --date=iso --pretty=oneline || git reflog --date=iso --pretty=oneline -"$1"; }; f"
rls = "!f() { [ $# -eq 0 ] && git reflog --date=iso --pretty=oneline --stat || git reflog --date=iso --pretty=oneline --stat -"$1"; }; f"

# Load Git configs with specific overrides
[include]
Expand Down

0 comments on commit d6a687f

Please sign in to comment.