Skip to content

Instantly share code, notes, and snippets.

@innocarpe
Last active September 8, 2022 07:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save innocarpe/b65e7f3186efe9c85b06313a33bea77d to your computer and use it in GitHub Desktop.
Save innocarpe/b65e7f3186efe9c85b06313a33bea77d to your computer and use it in GitHub Desktop.
git-fp -
#!/bin/bash
# It is equal to `git fetch -p & git pull 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)
# (This would be like 'export PATH=${PATH}:/Users/YOUR_HOME_PATH/.gitsh')
# 3. chmod 0755 git-fp
# 4. Use the command 'git fp BRANCH_NAME'
BRANCH_NAME=$1
git fetch -p & git pull origin $BRANCH_NAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment