Skip to content

Commit 65437f1

Browse files
author
Sumeru Chatterjee
committed
Merge remote-tracking branch 'super/main'
# By Mathias Bynens (8) and others # Via GitHub * super/main: .gitconfig: exclude submodules 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) # Conflicts: # .gitconfig
2 parents 3de9bed + b7c7894 commit 65437f1

File tree

6 files changed

+45
-29
lines changed

6 files changed

+45
-29
lines changed

.exports

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,6 @@ export MANPAGER='less -X';
3434
# Avoid issues with `gpg` as installed via Homebrew.
3535
# https://stackoverflow.com/a/42265848/96656
3636
export GPG_TTY=$(tty);
37+
38+
# Hide the “default interactive shell is now zsh” warning on macOS.
39+
export BASH_SILENCE_DEPRECATION_WARNING=1;

.gitconfig

Lines changed: 34 additions & 24 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
22-
ca = !git add -A && git commit -av
21+
# Commit all changes.
22+
ca = !git add ':(exclude,attr:builtin_objectmode=160000)' && 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,7 +56,7 @@ fc = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen
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
# Advanced Stashing
@@ -97,29 +97,36 @@ mpr = "!f() { \
9797
9898
# view all deleted lines ignoring whitespace
9999
reposize = "du -hs $(git rev-parse --show-toplevel)"
100+
# List contributors with number of commits.
101+
contributors = shortlog --summary --numbered
100102
101103
# Show the user email for the current repository.
102104
whoami = config user.email
103105
104106
[apply]
105107
106-
# Detect whitespace errors when applying a patch
108+
# Detect whitespace errors when applying a patch.
107109
whitespace = fix
108110
111+
[branch]
112+
113+
# Show most recently changed branches first.
114+
sort = -committerdate
115+
109116
[core]
110117
111-
# Use custom `.gitignore` and `.gitattributes`
118+
# Use custom `.gitignore` and `.gitattributes`.
112119
excludesfile = ~/.gitignore_global
113120
attributesfile = ~/.gitattributes
114121
115-
# Treat spaces before tabs and all kinds of trailing whitespace as an error
122+
# Treat spaces before tabs and all kinds of trailing whitespace as an error.
116123
# [default] trailing-space: looks for spaces at the end of a line
117124
# [default] space-before-tab: looks for spaces before tabs at the beginning of a line
118125
whitespace = space-before-tab,-indent-with-non-tab,trailing-space
119126
autoclrf = input
120127
editor = vim
121128
122-
# Make `git rebase` safer on macOS
129+
# Make `git rebase` safer on macOS.
123130
# More info: <http://www.git-tower.com/blog/make-git-rebase-safe-on-osx/>
124131
trustctime = false
125132
@@ -164,17 +171,17 @@ template = ~/.stCommitMsg
164171
165172
[diff]
166173
167-
# Detect copies as well as renames
174+
# Detect copies as well as renames.
168175
renames = copies
169176
170177
[diff "bin"]
171178
172-
# Use `hexdump` to diff binary files
179+
# Use `hexdump` to diff binary files.
173180
textconv = hexdump -v -C
174181
175182
[help]
176183
177-
# Automatically correct and execute mistyped commands
184+
# Automatically correct and execute mistyped commands.
178185
autocorrect = 1
179186
180187
[merge]
@@ -231,3 +238,6 @@ prompt = false
231238
mergeoptions = --no-ff
232239
[branch "develop"]
233240
mergeoptions = --no-ff
241+
[init]
242+
243+
defaultBranch = main

.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

.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: 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/mathiasbynens/dotfiles/tarball/master | tar -xzv --strip-components 1 --exclude={README.md,bootstrap.sh,.osx,LICENSE-MIT.txt}
34+
cd; curl -#L https://github.com/mathiasbynens/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/)

bootstrap.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
cd "$(dirname "${BASH_SOURCE}")";
44

5-
git pull origin master;
5+
git pull origin main;
66

77
function doIt() {
88
rsync --exclude ".git/" \

0 commit comments

Comments
 (0)