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

  • SEARCH
  • Home
  • 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 7158739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:06:58+00:00 2026-05-28T13:06:58+00:00

My current branch is my_branch . Trying to push the changes to the remote

  • 0

My current branch is my_branch. Trying to push the changes to the remote repo I get:

$ git push
Counting objects: 544, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (465/465), done.
Writing objects: 100% (533/533), 2.04 MiB | 1.16 MiB/s, done.
Total 533 (delta 407), reused 0 (delta 0)
To git@......git
   4ed90a6..52673f3  my_branch -> my_branch
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'git@......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.

Trying to git pull results in:

$ git pull
Already up-to-date.

Why I get this error?
How could I resolve this problem and perform git push successfully?

  • 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-28T13:06:59+00:00Added an answer on May 28, 2026 at 1:06 pm

    My current branch is my_branch.

    That is your problem. When you pull, Git is telling you that your branch my_branch is up to date, not master, which is behind origin/master making a fast-forward merge impossible.

    In order to push master, you need to check out master and pull. This will merge in the changes waiting on origin/master and allow you to push your own changes.

    git checkout master
    git pull
    # resolve conflicts, if any
    git push
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to get my shell prompt to display the current git branch
In my current repo I have the following output: $ git branch -a *
Possible Duplicate: git push error '[remote rejected] master -> master (branch is currently checked
I use the following command to push to my remote branch: git push origin
Possible Duplicate: Git push error '[remote rejected] master -> master (branch is currently checked
I periodically get message from git that look like this: Your branch is behind
I've been making some vast changes on the master branch of my Git repository.
I have a local branch tracking the remote/master branch. After running git-pull and git-log
How can I do the following in Git? My current branch is branch1 and
Possible Duplicate: Show just the current branch in Git I am moving my monotone

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.