Skip to content

Commit 116d171

Browse files
committed
Merge branch 'master' of https://github.com/buckleyc/dotfiles
* 'master' of https://github.com/buckleyc/dotfiles: readme: fix link to lri’s old notes .macos: adjust toolbar title rollover delay .gitconfig: Rely on Git v2.28’s `init.defaultBranch` .gitconfig: delete `mpr` alias .gitconfig: show most recent branches first meta: rename main branch .gitconfig: make `git init` default to `main` instead of `master` (mathiasbynens#926) .gitconfig: improve `git p` alias (mathiasbynens#896) .exports: Hide zsh warning on macOS .macos: fix showing ~/Library folder in macOS 10.15 (Catalina) (mathiasbynens#917) .gitconfig: Add `g whoami` README: Fix link (mathiasbynens#902)
2 parents e9fa038 + cb6a9f4 commit 116d171

File tree

4 files changed

+57
-43
lines changed

4 files changed

+57
-43
lines changed

.gitconfig

Lines changed: 31 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
11
[alias]
22

3-
# View abbreviated SHA, description, and history graph of the latest 20 commits
3+
# View abbreviated SHA, description, and history graph of the latest 20 commits.
44
l = log --pretty=oneline -n 20 --graph --abbrev-commit
55

6-
# View the current working tree status using the short format
6+
# View the current working tree status using the short format.
77
s = status -s
88

9-
# Show the diff between the latest commit and the current state
9+
# Show the diff between the latest commit and the current state.
1010
d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat"
1111

12-
# `git di $number` shows the diff between the state `$number` revisions ago and the current state
12+
# `git di $number` shows the diff between the state `$number` revisions ago and the current state.
1313
di = !"d() { git diff --patch-with-stat HEAD~$1; }; git diff-index --quiet HEAD -- || clear; d"
1414

15-
# Pull in remote changes for the current repository and all its submodules
16-
p = git pull --recurse-submodules
15+
# Pull in remote changes for the current repository and all its submodules.
16+
p = pull --recurse-submodules
1717

18-
# Clone a repository including all submodules
18+
# Clone a repository including all submodules.
1919
c = clone --recursive
2020

21-
# Commit all changes
21+
# Commit all changes.
2222
ca = !git add -A && git commit -av
2323

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

2727
# Show verbose output about tags, branches or remotes
2828
tags = tag -l
29-
branches = branch -a
30-
remotes = remote -v
29+
branches = branch --all
30+
remotes = remote --verbose
3131

32-
# List aliases
32+
# List aliases.
3333
aliases = config --get-regexp alias
3434

35-
# Amend the currently staged files to the latest commit
35+
# Amend the currently staged files to the latest commit.
3636
amend = commit --amend --reuse-message=HEAD
3737

38-
# Credit an author on the latest commit
38+
# Credit an author on the latest commit.
3939
credit = "!f() { git commit --amend --author \"$1 <$2>\" -C HEAD; }; f"
4040

41-
# Interactive rebase with the given number of latest commits
41+
# Interactive rebase with the given number of latest commits.
4242
reb = "!r() { git rebase -i HEAD~$1; }; r"
4343

4444
# Remove the old tag with this name and tag the latest commit with it.
@@ -56,46 +56,38 @@
5656
# Find commits by commit message
5757
fm = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short --grep=$1; }; f"
5858

59-
# Remove branches that have already been merged with master
59+
# Remove branches that have already been merged with main.
6060
# a.k.a. ‘delete merged’
6161
dm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"
6262

63-
# List contributors with number of commits
63+
# List contributors with number of commits.
6464
contributors = shortlog --summary --numbered
6565

66-
# Merge GitHub pull request on top of the current branch or,
67-
# if a branch name is specified, on top of the specified branch
68-
mpr = "!f() { \
69-
declare currentBranch=\"$(git symbolic-ref --short HEAD)\"; \
70-
declare branch=\"${2:-$currentBranch}\"; \
71-
if [ $(printf \"%s\" \"$1\" | grep '^[0-9]\\+$' > /dev/null; printf $?) -eq 0 ]; then \
72-
git fetch origin refs/pull/$1/head:pr/$1 && \
73-
git checkout -B $branch && \
74-
git rebase $branch pr/$1 && \
75-
git checkout -B $branch && \
76-
git merge pr/$1 && \
77-
git branch -D pr/$1 && \
78-
git commit --amend -m \"$(git log -1 --pretty=%B)\n\nCloses #$1.\"; \
79-
fi \
80-
}; f"
66+
# Show the user email for the current repository.
67+
whoami = config user.email
8168

8269
[apply]
8370

84-
# Detect whitespace errors when applying a patch
71+
# Detect whitespace errors when applying a patch.
8572
whitespace = fix
8673

74+
[branch]
75+
76+
# Show most recently changed branches first.
77+
sort = -committerdate
78+
8779
[core]
8880

89-
# Use custom `.gitignore` and `.gitattributes`
81+
# Use custom `.gitignore` and `.gitattributes`.
9082
excludesfile = ~/.gitignore
9183
attributesfile = ~/.gitattributes
9284

93-
# Treat spaces before tabs and all kinds of trailing whitespace as an error
85+
# Treat spaces before tabs and all kinds of trailing whitespace as an error.
9486
# [default] trailing-space: looks for spaces at the end of a line
9587
# [default] space-before-tab: looks for spaces before tabs at the beginning of a line
9688
whitespace = space-before-tab,-indent-with-non-tab,trailing-space
9789

98-
# Make `git rebase` safer on macOS
90+
# Make `git rebase` safer on macOS.
9991
# More info: <http://www.git-tower.com/blog/make-git-rebase-safe-on-osx/>
10092
trustctime = false
10193

@@ -152,17 +144,17 @@
152144

153145
[diff]
154146

155-
# Detect copies as well as renames
147+
# Detect copies as well as renames.
156148
renames = copies
157149

158150
[diff "bin"]
159151

160-
# Use `hexdump` to diff binary files
152+
# Use `hexdump` to diff binary files.
161153
textconv = hexdump -v -C
162154

163155
[help]
164156

165-
# Automatically correct and execute mistyped commands
157+
# Automatically correct and execute mistyped commands.
166158
autocorrect = 1
167159

168160
[merge]

.macos

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ defaults write com.apple.systemsound "com.apple.sound.uiaudio.enabled" -int 0
4343
# Disable the over-the-top focus ring animation
4444
#defaults write NSGlobalDomain NSUseAnimatedFocusRing -bool false
4545

46+
# Adjust toolbar title rollover delay
47+
defaults write NSGlobalDomain NSToolbarTitleViewRolloverDelay -float 0
48+
4649
# Disable smooth scrolling
4750
# (Uncomment if you’re on an older Mac that messes up the animation)
4851
#defaults write NSGlobalDomain NSScrollAnimationEnabled -bool false
@@ -381,7 +384,7 @@ defaults write com.apple.finder WarnOnEmptyTrash -bool false
381384
defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool true
382385

383386
# Show the ~/Library folder
384-
chflags nohidden ~/Library
387+
chflags nohidden ~/Library && xattr -d com.apple.FinderInfo ~/Library
385388

386389
# Show the /Volumes folder
387390
sudo chflags nohidden /Volumes

.osx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# 301 https://github.com/mathiasbynens/dotfiles/blob/master/.macos
1+
# 301 https://github.com/mathiasbynens/dotfiles/blob/main/.macos

README.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ set -- -f; source bootstrap.sh
3232
To install these dotfiles without Git:
3333

3434
```bash
35-
cd; curl -#L https://github.com/mathiasbynens/dotfiles/tarball/master | tar -xzv --strip-components 1 --exclude={README.md,bootstrap.sh,.osx,LICENSE-MIT.txt}
35+
cd; curl -#L https://github.com/mathiasbynens/dotfiles/tarball/main | tar -xzv --strip-components 1 --exclude={README.md,bootstrap.sh,.osx,LICENSE-MIT.txt}
3636
```
3737

3838
To update later on, just run that command again.
3939

4040
### Specify the `$PATH`
4141

42-
If `~/.path` exists, it will be sourced along with the other files, before any feature testing (such as [detecting which version of `ls` is being used](https://github.com/mathiasbynens/dotfiles/blob/aff769fd75225d8f2e481185a71d5e05b76002dc/.aliases#L21-26)) takes place.
42+
If `~/.path` exists, it will be sourced along with the other files, before any feature testing (such as [detecting which version of `ls` is being used](https://github.com/mathiasbynens/dotfiles/blob/aff769fd75225d8f2e481185a71d5e05b76002dc/.aliases#L21-L26)) takes place.
4343

4444
Here’s an example `~/.path` file that adds `/usr/local/bin` to the `$PATH`:
4545

@@ -94,3 +94,22 @@ Suggestions/improvements
9494
originally [Mathias Bynens](https://mathiasbynens.be/)
9595
highly altered by buckleyc
9696

97+
| [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](http://twitter.com/mathias "Follow @mathias on Twitter") |
98+
|---|
99+
| [Mathias Bynens](https://mathiasbynens.be/) |
100+
101+
## Thanks to…
102+
103+
* @ptb and [his _macOS Setup_ repository](https://github.com/ptb/mac-setup)
104+
* [Ben Alman](http://benalman.com/) and his [dotfiles repository](https://github.com/cowboy/dotfiles)
105+
* [Cătălin Mariș](https://github.com/alrra) and his [dotfiles repository](https://github.com/alrra/dotfiles)
106+
* [Gianni Chiappetta](https://butt.zone/) for sharing his [amazing collection of dotfiles](https://github.com/gf3/dotfiles)
107+
* [Jan Moesen](http://jan.moesen.nu/) and his [ancient `.bash_profile`](https://gist.github.com/1156154) + [shiny _tilde_ repository](https://github.com/janmoesen/tilde)
108+
* Lauri ‘Lri’ Ranta for sharing [loads of hidden preferences](https://web.archive.org/web/20161104144204/http://osxnotes.net/defaults.html)
109+
* [Matijs Brinkhuis](https://matijs.brinkhu.is/) and his [dotfiles repository](https://github.com/matijs/dotfiles)
110+
* [Nicolas Gallagher](http://nicolasgallagher.com/) and his [dotfiles repository](https://github.com/necolas/dotfiles)
111+
* [Sindre Sorhus](https://sindresorhus.com/)
112+
* [Tom Ryder](https://sanctum.geek.nz/) and his [dotfiles repository](https://sanctum.geek.nz/cgit/dotfiles.git/about)
113+
* [Kevin Suttle](http://kevinsuttle.com/) and his [dotfiles repository](https://github.com/kevinSuttle/dotfiles) and [macOS-Defaults project](https://github.com/kevinSuttle/macOS-Defaults), which aims to provide better documentation for [`~/.macos`](https://mths.be/macos)
114+
* [Haralan Dobrev](https://hkdobrev.com/)
115+
* Anyone who [contributed a patch](https://github.com/mathiasbynens/dotfiles/contributors) or [made a helpful suggestion](https://github.com/mathiasbynens/dotfiles/issues)

0 commit comments

Comments
 (0)