Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7087169
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:38:26+00:00 2026-05-28T07:38:26+00:00

I was using the following procedure for a while: git fetch origin master git

  • 0

I was using the following procedure for a while:

git fetch origin master  
git merge origin/master  
git push --dry-run origin master  
git push origin master

Now this has stopped working and produces this error

To git@example.com:company/project/admin.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'git@example.com:company/project/admin.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again.  See the
'Note about fast-forwards' section of 'git push --help' for details.

and now only git pull works and not fetch and merge.

Why would this happen? It is also happening to other developers.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T07:38:27+00:00Added an answer on May 28, 2026 at 7:38 am

    I think the problem here is that you’re doing:

    git fetch origin master
    

    … which updates FETCH_HEAD with master from origin, but doesn’t update the remote-tracking branch origin/master.

    You probably want to do:

    git fetch origin
    

    … instead, which will update all remote-tracking branches from origin, including origin/master.

    This is explained in the documentation for git fetch, but I think it’s fair to say that this is confusing for a lot of people…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This one has bugged me for a while now. Recently when revisiting some code
I am using following storedprocedure set ANSI_NULLS ON set QUOTED_IDENTIFIER ON GO Alter PROCEDURE
I'm using FastReport 4.7.31 in Turbo Delphi Pro. The following procedure processes the data
I want to execute the following query using Subsonic: SELECT MAX([restore_date]) FROM [msdb].[dbo].[restorehistory] While
What purpose does using serve when used the following way:- ONE EXAMPLE IS THIS,
I've been having this issue for a while now and was never really able
Iam using the following stored procedure for select all child units of the given
I haven't solved this issue by using the stored procedure, yet we've decided to
I've got the following in one of my Oracle procedures, I'm using it to
I am using following PHP code to connect to MS Access database: $odb_conn =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.