I want to have rebase on top of staging (or merge with staging) before I deploy to my QA server so it will contain the latest changes + changes from my branch.
As a first step I tried to checkout staging and failed: I have the following configuration in bitbucket-pipelines.yml
merge:
- step:
name: merge with staging
image: node:8
script:
- git remote update
- git fetch origin
- git branch -f staging origin/staging
- git checkout staging
error:
+ git branch -f staging origin/staging
fatal: Not a valid object name: 'origin/staging'.
I did try a lot of other variants that are work locally but everything fails... looks like bitbucket limits access to other branches..
What is the correct way of checking out branches in bitbucket pipelines?