-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitconfig
More file actions
41 lines (32 loc) · 1.19 KB
/
.gitconfig
File metadata and controls
41 lines (32 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
[alias]
# View abbreviated SHA, description, and history graph of the latest 20 commits
ls = log --pretty=oneline -n 20 --graph --abbrev-commit
# View the current working tree status using the short format
s = status -s
# Clone a repository including all submodules
c = clone --recursive
# Show the diff between the latest commit and the current state
d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat"
# `git di $number` shows the diff between the state `$number` revisions ago and the current state
di = !"d() { git diff --patch-with-stat HEAD~$1; }; git diff-index --quiet HEAD -- || clear; d"
# List aliases
aliases = config --get-regexp alias
# Amend the currently staged files to the latest commit
amend = commit --amend --reuse-message=HEAD
# Remove branches that have already been merged with master
# a.k.a. ‘delete merged’
dm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"
# Show verbose output about tags, branches or remotes
tags = tag -l
branches = branch -a
remotes = remote -v
[init]
defaultBranch = main
[commit]
gpgSign = true
[tag]
gpgSign = true
[core]
editor = nvim
[include]
path = ~/.gitconfig_local