Skip to content

Instantly share code, notes, and snippets.

@jterral
Last active January 30, 2024 10:38
Show Gist options
  • Save jterral/6311e04c8a690b2cbc6ef573f4ace02f to your computer and use it in GitHub Desktop.
Save jterral/6311e04c8a690b2cbc6ef573f4ace02f to your computer and use it in GitHub Desktop.
Some git configurations
[user]
name = __MY_NAME__
email = __MY_MAIL__
[alias]
p = pull
co = checkout
cob = checkout -b
br = branch
ci = commit
st = status
ss = status --short --branch --show-stash
ls = log --oneline -n 10
fdx = clean -fdX
fdxx = clean -fdx
caa = commit -a --amend -C HEAD
uncommit = reset HEAD~1
fp = fetch --prune --verbose
clb = "!f() { (git branch -v | awk '$3 == \"[gone]\" { print $1 }' | xargs git branch -D) }; f"
mp = "!f() { \
colorHeader='\\033[1;36m' ; \
colorAction='\\033[1;32m' ; \
colorSuccess='\\033[0;34m' ; \
colorReset='\\x1b[0m' ; \
clear ; \
echo -e \"${colorHeader}====== 🚀 MEGA PULL 🚀 ======${colorReset}\" ; \
echo -e ; \
echo -e \"${colorAction}♻️ Switching to master branch...${colorReset}\" ; \
git checkout master ; \
echo -e \"\n${colorAction}📩 Pulling latest updates from repository...${colorReset}\" ; \
git pull ; \
echo -e \"\n${colorAction}🧹 Cleaning up local branches...${colorReset}\" ; \
git fetch --prune --verbose ; \
echo -e ; \
git clb ; \
echo -e \"\n${colorAction}🔎 Displaying current status...${colorReset}\" ; \
git status ; \
}; \
f"
[credential]
interactive = auto
helper = manager-core
[fetch]
prune = true
[pull]
rebase = true
[push]
autoSetupRemote = true
[diff]
tool = winmerge
[difftool]
prompt = false
[difftool "winmerge"]
cmd = \"C:\\Program Files (x86)\\WinMerge\\WinMergeU.exe\" -u -e \"$LOCAL\" \"$REMOTE\"
[merge]
tool = winmerge
[mergetool]
prompt = false
keepBackup = false
keepTemporaries = false
[mergetool "winmerge"]
cmd = \"C:\\Program Files (x86)\\WinMerge\\WinMergeU.exe\" -u -e -dl \"Local\" -dr \"Remote\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment