Background
I want to make sure that all commit messages on the pushed branch have a time log in it
ie. add readme /spend 5m
Problem
I want to get the commit diff between two git branches in bitbucket pipeline,
this is my yaml pipeline config:
pipelines: default: - step: script: - git log $BITBUCKET_BRANCH --oneline --not master $BITBUCKET_BRANCH is the branch the pipeline is acting on.
but the pipeline is returning an error when trying to compare with master
+ git log $BITBUCKET_BRANCH --oneline --not master fatal: ambiguous argument 'master': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]' Note that the setup step in the pipeline(this is pre-defined by bitbucket and I can't change it)
git clone --branch="abdullah-s/bitbucketpipelinesyml-created-online-wit-1489917130851" --depth 50 https://x-token-auth:[email protected]/abdullah-s/webook.git $BUILD_DIR; git reset --hard ac61f080a28428bdd885735374164577a2b0aa43; git remote set-url origin [email protected]:abdullah-s/webook.git in the first command of the setup, bitbucket is cloning only one branch from my repo
What I tried
I tried to pull master
- git checkout -b master - git pull origin master - git log $BITBUCKET_BRANCH --oneline --not master but got an error
+ git pull origin master Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.