by user3939382 · 4y ago · 0 comments
alias mkpr='git push && gh pr create -d -f -B develop | grep https | xargs printf -- '%s/files' | xargs open'
Or "merge develop upstream changes": alias mduc='CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) && git checkout develop && git pull && git pull --tags && git checkout ${CURRENT_BRANCH} && git merge develop'
Or, "Git add and commit" -- add all changes and a commit message like "Foo bar" in one step like "$gac Foo bar" function gac ()
{
git add-commit -m "$\*"
}
Which assumes this git alias add-commit = !git add -A && git commitOften someone opens a nonreviewable WIP, or messes up something with branches, and dozens of codeowners get pinged to review a diff of something that was already merged.
Also even if initial PR is flawless, it doesn't hurt for the opener to take a deep breath and self-review it before notifying everyone.