I setup a manual step to merge the branch "master" into the branch "rc".
script:
- git fetch
- git checkout rc
- git config
- git rebase master
- git push
I get "error: pathspec 'rc' did not match any file(s) known to git." but I am sure the branch is there.
I know that Pipeline only checkout the triggering branch at the beginning of a step: git clone --branch="master"
Could that prevent from accessing other branches ?
Hi @TylerAvocat
You can configure your fetch by adding this to your configuration before the fetch command
- git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
As a side note you can check what exists via
- git show-ref
Hope this helps
The full commands to do the merge are:
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" git checkout master
git merge --no-ff --no-edit develop
git push
git push --tags
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm encountering an error:
```
error: pathspec 'feature/example/auto-merge' did not match any file(s) known to git.
```
Below is my script:
- `git config --global user.email "example@example.com"`
- `git config --global user.name "example"`
- `git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"`
- `git checkout feature/example/auto-merge`
- `git merge origin/feature/example/auto-merge-stage --no-ff -m "Merged stage into dev2"`
- `git push origin feature/example/auto-merge`
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.