Skip to content

Instantly share code, notes, and snippets.

@thekarel
Created August 31, 2020 08:27
Show Gist options
  • Save thekarel/377484e581b4731163455852ec394174 to your computer and use it in GitHub Desktop.
Save thekarel/377484e581b4731163455852ec394174 to your computer and use it in GitHub Desktop.
Validate and squash this branch
validate_and_squash_this_branch () {
BRANCH=`git branch --show-current`
yarn validate && \
git checkout master && \
git merge --squash $BRANCH && \
git commit -v -a
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment