PowerApps 解决方案的 AzureDevOp 管道遇到问题。最初能够毫无问题地将解决方案文件添加到源代码控制,然后从中创建一个开发分支以继续提交对开发分支的更改。
这是用于向源代码管理添加解决方案的代码:
echo commit all changes
git config user.email "EMAIL@EMAIL"
git config user.name "Automatic Build"
git checkout DevBranch
git add --all
git commit -m "Committing all changes"
echo push code to new repo
git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" push origin DevBranch
现在退出代码 1 失败了,我真的不明白为什么。git代码错误说:
commit all changes
error: Your local changes to the following files would be overwritten by checkout:
XXX_8cec2.meta.xml
XXX_8cec2_DocumentUri.msapp
Please commit your changes or stash them before you switch branches.
Aborting
hint: Pulling without specifying how to reconcile divergent branches is
hint: discouraged. You can squelch this message by running one of the following
hint: commands sometime before your next pull:
hint:
hint: git config pull.rebase false # merge (the default strategy)
hint: git config pull.rebase true # rebase
hint: git config pull.ff only # fast-forward only
hint:
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
You are not currently on a branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.
git pull <remote> <branch>
[detached HEAD 0425626] Updating branch code for powerapps
2 files changed, 3 insertions(+), 3 deletions(-)
push dev code to repo
! [rejected] Dev -> Dev (non-fast-forward)
error: failed to push some refs to 'https://LINK
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and integrate the remote changes
hint: (e.g. 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
##[error]Cmd.exe exited with code '1'.
##[section]Finishing: Push to Repo
非常感谢任何建议/帮助。谢谢