This repository was archived by the owner on Feb 24, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitconfig
More file actions
45 lines (45 loc) · 1.98 KB
/
Copy path.gitconfig
File metadata and controls
45 lines (45 loc) · 1.98 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
[init]
defaultBranch = main
[user]
name = Rignchen
email = rinchendemort@gmail.com
signingkey = ~/.ssh/id_ed25519
[alias]
# complex
get-url = !git remote get-url $(git config branch.$(git branch --show-current).remote) | sed 's/^git@github.com:/https:\\/\\/github.com\\//' | sed 's|git@ssh\\.dev\\.azure\\.com:v3/\\(.*\\)/\\(.*\\)/\\(.*\\)|https:\\/\\/dev.azure.com/\\1/\\2/_git/\\3|'
gh = !gh repo create $(basename $(pwd)) --public && git remote add origin git@github.com:Rignchen/$(basename $(pwd)) && git push -u origin main
gh-fork = !gh repo fork $(git remote get-url origin | sed 's/^git@github\\.com://' | sed 's/\\.git$//') --clone=false --fork-name=$(basename $(pwd)) && git remote rename origin upstream && git remote add origin git@github.com:Rignchen/$(basename $(pwd)).git && git push
sync = "!TEMP=$(git stash) && git pull --no-edit && git push && if [ \"$TEMP\" != \"No local changes to save\" ]; then git stash pop; fi && echo \"Synced successfully\""
zip = !"declare FILENAME; if [ -z \"$1\" ]; then FILENAME=\"$(basename $(pwd))\"; else FILENAME=\"$1\"; fi; git archive --format=zip --output \"../$FILENAME.zip\" HEAD; #"
update = !BOB=$(git branch --show-current) && git checkout $1 && git pull && git checkout $BOB && git merge --no-edit
temp = !"git add . && git stash save 'temp commit' && git checkout stash@{0}"
drop-ignored=!"TEMP=$(git stash --include-untracked) && git stash --all && git stash drop stash@{0} && if [ \"$TEMP\" != \"No local changes to save\" ]; then git stash pop; fi"
# simple
graph = log --all --graph --decorate --oneline
last = show --name-only
undo = reset HEAD~1
unstage = restore --staged
# short
a = add . --patch
new = add -N
c = commit -m
ca = commit --amend --no-edit
d = diff -w
dc = diff --compact-summary
ds = d --staged
dv = difftool -y
dvs = dv --staged
s = status -s
sh = stash
[pull]
rebase = false
[gpg]
format = ssh
[push]
autoSetupRemote = true
[diff]
tool = vimdiff
[advice]
addEmptyPathspec = false
[merge]
tool = vimdiff