-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
69 lines (58 loc) · 1.92 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
[user]
email = jimrothstein@gmail.com
name = jimrothstein
[push]
default = simple
[core]
editor = vim.tiny
excludesfile = "~/.gitignore"
### SEE https://stackoverflow.com/questions/1441010/the-shortest-possible-output-from-git-log-containing-author-and-date/1441062#1441062
# USAGE: git log (jr: 2023-06-03)
[log]
date=relative
[format]
# pretty = format:%C(auto,yellow)%h%C(auto,magenta)% G? %C(auto,blue)%>(12,trunc)%ad %C(auto,green)%<(7,trunc)%aN%C(auto,reset)%s%C(auto,red)% gD% D
[alias]
# NOTE:
# use git wants double quotes, not single
# USAGE: git co production
# git cob newBranch
s = status
ss = status -s
#a = "!git s ; git add . ; git commit -m \"$1\; git push;"
#a = "!git s ; git add . ; git commit -m "test"; git push;"
a = add .
cm = commit -m
# amend without a new ms (be sure NOT yet pushed)
can = commit --amend --no-edit
cana = commit --amend --no-edit -a
co = checkout
cob = checkout -b
db = "branch -d"
size = "! git ls-files | xargs du -sh --threshold=1M | less" # ! = run in shell
# %T = full SHA
# %h = short SHA
# %r = relative (2 days ago)
# ------------------------ git log
# git l
# l = "log --decorate --oneline --graph -5 --pretty=format:'%h-%T'"
l = "log --decorate --oneline --graph -5"
# display min <SHA> - difference
l1 = "log --decorate --oneline --graph -20 --abbrev-commit" --pretty=format:'%h_ %ar'
# display SHA - minutes ago
ll = "log --pretty=format:'%h_ %ar'" -10
pretty = log --pretty=\"format:%C(auto,yellow)%h%C(auto,magenta)% G? %C(auto,blue)%>(12,trunc)%ad %C(auto,green)%<(7,trunc)%aN%C(auto,reset)%s%C(auto,red)% gD% D\"
# last commit
last = "log -1 HEAD"
# List All git projects
all = "!find **/.git/config"
[credential]
helper = cache
[credential "https://github.com"]
helper =
helper = !/usr/bin/gh auth git-credential
[credential "https://gist.github.com"]
helper =
helper = !/usr/bin/gh auth git-credential
[pull]
ff = only