Skip to content

Instantly share code, notes, and snippets.

@elrayle
Created June 8, 2021 18:28
Show Gist options
  • Save elrayle/45161cc23b7a6778f49aa37e9a5a80f3 to your computer and use it in GitHub Desktop.
Save elrayle/45161cc23b7a6778f49aa37e9a5a80f3 to your computer and use it in GitHub Desktop.
Circle CI step to fail if branch name is master
- run:
name: Check for a branch named 'master'
command: |
git fetch --all --quiet --prune --prune-tags
if [[ -n "$(git branch --all --list master */master)" ]]; then
echo "A branch named 'master' was found. Please remove it."
echo "$(git branch --all --list master */master)"
fi
[[ -z "$(git branch --all --list master */master)" ]]
@elrayle
Copy link
Author

elrayle commented Jun 8, 2021

Text for PR

Title

Adds Circle CI step that fails if branch name is master

Description

Fixes _____

This PR adds the Circle CI step that fails if the branch name is master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment