Skip to content

Commit cd7b5f1

Browse files
committed
Merge remote-tracking branch 'upstream/main'
* upstream/main: 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)
2 parents 4fbda56 + 66ba9b3 commit cd7b5f1

File tree

4 files changed

+41
-45
lines changed

4 files changed

+41
-45
lines changed

.exports

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,7 @@ export MANPAGER='less -X';
4141
# https://stackoverflow.com/a/42265848/96656
4242
export GPG_TTY=$(tty);
4343

44-
export LEIN_SUPPRESS_USER_LEVEL_REPO_WARNINGS=1
44+
export LEIN_SUPPRESS_USER_LEVEL_REPO_WARNINGS=1;
45+
46+
# Hide the “default interactive shell is now zsh” warning on macOS.
47+
export BASH_SILENCE_DEPRECATION_WARNING=1;

.gitconfig

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

3-
# fucking upstream shit
4-
set-upstream = !git branch --set-upstream-to=origin/`git symbolic-ref --short HEAD`
3+
# fucking upstream shit
4+
set-upstream = !git branch --set-upstream-to=origin/`git symbolic-ref --short HEAD`
55

66
# View abbreviated SHA, description, and history graph of the latest 20 commits
7+
# View abbreviated SHA, description, and history graph of the latest 20 commits.
78
l = log --pretty=oneline -n 20 --graph --abbrev-commit
89

9-
# View the current working tree status using the short format
10+
# View the current working tree status using the short format.
1011
s = status -s
1112

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

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

18-
# Pull in remote changes for the current repository and all its submodules
19-
p = git pull --recurse-submodules
19+
# Pull in remote changes for the current repository and all its submodules.
20+
p = pull --recurse-submodules
2021

21-
# Clone a repository including all submodules
22+
# Clone a repository including all submodules.
2223
c = clone --recursive
2324

24-
# Commit all changes
25+
# Commit all changes.
2526
ca = !git add -A && git commit -av
2627

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

3031
# Show verbose output about tags, branches or remotes
3132
tags = tag -l
32-
branches = branch -a
33-
remotes = remote -v
33+
branches = branch --all
34+
remotes = remote --verbose
3435

35-
# List aliases
36+
# List aliases.
3637
aliases = config --get-regexp alias
3738

38-
# Amend the currently staged files to the latest commit
39+
# Amend the currently staged files to the latest commit.
3940
amend = commit --amend --reuse-message=HEAD
4041

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

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

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

62-
# Remove branches that have already been merged with master
63+
# Remove branches that have already been merged with main.
6364
# a.k.a. ‘delete merged’
6465
dm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"
6566

66-
# List contributors with number of commits
67+
# List contributors with number of commits.
6768
contributors = shortlog --summary --numbered
6869

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

8873
[apply]
8974

90-
# Detect whitespace errors when applying a patch
75+
# Detect whitespace errors when applying a patch.
9176
whitespace = fix
9277

78+
[branch]
79+
80+
# Show most recently changed branches first.
81+
sort = -committerdate
82+
9383
[core]
9484

95-
# Use custom `.gitignore` and `.gitattributes`
85+
# Use custom `.gitignore` and `.gitattributes`.
9686
excludesfile = ~/.gitignore
9787
attributesfile = ~/.gitattributes
9888

99-
# Treat spaces before tabs and all kinds of trailing whitespace as an error
89+
# Treat spaces before tabs and all kinds of trailing whitespace as an error.
10090
# [default] trailing-space: looks for spaces at the end of a line
10191
# [default] space-before-tab: looks for spaces before tabs at the beginning of a line
10292
whitespace = space-before-tab,-indent-with-non-tab,trailing-space
10393

104-
# Make `git rebase` safer on macOS
94+
# Make `git rebase` safer on macOS.
10595
# More info: <http://www.git-tower.com/blog/make-git-rebase-safe-on-osx/>
10696
trustctime = false
10797

@@ -145,17 +135,17 @@
145135

146136
[diff]
147137

148-
# Detect copies as well as renames
138+
# Detect copies as well as renames.
149139
renames = copies
150140

151141
[diff "bin"]
152142

153-
# Use `hexdump` to diff binary files
143+
# Use `hexdump` to diff binary files.
154144
textconv = hexdump -v -C
155145

156146
[help]
157147

158-
# Automatically correct and execute mistyped commands
148+
# Automatically correct and execute mistyped commands.
159149
autocorrect = 1
160150

161151
[merge]

.macos

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ defaults write NSGlobalDomain AppleShowScrollBars -string "Always"
4141
# Disable the over-the-top focus ring animation
4242
defaults write NSGlobalDomain NSUseAnimatedFocusRing -bool false
4343

44+
# Adjust toolbar title rollover delay
45+
defaults write NSGlobalDomain NSToolbarTitleViewRolloverDelay -float 0
46+
4447
# Disable smooth scrolling
4548
# (Uncomment if you’re on an older Mac that messes up the animation)
4649
#defaults write NSGlobalDomain NSScrollAnimationEnabled -bool false
@@ -336,7 +339,7 @@ defaults write com.apple.finder WarnOnEmptyTrash -bool false
336339
defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool true
337340

338341
# Show the ~/Library folder
339-
chflags nohidden ~/Library
342+
chflags nohidden ~/Library && xattr -d com.apple.FinderInfo ~/Library
340343

341344
# Show the /Volumes folder
342345
sudo chflags nohidden /Volumes

README.md

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

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

3737
To update later on, just run that command again.
@@ -101,7 +101,7 @@ Suggestions/improvements
101101
* [Cătălin Mariș](https://github.com/alrra) and his [dotfiles repository](https://github.com/alrra/dotfiles)
102102
* [Gianni Chiappetta](https://butt.zone/) for sharing his [amazing collection of dotfiles](https://github.com/gf3/dotfiles)
103103
* [Jan Moesen](http://jan.moesen.nu/) and his [ancient `.bash_profile`](https://gist.github.com/1156154) + [shiny _tilde_ repository](https://github.com/janmoesen/tilde)
104-
* [Lauri ‘Lri’ Ranta](http://lri.me/) for sharing [loads of hidden preferences](http://osxnotes.net/defaults.html)
104+
* Lauri ‘Lri’ Ranta for sharing [loads of hidden preferences](https://web.archive.org/web/20161104144204/http://osxnotes.net/defaults.html)
105105
* [Matijs Brinkhuis](https://matijs.brinkhu.is/) and his [dotfiles repository](https://github.com/matijs/dotfiles)
106106
* [Nicolas Gallagher](http://nicolasgallagher.com/) and his [dotfiles repository](https://github.com/necolas/dotfiles)
107107
* [Sindre Sorhus](https://sindresorhus.com/)

0 commit comments

Comments
 (0)