-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
44 lines (43 loc) · 1.59 KB
/
.gitconfig
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
42
43
44
[user]
name = Mateusz Wieloch
# auto-generated no-reply GitHub email address
email = [email protected]
[includeIf "gitdir:~/code/bp/"]
path = .gitconfig-bp
[core]
# CRLF endings in Windows checkouts, but LF endings on macOS and Linux systems and in the repository
autocrlf = input
[init]
# To match GitHub's and GitLab's default branch name
defaultBranch = main
[pull]
# By default on pull git merges remote branch into local branch. Merge commits are not intuitive, so it's common to change that behavior:
# * With ff = only, git will only move the HEAD, but won't add any new (merge) commits.
# * Alternatively, with rebase = true, git will start a rebase.
ff = only
[push]
# will push only current branch and create the branch in the remote repo if necessary
default = current
[diff]
# Removes "a" and "b" versions from file paths in a diff output.
# Before:
# --- a/a.txt
# +++ b/a.txt
# After
# --- a.txt
# +++ a.txt
noprefix = true
[alias]
# %C to change color; %h abbrev commit hash; %cr committer date, relative; %cn committer name; %d ref names; %s subject
hist = log --pretty=format:\"%Cgreen%h %Creset%cr %Cblue[%cn]%C(auto)%d %Creset%s\" --graph --decorate --all --color=always
lg = "!git hist | fzf --reverse --ansi | rg --only-matching '\\* ([a-z0-9]{7})' -r '$1' | xargs -I {} git diff {}^ {}"
amend = commit --amend
unstage = reset HEAD --
# for pair programming
st = status
s = status --short
ss = status --short
ci = commit
cim = commit -m
br = branch
co = checkout