-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgit-gitconfig
More file actions
32 lines (28 loc) · 1.43 KB
/
git-gitconfig
File metadata and controls
32 lines (28 loc) · 1.43 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
[user]
name = Fabiano França
useConfigOnly = true
[core]
editor = vim
[init]
defaultBranch = main
[alias]
aco = !git add --all && git commit --message
boom = !git reset --hard HEAD && git clean -fd
br = "!f() { if [ -z ${1+x} ]; then git branch --sort=-committerdate; else git branch $@; fi }; f"
ch = "!f() { if [ -z ${1+x} ]; then git checkout main; else git checkout $@; fi }; f"
co = commit
ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate
lsb = log main.. --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate
me = merge
pusu = !git push --set-upstream origin $(git symbolic-ref --short HEAD)
pur = pull --rebase
re = "!f() { if [ -z ${1+x} ]; then git rebase main; else git rebase $@; fi }; f"
sq = "!f() { if [ -z ${1+x} ]; then git rebase --interactive; else git rebase --interactive HEAD~$@; fi }; f"
st = status
t = tag
unco = reset --mixed HEAD~
wip = !git add --all && git commit --message "⌐■_■"
up = !git checkout main && git pull --rebase && git checkout - && git rebase main
upm = !git checkout main && git pull --rebase && git checkout - && git merge main
sup = !git stash push --include-untracked && git checkout main && git pull --rebase && git checkout - && git rebase main && git stash pop
supm = !git stash push --include-untracked && git checkout main && git pull --rebase && git checkout - && git merge main && git stash pop