-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitconfig
More file actions
73 lines (59 loc) · 1.85 KB
/
.gitconfig
File metadata and controls
73 lines (59 loc) · 1.85 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
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
# =========
# GITCONFIG
# =========
# Configuration for Git.
# Link to ~/.gitconfig
# Reference: https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration
# User Configuration
[user]
name = Shresht Srivastav
username = Shresht7
email = 59516096+Shresht7@users.noreply.github.com
[core]
editor = code --wait # Set VS Code as the default editor
autocrlf = input # Automatically handle LF (`\n`) and CRLF (`\r\n`) line endings between Unix and Windows systems
# Set main as the default branch
[init]
defaultBranch = main
[color]
ui = auto # Seems to be the default anyway
[color.decorate]
HEAD = "#00ffff" bold
[fetch]
prune = true # Automatically prune outdate branches
# Reference: https://git-scm.com/book/en/v2/Git-Basics-Git-Aliases
[alias]
# Shows a decorated log
slog = log --all --oneline --decorate --graph
flog = log --all --oneline --decorate --graph --stat --date=relative --pretty=format:'%C(yellow)%h%Creset %C(red)%d%Creset %s %C(brightBlack)-- %C(cyan)%cn %C(brightBlack)%ad %Creset'
# Unstage files from the staging area
unstage = 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
# 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
[grep]
lineNumber = true
patternType = perl
# GitHub Auth Credential Helpers
[credential "https://github.com"]
helper = gh auth git-credential
[credential "https://gist.github.com"]
helper = gh auth git-credential