diff --git a/dot_config/git/config.tmpl b/dot_config/git/config.tmpl index 5aff88fedcd500cefe4a552ed773593ac4c73220..23126935070ddf1124c29cd35ddbe5ed3eb5d4a6 100644 --- a/dot_config/git/config.tmpl +++ b/dot_config/git/config.tmpl @@ -1,11 +1,26 @@ [init] defaultBranch = main [alias] - force-push = push --force-with-lease + fp = push --force-with-lease dl = -c diff.external=difft log -p --ext-diff ds = -c diff.external=difft show --ext-diff df = -c diff.external=difft diff patch = push rad HEAD:refs/patches + lazy = !lazygit + us = 'reset HEAD --' + sg = stage + ci = commit + co = checkout + wt = worktree + rb = rebase + br = branch + st = status + ps = push + pl = pull + bugs = bug bug + create-bug = bug bug new + push-bugs = !git-bug-push + pull-bugs = !git-bug-pull [user] name = Amolith email = amolith@secluded.site diff --git a/dot_config/private_fish/config.fish.tmpl b/dot_config/private_fish/config.fish.tmpl index 4d4fa9891e2c560b21a9305048990457c55e90e7..4166bb60b351ba8c6fdbe49f69412384befb7a34 100644 --- a/dot_config/private_fish/config.fish.tmpl +++ b/dot_config/private_fish/config.fish.tmpl @@ -134,18 +134,7 @@ if status is-interactive alias ls="lsd" alias loghtml="llm logs -ceu | mdas -h | grep '\.html\$' | read path_to_response && xdg-open \"LLM Responses/\$path_to_response\" && echo \"Opened \$path_to_response\"" alias soft="ssh git.secluded.site" - - # git aliases - alias lg="lazygit" - alias gc="git commit" - alias ga="git add" - alias gb="git branch" - alias gw="git worktree" - alias gr="git rebase" - alias gbb="git bug" - alias gps="git push" - alias gpl="git pull" - alias gfp="git force-push" + alias g="git" scheme set tomorrow starship init fish | source diff --git a/dot_config/private_fish/functions/git-bug-pull.fish b/dot_config/private_fish/functions/git-bug-pull.fish new file mode 100644 index 0000000000000000000000000000000000000000..10e8fe426da9fd95cabee12c5f9c758ba4675d26 --- /dev/null +++ b/dot_config/private_fish/functions/git-bug-pull.fish @@ -0,0 +1,8 @@ +function git-bug-pull + set -l remote (test -n "$argv[1]"; and echo $argv[1]; or git rev-parse --abbrev-ref --symbolic-full-name @{u} | cut -d'/' -f1) + echo "fetching bugs from '$remote' remote..." >&2 + git fetch $remote "refs/bugs/*:refs/bugs/*" "refs/identities/*:refs/identities/*" + + set git_dir (git rev-parse --git-dir) + test -d $git_dir/git-bug/cache/; and rm -rf $git_dir/git-bug/cache/ +end diff --git a/dot_config/private_fish/functions/git-bug-push.fish b/dot_config/private_fish/functions/git-bug-push.fish new file mode 100644 index 0000000000000000000000000000000000000000..ef6881a1577cf31b4eccbd71bc4a7e940aa25b03 --- /dev/null +++ b/dot_config/private_fish/functions/git-bug-push.fish @@ -0,0 +1,6 @@ +function git-bug-push + set -l remote (test -n "$argv[1]"; and echo $argv[1]; or git rev-parse --abbrev-ref --symbolic-full-name @{u} | cut -d'/' -f1) + + echo "pushing bugs to '$remote' remote..." >&2 + git push $remote --prune "refs/bugs/*" "refs/identities/*" +end