Last active
June 14, 2024 15:54
-
-
Save krmckone/638e1bf8cdd195f8cb96896fdc85b476 to your computer and use it in GitHub Desktop.
Updates current branch from main and pushes
This file contains 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
git fetch --prune | |
this_branch=$(git rev-parse --abbrev-ref HEAD) | |
git checkout main && git pull origin main && git checkout $this_branch && git pull origin main && git push | |
unset this_branch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment