[user] name = nsfisis email = nsfisis@gmail.com [core] editor = vim commentchar = ";" [help] autocorrect = 1 [advice] detachedhead = false [color] ui = true [merge] tool = vimdiff ff = false [rebase] abbreviatecommands = true autosquash = true autostash = true [diff] tool = vimdiff [init] defaultbranch = main [blame] coloring = repeatedLines [mergetool] keepbackup = false [credential] helper = osxkeychain [filter "lfs"] clean = git-lfs clean -- %f smudge = git-lfs smudge -- %f process = git-lfs filter-process required = true [alias] a = add ap = add -p b = branch cb = rev-parse --abbrev-ref HEAD c = commit fixup = commit --fixup amend = commit --amend --no-edit clone1 = clone --depth=1 co = checkout cob = checkout -b # git rev-parse --verify --quiet main > /dev/null # if [ $? = 0 ]; then # git checkout main # else # git checkout master # fi com = "!git rev-parse --verify --quiet main > /dev/null; if [ $? = 0 ]; then git checkout main; else git checkout master; fi" cod = checkout develop d = diff dc = diff --cached g = grep gf = grep --name-only s = status --short tmp = commit -a -m "TMP" tmps = stash save "TMP" ctmp = commit -m "TMP" sst = stash save "TMP" ss = stash save ssl = stash list ssa = stash apply ssd = stash drop ssp = stash pop last = log --pretty=fuller -1 # LAST_MERGE_COMMIT=$(git last-merge-commit) # if [ -n "$LAST_MERGE_COMMIT" ]; then # git log --oneline --boundary $LAST_MERGE_COMMIT.. # else # git log --oneline -n 10 # fi l = "!LAST_MERGE_COMMIT=$(git last-merge-commit); if [ -n \"$LAST_MERGE_COMMIT\" ]; then git log --oneline --boundary $LAST_MERGE_COMMIT..; else git log --oneline -n 10; fi" ll = log --oneline logf = log --pretty=fuller graph = log --oneline --graph r = rebase ri = rebase -i rid = rebase -i develop rc = rebase --continue m = merge mc = merge --continue mm = mergetool pullu = "!git pull upstream $(git cb) --ff" pullo = "!git pull origin $(git cb) --ff" pusho = "!git push origin $(git cb)" cpick = cherry-pick cpickc = cherry-pick --continue empty = commit --allow-empty last-merge-commit = "!git rev-list --abbrev-commit --merges HEAD | head -n 1"