push current-branch to remote
git commit -m "some changes"
git pub
# pull request ...
# and merged
git purge
- GNU bash, version 4.3.48(1)-release (x86_64-alpine-linux-musl)
- git version 2.14.2
to install git-pub, clone into your bash-scripts directory, and export PATH
INSTALL_DIR=path/to/scripts/git-pub
git clone https://github.com/getto-systems/git-pub.git $INSTALL_DIR
export PATH=$INSTALL_DIR/bin:$PATH
push current-branch to remote that named 'pub'
git pub #=> git push pub <CURRENT_BRANCH>
- check current branch is fully merged into parent branch
- checkout parent branch
- delete current branch
detect base branch of current-branch
git checkout master
git checkout -b branch-A
git commit -m "some changes"
git parent # => master
fetch origin, then rebase origin/$parent
delete branches that upstream is already deleted
git fetch --prune
git wipe-widow-branch
register remote that named 'pub'
git reg-pub github:GITHUB_USER bitbucket:BITBUCKET_USER #=>
git remote add pub $URL
git-pub is licensed under the MIT license.
Copyright © since 2016 [email protected]