aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/git/.gitconfig
diff options
context:
space:
mode:
Diffstat (limited to 'git/.gitconfig')
-rw-r--r--git/.gitconfig17
1 files changed, 11 insertions, 6 deletions
diff --git a/git/.gitconfig b/git/.gitconfig
index 4a7db61..8d32a1c 100644
--- a/git/.gitconfig
+++ b/git/.gitconfig
@@ -30,9 +30,16 @@ cmd = code --wait --diff $LOCAL $REMOTE
[trailer]
separators = ":#"
+
[trailer "fix"]
key = "Fix #"
+[filter "lfs"]
+clean = git-lfs clean -- %f
+smudge = git-lfs smudge -- %f
+process = git-lfs filter-process
+required = true
+
[alias]
# basic
st = status -s
@@ -71,17 +78,15 @@ brn = "!f() { git branch -m \"$(git rev-parse --abbrev-ref HEAD)\" $1; git fetch
squash = "!f(){ git reset --soft HEAD~${1} && git commit --edit -m\"$(git log --format=%B --reverse HEAD..HEAD@{1})\"; };f"
# grep on filename
-f = "!git ls-files | grep -i"
+ff = !git ls-files | grep -i
# remove submodule
smrm = "!f(){ git rm --cached \"$1\";rm -r \"$1\";git config -f .gitmodules --remove-section \"submodule.$1\";git config -f .git/config --remove-section \"submodule.$1\";git add .gitmodules; }; f"
+# stash staged files
+stashindex = !git stash --keep-index && git stash && git stash apply stash@{1} && git stash show -p | git apply -R && git stash drop stash@{1}
+
# generate git artifacts
ignore = "!f() { IFS=\",\"; curl -L -s \"https://www.toptal.com/developers/gitignore/api/$*\" ;}; f"
attributes = "!f() { curl -sL https://gist.githubusercontent.com/tobyvin/70f3671c76016063594ea45edbb97094/raw ;}; f"
license = "!f() { curl -sH 'Accept: application/vnd.github.v3+json' https://api.github.com/licenses/$1 | grep -oP '.*\"body\":\\s*\"\\K.*(?=\\s*\",)' | tr '\\n' '\\0' | xargs -0 printf '%b\\n' | sed \"s/\\[year\\]/$(date +'%Y')/\" | sed \"s/\\[fullname\\]/$(git config --get user.name)/\"; }; f"
-[filter "lfs"]
- clean = git-lfs clean -- %f
- smudge = git-lfs smudge -- %f
- process = git-lfs filter-process
- required = true