Skip to content

Instantly share code, notes, and snippets.

@euxn23
Created January 14, 2026 07:59
Show Gist options
  • Select an option

  • Save euxn23/20e1c6bb777647233bc07e74f10608cd to your computer and use it in GitHub Desktop.

Select an option

Save euxn23/20e1c6bb777647233bc07e74f10608cd to your computer and use it in GitHub Desktop.
git config
[include]
path = ./env/config
[alias]
a = add .
adp = add -p
amend = commit --amend --no-edit
amende = commit --amend
author = "!git commit --amend --no-edit --author=\"$(git config user.name) <$(git config user.email)>\""
bai = branch-a-i
bdd = branch-d-d
bdi = branch-d-i
bdai = branch-d-a-i
cmm = commit -m
cmmx = "commit -m \"$(git current-branch | perl -pe 's/_/ /g' | perl -pe 's|fix/|fix: |g' | perl -pe 's|feature/|feat: |g' | perl -pe 's|chore/|chore: |g')\""
cmminit = commit -m 'initialized' --allow-empty
cout = checkout
d = "!git checkout \"$(git default-branch)\""
dp = !git d && git pull
dev = checkout develop
fp = fetch -p
main = checkout main
master = checkout master
p = push
po = push origin
prod = checkout production
pullf = !git pull origin $(git current-branch)
release = checkout release
rc = rebase --continue
rs = rebase --skip
ri = !git rebase-i
rod = !git fetch && git rebase origin/$(git default-branch)
root = !git rev-parse --show-toplevel
rho = !git fetch && git reset-hard-o
rhd = !git fetch && reset-hard-d
stl = stash list
stp = stash pop
si = switch-i
ss = status --short --branch
tigi = tig-i
wip = commit --no-verify -m 'wip'
author-date = !git rebase HEAD~ --committer-date-is-author-date
current-branch = !git rev-parse --abbrev-ref HEAD
default-branch = !git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@'
extract-branch-name = !git current-branch | perl -pe 's/_/ /g' | perl -pe 's/-/ /g' | perl -pe 's|[^/]+/||g'
branch-i = !git branch | sed -e 's|remotes/origin/||g' | sk
branch-a-i = !git branch -a | sed -e 's|remotes/origin/||g' | sk | sed -e 's/\\*//g'
branch-d-d = !git branch --merged | grep -v '*' | grep -v 'master' | xargs -I{} git branch -d {}
branch-d-i = !git branch -D $(git branch-i)
branch-d-a-i = !git branch -D $(git branch-a-i)
copy-i = !git git checkout $(git branch-i) -- $1
log-graph = log --oneline --graph --decorate=full
push-i = !git push origin $(git branch-i)
rebase-i = !git rebase -i $(git log --oneline | sk | awk '{ print $1 }')^
reset-hard-o = reset --hard origin/$(git current-branch)
reset-hard-d = reset --hard origin/$(git default-branch)
switch-i = !git switch $(git branch-a-i)
tig-i = !tig $(git branch-a-i)
pri = !git switch-i && git push origin && gh pr create
production = checkout production
[color]
ui = true
[diff]
compactionHeuristic = true
[commit]
cleanup = strip
gpgsign = true
[grep]
lineNumber = true
[push]
default = current
[credential "https://github.com"]
helper = !gh auth git-credential
[credential "https://gist.github.com"]
helper = !gh auth git-credential
[init]
defaultBranch = main
[core]
autocrlf = input
quotepath = false
[merge]
conflictstyle = diff3
[http]
postBuffer = 500M
[pull]
ff = only
[gpg]
format = ssh
[user]
signingkey = ~/.ssh/git-signing-key.pub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment