-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
43 lines (43 loc) · 940 Bytes
/
.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
[user]
email = [email protected]
name = Prajwal S N
signingkey = D0FECEE245BC2695
[url "[email protected]:"]
insteadOf = "gh:"
insteadOf = "https://github.com/"
[init]
defaultBranch = main
[commit]
gpgsign = true
[alias]
a = add
b = "!SUCCESS=$(git switch $1 2>&1); \
if [[ $SUCCESS == *\"invalid reference\"* && ! -z $1 ]]; then \
read -e -n 1 -p \"Create new branch $1 [Y/n]? \" CHOICE; \
if [[ $CHOICE != \"n\" ]]; then \
git switch -c $1; \
fi \
else \
echo $SUCCESS; \
fi #"
bd = branch -D
bdr = push -d origin
br = branch -a
cl = clone
fork = "!git clone \"$1\" && git remote add upstream \"$2\" #"
cm = commit -s
cma = commit --amend
cman = commit --amend --no-edit
d = diff
l = log
lo = log --oneline
pl = pull
ps = push
s = status
up = "!BRANCH=\"${1:-\"main\"}\"; git pull upstream $BRANCH && git push #"
[push]
autoSetupRemote = true
[core]
editor = nvim
[pull]
rebase = true