Created
July 14, 2022 12:28
-
-
Save stand-sure/ddf92b6e67ab7684e921d3dc11b937e3 to your computer and use it in GitHub Desktop.
Git porcelain repo catch-up
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 | |
# checkout-pull-prune.sh | |
branchName=$(git remote show origin | sed -n '/HEAD branch/s/.*: //p') | |
git checkout "$branchName" && \ | |
git pull && \ | |
git fetch --prune |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment