-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitconfig_global
74 lines (74 loc) · 2.72 KB
/
gitconfig_global
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
69
70
71
72
73
74
[user]
# This is Git's per-user configuration file.
name = Jordi Nebot
email = [email protected]
[core]
excludesfile = ~/.gitignore
pager = less -F -X
[alias]
# (Add All) Stages all untracked and modified files
aa = add --all
# (Branch Delete) Delete local branch
bd = branch --delete
# (Branch Delete --Force) Delete local branch whatever its merged status is
bdf = branch -D
# (Branch Delete Remote) Removes the remote branch (assumes remote name is origin!)
bdr = push origin --delete
# (Branch List) List all local branches
bl = branch
# (Branch List All) List all local and remote branches
bla = branch -a
# (Branch Move) Rename current branch
bm = branch --move
# (Commit Ammend) Ammend last commit
ca = commit --amend
# (Create Branch) Create a new branch and check it out
cb = checkout -b
# (CLear) Discard all changes in working tree
cl = checkout -- .
# (Commit with Message) Commits staged files with commit message
cm = commit -m
# (CheckOut) Checkout branch
co = checkout
# (List Aliases)
la = !git config --list | grep ^alias\\. | cut -c 7- | grep -Ei --color \"$1\" "#"
# (Log Graph) Show git log as graph
lg = log --all --decorate --oneline --graph
lol = log --graph --decorate --pretty=oneline --abbrev-commit
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
# (Prunable List) Lists local branches that are "gone" from remote
pl = !git branch -vv | awk '/: gone]/{print $1}'
# (Prunable List Delete) Delete all local fully merged branches that don't have a remote tracker
pld = !git pl | xargs -n1 git branch -D
# (Prune Origin) Remove all origin references in local repo for remotely deleted branches
po = remote prune origin
# (Push Track) Push branch and set upstream track
pt = push --set-upstream origin
# (REset) Undo last commit
re = reset --hard HEAD
# (Read Tree) from commit
rt = read-tree -u --reset
# (Stash Apply) Apply a specific stash
sa = stash apply
# (Stash Drop) Drop a specific stash
sd = stash drop
# (Stash pUsh) Stash working directory changes with custom message
su = stash push --include-untracked -m
# (Stash pOp) Apply and drop stash
so = stash pop
# (Stash List) List the stashed changes stack
sl = stash list
# (Show Files) List files touched in commit
sf = diff-tree --name-only --no-commit-id -r
# (STatus) Show the status of the working tree
st = status
# (Tag List) List all tags
tl = tag --list
# (Tag Push) Push all local Tags
tp = push --tags
# (UNstage) Remove files from stage
un = reset
[init]
defaultBranch = main
[push]
autoSetupRemote = true