forked from gitconfig/gitconfig
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitconfig
More file actions
41 lines (41 loc) · 1.54 KB
/
.gitconfig
File metadata and controls
41 lines (41 loc) · 1.54 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
[user]
name = Miguel Ángel Esbrí
email = maesbri@gmail.com
[alias]
# list branches ordered by change time
br = "!git for-each-ref --format='%(committerdate:short),%(authorname),%(refname:short)' --sort=committerdate refs/heads/ | column -t -s ','"
bra = branch -a
ci = commit
co = checkout
cim = commit -m
# Show minimal diffs instead of whole lines changed and highlight trailing whitespace in diffs
df = diff --color-words=. --ws-error-highlight=new,old
dfs = diff --staged --ws-error-highlight=new,old
# Find a string but omit strings with lendth over 400 chars
find = "!f() { str=${@}; echo $str; git grep -E -e$str --and --not -e '.{400}'; }; f"
i = update-index --assume-unchanged
l = log --oneline --graph --decorate
lg = log -p
ls = ls-files
pom = push origin master
# push current branch
po = "!git push --set-upstream origin \"$(git rev-parse --abbrev-ref HEAD)\""
st = status
# stash unstaged only
stuo = "!f() { git stash save --keep-index "Unstaged only" && git stash save "Staged only" && git stash pop && git add . --all && git status; }; f"
# uncommit last
unc = reset --soft HEAD^
unstage = reset HEAD --
[color]
ui = auto
[core]
excludesfile = ~/.gitignore_global
pager = less -R
editor = vim
[merge]
conflictstyle = diff3
# Setup your merge tool here. This will allow you to see visual diffs with `git mergetool` or `git difftool`
tool = meld
[rebase]
# Display authors on rebase -i
instructionFormat = (%an <%ae>) %s