-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.self.git.alias
More file actions
48 lines (42 loc) · 1.17 KB
/
.self.git.alias
File metadata and controls
48 lines (42 loc) · 1.17 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
42
43
44
45
46
47
48
# Add these to your ~/.gitconfig file under the [alias] section
[alias]
# Status, add, commit
s = status
ss = status -s
a = add
aa = add --all
c = commit
cm = commit -m
ca = commit --amend
# Branch operations - modern switch command
b = branch
ba = branch -a
bd = branch -d
sw = switch
swc = switch -c # Create and switch to new branch
swm = switch main # Quickly switch to main branch
swd = switch develop # Quickly switch to develop branch
# Checkout operations
co = checkout # Still needed for files and older git versions
cof = checkout -- # Checkout files
cob = checkout -b # Legacy branch creation (can use swc instead)
# Remote operations
f = fetch
pl = pull
ps = push
pf = push --force-with-lease
# Log viewing
l = log --oneline
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'
last = log -1 HEAD
# Diff & merge
d = diff
dc = diff --cached
m = merge
# Utility
rst = reset
rh = reset --hard
rb = rebase
cp = cherry-pick
st = stash
stp = stash pop