web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / PowerPages and DevOps ...
Power Pages
Unanswered

PowerPages and DevOps Pipeline error - [rejected] nonprod -> nonprod (non-fast-forward)

(0) ShareShare
ReportReport
Posted on by 2

I have a DevOps pipeline that deploys the PowerPages site from Dev to NonProd environment and it works fine when I run it the first time on an empty DevOps Repo with only the main branch, the Powershell script looks like this: I create a local branch (nonprod) using the Powershell script.

 

The pipeline fails on the last part of the Powershell script:

# Set global user configuration
git config --global user.email "user@company.com"
git config --global user.name "Name"
git config --global core.longpaths true

# Create a new branch
git checkout -b nonprod

# Add and commit changes
git add --all
git commit -m "solution"
git push origin nonprod

 

When I run the pipeline for the second time I get the following error:

! [rejected] nonprod -> nonprod (non-fast-forward)
error: failed to push some refs to 'https://dev.azure.com/repo-url'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
##[debug]$LASTEXITCODE: 1
##[debug]Exit code: 1
##[debug]Leaving Invoke-VstsTool.
##[error]PowerShell exited with code '1'.
 
I am not sure if I should update the script when I run the pipeline for the second  time.
 

 

Categories:
I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
rezarizvii Profile Picture

rezarizvii 64

#2
DP_Prabh Profile Picture

DP_Prabh 36

#3
oliver.rodrigues Profile Picture

oliver.rodrigues 30 Most Valuable Professional

Last 30 days Overall leaderboard