-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: greatly improve and refine Git config
Signed-off-by: Vladyslav Dukhin <[email protected]>
- Loading branch information
Showing
1 changed file
with
60 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,35 +2,50 @@ | |
|
||
[init] | ||
defaultBranch = main | ||
[push] | ||
default = current | ||
followTags = true | ||
[status] | ||
aheadBehind = true | ||
submoduleSummary = true | ||
showUntrackedFiles = all | ||
showStash = true | ||
renames = copies | ||
[branch] | ||
autoSetupMerge = always | ||
autoSetupRebase = always | ||
sort = -committerdate | ||
[fetch] | ||
prune = true | ||
writeCommitGraph = true | ||
[pull] | ||
rebase = true | ||
rebase = true # merges | ||
[push] | ||
default = upstream | ||
followTags = true | ||
autoSetupRemote = true | ||
[rebase] | ||
autoStash = true | ||
updateRefs = true | ||
[branch] | ||
autosetupmerge = always | ||
autosetuprebase = always | ||
sort = -committerdate | ||
missingCommitsCheck = error | ||
[commit] | ||
cleanup = strip | ||
template = ~/.gitmessage | ||
[diff] | ||
tool = vscode | ||
renames = copies | ||
mnemonicPrefix = true | ||
submodule = log | ||
[difftool "vscode"] | ||
cmd = code --wait --diff "$REMOTE" "$LOCAL" | ||
[merge] | ||
tool = vscode | ||
autoStash = true | ||
[mergetool] | ||
keepBackup = false | ||
keepTemporaries = false | ||
writeToTemp = true | ||
prompt = false | ||
[mergetool "vscode"] | ||
cmd = code --wait --merge "$REMOTE" "$LOCAL" "$BASE" "$MERGED" | ||
trustExitCode = true | ||
[user] | ||
name = Vladyslav Dukhin | ||
email = [email protected] | ||
[credential] | ||
helper = osxkeychain | ||
[core] | ||
editor = code --wait | ||
pager = less --quit-if-one-screen | ||
|
@@ -41,9 +56,31 @@ | |
ui = auto | ||
[column] | ||
ui = auto | ||
[commit] | ||
cleanup = strip | ||
template = ~/.gitmessage | ||
[user] | ||
name = Vladyslav Dukhin | ||
email = [email protected] | ||
[credential] | ||
helper = osxkeychain | ||
[grep] | ||
break = true | ||
heading = true | ||
lineNumber = true | ||
extendedRegexp = true | ||
[log] | ||
abbrevCommit = true | ||
follow = true | ||
showSignature = true | ||
[tag] | ||
sort = version:refname | ||
[versionsort] | ||
suffix = -pre | ||
suffix = .pre | ||
suffix = -alpha | ||
suffix = .alpha | ||
suffix = -beta | ||
suffix = .beta | ||
suffix = -rc | ||
suffix = .rc | ||
[rerere] | ||
# Reuse Recorded Resolution | ||
enabled = true | ||
|
@@ -53,7 +90,7 @@ | |
port = 4321 | ||
[alias] | ||
# ex. (git s) | ||
s = status --show-stash --ahead-behind --renames | ||
s = status | ||
# ex. (git c) | ||
c = commit --signoff | ||
# ex. (git ca) | ||
|
@@ -67,10 +104,10 @@ | |
# pushes changes to the remote branch of the same name | ||
# ex. (git p) | ||
p = push origin HEAD # use --signed flag | ||
fp = push --force-with-lease origin HEAD | ||
fp = push --force-with-lease --force-if-includes origin HEAD | ||
# outputs the log graph of git history with statistics | ||
# ex. (git l) | ||
l = log --oneline --graph --decorate --stat --show-signature | ||
l = log --oneline --graph --decorate --date=relative --stat | ||
# stash the changes in a dirty working directory away, include untracked | ||
# ex. (git st "some awesome code") | ||
st = stash push --include-untracked --message | ||
|
@@ -82,4 +119,8 @@ | |
# outputs a condensed summary of the working directory against the branch | ||
# ex. (git summary, git summary main) | ||
summary = diff --word-diff --compact-summary | ||
# undo last commit but keep changes in stage | ||
undo = reset --soft HEAD~1 | ||
# ex. (git aliases) | ||
aliases = config --get-regexp alias | ||
# git maintenance start |