mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2024-12-26 05:04:34 +00:00
Add more git aliases
This commit is contained in:
parent
bb7a2af9f9
commit
b267b97c45
|
@ -1,25 +1,72 @@
|
|||
# This is Git's per-user configuration file.
|
||||
[user]
|
||||
name = ItsDrike
|
||||
email = itsdrike@protonmail.com
|
||||
signingkey = FB8CA11A2CF3A843
|
||||
[credential]
|
||||
helper = store --file ~/.config/git/git-credentials
|
||||
[alias]
|
||||
m = "merge"
|
||||
p = "push"
|
||||
pl = "pull"
|
||||
f = "fetch"
|
||||
|
||||
s = "status --short --branch"
|
||||
ss = "status"
|
||||
|
||||
ch = "checkout"
|
||||
chb = "checkout -b"
|
||||
|
||||
undo = "reset --soft HEAD~"
|
||||
redo = "reset HEAD@{1}"
|
||||
unstage = "restore --staged"
|
||||
|
||||
c = "commit"
|
||||
ca = "commit --ammend"
|
||||
ci = "commit --interactive"
|
||||
cm = "commit --message"
|
||||
cv = "commit --verbose"
|
||||
|
||||
a = "add"
|
||||
aa = "add --all"
|
||||
ap = "add --patch"
|
||||
au = "add --update"
|
||||
|
||||
d = "diff"
|
||||
dc = "diff --cached"
|
||||
ds = "diff --staged"
|
||||
dw = "diff --word-diff"
|
||||
|
||||
b = "branch"
|
||||
ba = "branch --all"
|
||||
bd = "branch --delete"
|
||||
bD = "branch --delete --force"
|
||||
bm = "branch --move"
|
||||
bM = "branch --move --force"
|
||||
|
||||
l = "log --oneline --decorate --all --graph"
|
||||
lol = "log --pretty=oneline --abbrev-commit --graph"
|
||||
lp = "log --patch"
|
||||
lo = "log --pretty=oneline --abbrev-commit --graph"
|
||||
lg = "log --all --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --"
|
||||
|
||||
set-upstream = "!git branch --set-upstream-to=origin`git symbolic-ref --short HEAD`"
|
||||
|
||||
find-merge = "!sh -c 'commit=$0 && branch=${1:-HEAD} && (git rev-list $commit..$branch --ancestry-path | cat -n; git rev-list $commit..$branch --first-parent | cat -n) | sort -k2 -s | uniq -f1 -d | sort -n | tail -1 | cut -f2'"
|
||||
show-merge = "!sh -c 'merge=$(git find-merge $0 $1) && [ -n \"$merge\" ] && git show $merge'"
|
||||
|
||||
[credential]
|
||||
helper = store --file ~/.config/git/git-credentials
|
||||
[core]
|
||||
excludefile = ~/.config/git/global_gitignore
|
||||
editor = vim
|
||||
pager = delta
|
||||
[interactive]
|
||||
diffFilter = delta --color-only
|
||||
[delta]
|
||||
line-numbers = true
|
||||
[merge]
|
||||
tool = meld
|
||||
[mergetool]
|
||||
keepbackup = false
|
||||
keeptemporaries = false
|
||||
conflictstyle = diff3
|
||||
[diff]
|
||||
tool = meld
|
||||
tool = vimdiff
|
||||
[fetch]
|
||||
prune = true
|
||||
[commit]
|
||||
gpgsign = true
|
||||
[gpg]
|
||||
program = /usr/bin/gpg
|
||||
[init]
|
||||
defaultBranch = main
|
||||
|
|
|
@ -195,26 +195,22 @@ alias cleanup='clean-trash && clean-down && clean-journal && clean-pacman'
|
|||
|
||||
# Git aliases
|
||||
alias g='git'
|
||||
alias gs='git status'
|
||||
alias gp='git push'
|
||||
alias gpl='git pull'
|
||||
alias gf='git fetch'
|
||||
alias gs='git status --short --branch'
|
||||
alias gss='git status'
|
||||
alias ga='git add'
|
||||
alias gap='git add --patch'
|
||||
alias gc='git commit'
|
||||
alias gcm='git commit --message'
|
||||
alias gb='git branch'
|
||||
alias gch='git checkout'
|
||||
alias gchb='git checkout --branch'
|
||||
alias gd='git diff'
|
||||
alias gdc='git diff --cached'
|
||||
alias gm='git merge'
|
||||
alias ga='git add'
|
||||
alias gaa='git add all'
|
||||
alias gc='git commit'
|
||||
alias gcm='git commit -m' && alias commit='git commit -m'
|
||||
alias gp='git push' && alias push='git push'
|
||||
alias gpl='git pull' && alias pull='git pull'
|
||||
alias gf='git fetch' && alias fetch='git fetch'
|
||||
alias gb='git branch' && alias branch='git branch'
|
||||
alias gch='git checkout' && alias checkout='git checkout'
|
||||
alias gau='git add -u' && alias addup='git add -u'
|
||||
alias gchb='git checkout -b'
|
||||
alias gcda='git diff --cached' # Diff any files staged for commit
|
||||
alias glog='git log --oneline --decorate --graph'
|
||||
alias gundo='git reset HEAD~'
|
||||
alias gundo='git reset --soft HEAD~'
|
||||
alias gredo="git reset 'HEAD@{1}'"
|
||||
alias gundopush="git push -f origin HEAD^:master"
|
||||
|
||||
# Youtube-dl aliases
|
||||
alias ytv-best='youtube-dl -f bestvideo+bestaudio'
|
||||
|
|
Loading…
Reference in a new issue