-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitconfig
58 lines (54 loc) · 2.29 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
[credential]
helper = store
[user]
name = João Albuquerque
email = albjoaov@gmail.com
[init]
defaultBranch = main
[url "git@github.com:"]
insteadOf = https://github.com/
[color]
diff = auto
status = auto
branch = auto
interactive = auto
ui = True
pager = True
[alias]
sandbox = "! ~/bash-scripts/git-sandbox"
ps = push
ct = checkout
cb = checkout -b
st = status -sb
lg = log --pretty=format:'%Cred%h%Creset %C(bold)%cr%Creset %Cgreen<%an>%Creset %s' --max-count=30
cwip = !git add . && git commit -am "WIP"
bwip = reset HEAD~1
wip = stash save wip
upmain = !git fetch && git merge origin/main
upmaster = !git fetch && git merge origin/master
rollback = reset --soft HEAD~1
unstage-all = reset HEAD --
incoming = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' ..@{u})
outgoing = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' @{u}..)
undo = checkout --
cbn = "! ~/bash-scripts/git-commit-with-branchNumber"
feat = "! ~/bash-scripts/git-commit-with-branchNumber feat"
chore = "! ~/bash-scripts/git-commit-with-branchNumber chore"
refactor = "! ~/bash-scripts/git-commit-with-branchNumber chore"
ci = "! ~/bash-scripts/git-commit-with-branchNumber ci"
fix = "! ~/bash-scripts/git-commit-with-branchNumber fix"
docs = "! ~/bash-scripts/git-commit-with-branchNumber docs"
test = "! ~/bash-scripts/git-commit-with-branchNumber test"
rui = "! ~/bash-scripts/git-remove-unused-imports"
ruc = "! ~/bash-scripts/git-remove-unused-code"
stash-staged = "! ~/bash-scripts/git-only-stash-staged"
ct-sync-forno = "! ~/bash-scripts/git-ct-sync-forno"
soft-kick-forno = "! ~/bash-scripts/git-soft-kick-forno"
fps = "!f() { git push -u origin/$(git rev-parse --abbrev-ref HEAD); }; f"
sync-with-origin = "!f() { git reset --hard origin/$(git rev-parse --abbrev-ref HEAD); }; f"
kick = "!f() { git push origin $(git rev-parse --abbrev-ref HEAD):$1 --force; }; f" # override branch
bclean-master = "!f() { git branch --merged ${1-master} | grep -v " ${1-master}$" | xargs -r git branch -d; }; f"
bclean-main = "!f() { git branch --merged ${1-main} | grep -v " ${1-main}$" | xargs -r git branch -d; }; f"
ls = "!git config -l | grep alias | cut -c 7-"
[core]
editor = code --wait