.gitconfig:
[alias]
add-commit = !git add -A && git commit
.bash_profile: function save ()
{
git add-commit -m "$*" && git push
}
Use like: $ save This is a commit message
This adds changed files to a commit with this message and pushes it to remote.Also:
alias mkpr='git push && gh pr create -d -f -B develop | grep https | xargs printf -- '%s/files' | xargs open'
Open a PR from current branch based on develop and open it in GitHub in my browser.Merge upstream changes from develop:
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'
I have a few more, whereby I skip most of the ceremony with git. Works for me.