-
Notifications
You must be signed in to change notification settings - Fork 0
/
git_aliases
34 lines (30 loc) · 1.06 KB
/
git_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
#!/bin/bash
#!/bin/zsh
#
# ====================================
# Author: Eunchong Kim
# Date: Aug., 2020
# Project: user-settings
# Description: git aliases
# ====================================
# ------------------------------------
# Basic
# ------------------------------------
alias gs='git status '
alias ga='git add '
alias gb='git branch '
alias gt='git tag '
alias gc='git commit'
alias gd='git diff'
alias go='git checkout '
alias gl="git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) \
- %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)'"
alias gla="git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) \
- %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all"
# ------------------------------------
# macro
# ------------------------------------
function gfp () {
echo "git fetch $1 && git remote prune $1"
git fetch $1 && git remote prune $1
}