Created
September 22, 2020 02:52
-
-
Save innocarpe/9e1d0eed42d18e7bec104a8fd0a44dbd to your computer and use it in GitHub Desktop.
Rebase latest base branch after pull when you working on a feature branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This runs interactive rebase with short command. | |
# It is equal to `git pull --rebase origin BRANCH_NAME` | |
# 1. Move this file to ~/.gitsh/ | |
# 2. Add directory path($YOUR_HOME_PATH/.gitsh) to environment variable file | |
# (like ~/.bash_profile or ~/.zshrc) | |
# 3. chmod 0755 git-reb | |
# 4. Use the command 'git reb BRANCH_NAME' | |
BRANCH_NAME=$1 | |
git pull --rebase origin $BRANCH_NAME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment