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 416097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T18:26:48+00:00 2026-05-12T18:26:48+00:00

I have a master and a beta branch. There is a situation where push

  • 0

I have a master and a beta branch. There is a situation where push is rejected:

edit2: I am on branch master.

$ git push
Counting objects: 9, done.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 669.81 KiB, done.
Total 6 (delta 2), reused 0 (delta 0)
To git@github.com:foobar/codedemo.git
   a5fc71d..64430c1  master -> master
 ! [rejected]        beta -> beta (non-fast forward)
error: failed to push some refs to 'git@github.com:foobar/codedemo.git'

Normally I would checkout beta, then pull beta and this wold probably solve it.

But because this is a production website I cannot checkout beta here. Is there a way I can pull beta without checking it out?

As this is a production site I am somehow stuck.

Edit: The code is also checked out on another location, can I do something from the other location to solve the problem here? There are no problems at the other location.

Edit3: With help of the accepted solution I could do it after some time, but I’d prefer a solution without a second client

  • 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-12T18:26:48+00:00Added an answer on May 12, 2026 at 6:26 pm

    You could push beta as some other branch, then go somewhere where you can check it out to resolve it.

    git push origin beta:beta-temp
    # on a different machine
    git fetch
    git checkout beta-temp
    git rebase origin/beta # puts your new commits on top of the upstream
    git push origin beta-temp:beta
    git push origin :beta-temp # to delete it
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have master branch of the project. Then I want to add a new
I have merged master into my bugXY branch, and needed to merge a file.
On my production server, I just have master always checked out. I do git
I did this (on my production server): $ git branch * master $ git
I have a repository where I had been working on master branch having last
I merged the beta branch into the master branch. I pushed to origin. I
I have master branch (It is working copy), then some point in time I
Step1: We have master, modify some files, commit, pull, tag, push --tags. Everything works.
I have master branch https://github.com/Fivell/PHP_PROJECT/ and recently created new branch for php 5.3 https://github.com/Fivell/PHP_PROJECT/tree/php5.3
I'm a git newbie, and this is what I currently have: master: A --

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.