By default, for PR builds, this should be done BEFORE parsing .circleci/config.ymlgit checkout $CIRCLE_PR_TARGET_BRANCHgit merge $CIRCLE_BRANCHThere should be an option to opt out of this on a per repo basis. Travis CI does this by default: their docs:Rather than build the commits that have been pushed to the branch the pull request is from, we build the merge between the source branch and the upstream branch.related: