mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Use better git defaults (#1601)
This commit is contained in:
committed by
GitHub
parent
e0f9beda7a
commit
e4f2cc2175
28
config/git/config
Normal file
28
config/git/config
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
# See https://git-scm.com/docs/git-config
|
||||||
|
|
||||||
|
[alias]
|
||||||
|
co = checkout
|
||||||
|
br = branch
|
||||||
|
ci = commit
|
||||||
|
st = status
|
||||||
|
[init]
|
||||||
|
defaultBranch = master
|
||||||
|
[pull]
|
||||||
|
rebase = true # Rebase (instead of merge) on pull
|
||||||
|
[push]
|
||||||
|
autoSetupRemote = true # Automatically set upstream branch on push
|
||||||
|
[diff]
|
||||||
|
algorithm = histogram # Clearer diffs on moved/edited lines
|
||||||
|
colorMoved = plain # Highlight moved blocks in diffs
|
||||||
|
mnemonicPrefix = true # More intuitive refs in diff output
|
||||||
|
[commit]
|
||||||
|
verbose = true # Include diff comment in commit message template
|
||||||
|
[column]
|
||||||
|
ui = auto # Output in columns when possible
|
||||||
|
[branch]
|
||||||
|
sort = -committerdate # Sort branches by most recent commit first
|
||||||
|
[tag]
|
||||||
|
sort = -version:refname # Sort version numbers as you would expect
|
||||||
|
[rerere]
|
||||||
|
enabled = true # Record and reuse conflict resolutions
|
||||||
|
autoupdate = true # Apply stored conflict resolutions automatically
|
||||||
@@ -1,15 +1,3 @@
|
|||||||
# Ensure git settings live under ~/.config
|
|
||||||
mkdir -p ~/.config/git
|
|
||||||
touch ~/.config/git/config
|
|
||||||
|
|
||||||
# Set common git aliases
|
|
||||||
git config --global alias.co checkout
|
|
||||||
git config --global alias.br branch
|
|
||||||
git config --global alias.ci commit
|
|
||||||
git config --global alias.st status
|
|
||||||
git config --global pull.rebase true
|
|
||||||
git config --global init.defaultBranch master
|
|
||||||
|
|
||||||
# Set identification from install inputs
|
# Set identification from install inputs
|
||||||
if [[ -n "${OMARCHY_USER_NAME//[[:space:]]/}" ]]; then
|
if [[ -n "${OMARCHY_USER_NAME//[[:space:]]/}" ]]; then
|
||||||
git config --global user.name "$OMARCHY_USER_NAME"
|
git config --global user.name "$OMARCHY_USER_NAME"
|
||||||
|
|||||||
Reference in New Issue
Block a user