-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
59 lines (49 loc) · 1.41 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
# =========
# GITCONFIG
# =========
# Configuration for Git.
# Link to ~/.gitconfig
# User Configuration
[user]
name = Shresht Srivastav
username = Shresht7
email = 59516096+Shresht7@users.noreply.github.com
# Set VS Code as the default editor
[core]
editor = code --wait
# Set main as the default branch
[init]
defaultBranch = main
[color]
ui = auto # Seems to be the default anyway
[fetch]
prune = true # Automatically prune outdate branches
[alias]
# Shows a decorated log
slog = log --all --oneline --decorate --graph
flog = log --all --oneline --decorate --graph --date=relative --boundary --pretty=format:'%C(yellow)%h%Creset -%C(red)%d%Creset %s - %C(cyan)[%cn] %ad %Creset'
# Unstage files from the staging area
unstage = git restore --staged
# Amends the previous commit message
amend = commit --amend
# Shows details of the last commit
last = log -1 HEAD --stat
# Resets the last commit
undo = reset HEAD~1
# Returns an unformatted list of branches
list-branch = branch --format="%(refname:short)"
# Burn it to the ground - Hard reset
burn = reset --hard
# Set bat as the default diff tool
[pager]
diff = bat
# Set VS Code as the default merge tool
[merge]
tool = vscode
[mergetool "vscode"]
cmd = code --wait $MERGED
# Set VS Code as the default diff tool
[diff]
tool = vscode
[difftool "vscode"]
cmd = code --wait --diff $LOCAL $REMOTE