top | item 43260134

(no title)

mihaigalos | 1 year ago

I'm using this in my .zshrc:

  function cd { builtin cd "$@" && [ -d .git ] && git pull || true; exa -all --group-directories-first; }

  alias acp='git add -u &&-c "git log --color --pretty=format:\"%s\" --abbrev-commit -- |>/tmp/git_log_sk && git commit --gpg-sign --edit -F /tmp/git_log_sk && rm /tmp/git_log_sk" && git push -u
 origin HEAD'
The cd automatically pulls if it's a git repo. The acp is shorthand for "add+commit+push" with sk as a fuzzy finder for a commit message editing (vim integrations).

discuss

order

hk1337|1 year ago

Could that perhaps work better in .gitconfig than a shell function?

I know for me, I could not use "acp" as the alias because it would conflict with the oh-my-zsh aws plugin to load profile credentials.