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

Notifications

Announcements

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Pages

#1
Jerry-IN Profile Picture

Jerry-IN 71

#2
Fubar Profile Picture

Fubar 62 Super User 2025 Season 2

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard