Last active
February 25, 2023 20:34
-
-
Save Bodix/bcc4829bd57e538f782905bb8c37890c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
email = bodix321@gmail.com | |
name = Bodix | |
[includeIf "gitdir/i:Work/"] | |
path = ~/.work.gitconfig | |
[credential] | |
helper = store | |
[merge] | |
tool = vscode | |
[mergetool "vscode"] | |
cmd = code --wait $MERGED | |
[diff] | |
tool = vscode | |
[difftool "vscode"] | |
cmd = code --wait --diff $LOCAL $REMOTE | |
[alias] | |
s = status --short --branch | |
a = add . | |
c = commit --message | |
r = reset | |
d = diff | |
b = branch | |
ba = branch --all | |
p = push | |
pl = pull | |
co = checkout | |
cb = checkout -B | |
cp = cherry-pick | |
sm = submodule | |
pr = remote prune origin | |
pu = !git push -u origin `git branch --show-current` | |
pf = push --force-with-lease --verbose | |
rb = "!f() { git rebase --interactive HEAD~$1; }; f" | |
rh = "!f() { git reset --hard HEAD~$1; }; f" | |
amend = commit --amend --no-edit | |
rename = commit --amend --message | |
l = log --color --graph --date=format:'%d.%m.%y %a %H:%M' --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %C(bold blue)<%an>%Creset %Cgreen%cd (%cr)' --abbrev-commit | |
new = !git init && git commit --allow-empty --message 'Initial commit' | |
cl = !git clean -d --force && git reset --hard | |
dev = !git checkout develop && git pull origin develop | |
master = !git checkout master && git pull origin master | |
name = config --local user.name | |
email = config --local user.email | |
user = config --local credential.username | |
ignore-unity = "!f() { url="https://gist.githubusercontent.com/Bodix/debb9ddda3b31e7a66cdb5edf99995c6/raw" ; curl --output /dev/null --silent --head --fail "$url" ; if [ $? -eq 0 ]; then curl "$url" >> .gitignore && echo "Appended .gitignore with $url" ; else echo "$url doesnt exist." ; fi ; }; f" | |
save = "!f() { git add .; git commit --message \"$*\"; git push; }; f" | |
auto-commit = "!f() { git commit --all --message \"$(echo $@)\"; }; f" "$([ -z \"$(git status --porcelain | grep '^A' | cut -c4-)\" ] || git status --porcelain | grep '^A' | cut -c4- | awk 'BEGIN{print \"Add\"} {printf index($0, \"\\\"\")!=0?\"%s%s\":\"%s\\\"%s\\\"\", (NR>1?\", \":\"\"), gensub(\".md\", \"\", \"g\")} END{print \"\"}')" "$([ -z \"$(git status --porcelain | grep '^C' | cut -c4-)\" ] || git status --porcelain | grep '^C' | cut -c4- | awk 'BEGIN{print \"Copy\"} {printf index($0, \"\\\"\")!=0?\"%s%s\":\"%s\\\"%s\\\"\", (NR>1?\", \":\"\"), gensub(\".md\", \"\", \"g\")} END{print \"\"}')" "$([ -z \"$(git status --porcelain | grep '^D' | cut -c4-)\" ] || git status --porcelain | grep '^D' | cut -c4- | awk 'BEGIN{print \"Delete\"} {printf index($0, \"\\\"\")!=0?\"%s%s\":\"%s\\\"%s\\\"\", (NR>1?\", \":\"\"), gensub(\".md\", \"\", \"g\")} END{print \"\"}')" "$([ -z \"$(git status --porcelain | grep '^M' | cut -c4-)\" ] || git status --porcelain | grep '^M' | cut -c4- | awk 'BEGIN{print \"Modify\"} {printf index($0, \"\\\"\")!=0?\"%s%s\":\"%s\\\"%s\\\"\", (NR>1?\", \":\"\"), gensub(\".md\", \"\", \"g\")} END{print \"\"}')" "$([ -z \"$(git status --porcelain | grep '^R' | cut -c4-)\" ] || git status --porcelain | grep '^R' | cut -c4- | awk 'BEGIN{print \"Rename\"} {printf index($0, \"\\\"\")!=0?\"%s%s\":\"%s\\\"%s\\\"\", (NR>1?\", \":\"\"), gensub(\".md\", \"\", \"g\")} END{print \"\"}')"; | |
[http] | |
# https://stackoverflow.com/questions/6842687/the-remote-end-hung-up-unexpectedly-while-git-cloning | |
postBuffer = 524288000 | |
[core] | |
# https://stackoverflow.com/questions/22575662/filename-too-long-in-git-for-windows | |
longpaths = true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment