Skip to content

Commit 68eb59c

Browse files
committed
Merge remote-tracking branch 'upstream/master'
* upstream/master: 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
2 parents 2521bb8 + c886e13 commit 68eb59c

File tree

6 files changed

+14
-21
lines changed

6 files changed

+14
-21
lines changed

.config/git/template/HEAD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ref: refs/heads/main

.exports

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

.gitconfig

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@
194194

195195
# Show verbose output about tags, branches or remotes
196196
tags = tag -l
197-
branches = branch -a
198-
remotes = remote -v
197+
branches = branch -all
198+
remotes = remote -verbose
199199

200200
# List aliases
201201
aliases = config --get-regexp alias
@@ -231,22 +231,6 @@
231231
# List contributors with number of commits
232232
contributors = shortlog --summary --numbered
233233

234-
# Merge GitHub pull request on top of the current branch or,
235-
# if a branch name is specified, on top of the specified branch
236-
mpr = "!f() { \
237-
declare currentBranch=\"$(git symbolic-ref --short HEAD)\"; \
238-
declare branch=\"${2:-$currentBranch}\"; \
239-
if [ $(printf \"%s\" \"$1\" | grep '^[0-9]\\+$' > /dev/null; printf $?) -eq 0 ]; then \
240-
git fetch origin refs/pull/$1/head:pr/$1 && \
241-
git checkout -B $branch && \
242-
git rebase $branch pr/$1 && \
243-
git checkout -B $branch && \
244-
git merge pr/$1 && \
245-
git branch -D pr/$1 && \
246-
git commit --amend -m \"$(git log -1 --pretty=%B)\n\nCloses #$1.\"; \
247-
fi \
248-
}; f"
249-
250234
# Show the user email for the current repository.
251235
whoami = config user.email
252236

@@ -255,6 +239,11 @@
255239
# Detect whitespace errors when applying a patch
256240
whitespace = fix
257241

242+
[branch]
243+
244+
# Show most recently changed branches first.
245+
sort = -committerdate
246+
258247
[credential]
259248

260249
helper = osxkeychain

.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: 1 addition & 1 deletion
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.

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)