Skip to content

Commit c80e05b

Browse files
committed
Merge branch 'master' of github.com:bluedigits/dotfiles into retrieve-localip-independently
* 'master' of github.com:bluedigits/dotfiles: Create git alias for comparing branches Try to checkout first an existing branch Add dg git alias Change some .macos defaults
2 parents 0480e7d + 552c9be commit c80e05b

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

.gitconfig

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
ca = !git add -A && git commit -av
2323

2424
# Switch to a branch, creating it if necessary
25-
go = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f"
25+
go = "!f() { git checkout \"$1\" 2> /dev/null || git checkout -b \"$1\"; }; f"
2626

2727
# Show verbose output about tags, branches or remotes
2828
tags = tag -l
@@ -59,6 +59,9 @@
5959
# Remove branches that have already been merged with master
6060
# a.k.a. ‘delete merged’
6161
dm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"
62+
63+
# Remove stale branches that are gone on remote
64+
dg = "!git branch -vv | grep ': gone]'| grep -v '\\*' | awk '{ print $1; }' | xargs -I F git branch -D \"F\""
6265

6366
# List contributors with number of commits
6467
contributors = shortlog --summary --numbered
@@ -79,6 +82,10 @@
7982
fi \
8083
}; f"
8184
85+
# Compare two branches and show which commits are not in the first
86+
# but in the second branch
87+
compare = "!f() { git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative $1..$2; }; f"
88+
8289
[apply]
8390
8491
# Detect whitespace errors when applying a patch

.macos

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ defaults -currentHost write NSGlobalDomain com.apple.trackpad.trackpadCornerClic
156156
defaults -currentHost write NSGlobalDomain com.apple.trackpad.enableSecondaryClick -bool true
157157

158158
# Disable “natural” (Lion-style) scrolling
159-
defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false
159+
# defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false
160160

161161
# Increase sound quality for Bluetooth headphones/headsets
162162
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" -int 40
@@ -181,8 +181,8 @@ defaults write NSGlobalDomain InitialKeyRepeat -int 10
181181
# Set language and text formats
182182
# Note: if you’re in the US, replace `EUR` with `USD`, `Centimeters` with
183183
# `Inches`, `en_GB` with `en_US`, and `true` with `false`.
184-
defaults write NSGlobalDomain AppleLanguages -array "en" "nl"
185-
defaults write NSGlobalDomain AppleLocale -string "en_GB@currency=EUR"
184+
defaults write NSGlobalDomain AppleLanguages -array "en"
185+
defaults write NSGlobalDomain AppleLocale -string "en_US@currency=EUR"
186186
defaults write NSGlobalDomain AppleMeasurementUnits -string "Centimeters"
187187
defaults write NSGlobalDomain AppleMetricUnits -bool true
188188

0 commit comments

Comments
 (0)