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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:39:36+00:00 2026-06-17T05:39:36+00:00

Github is the default repository for my project (just origin renamed to github). Something

  • 0

Github is the default repository for my project (just “origin” renamed to “github”). Something has happened so that “git push” causes a “non-fast-forward updates” error, even though “git push github master” works. “git pull” and “git pull github master” both indicate an up-to-date status. How can I (a) be sure there are no unmerged changes on Github and (b) correct the non-fast-forward error?

$ git status
# On branch master
nothing to commit (working directory clean)
$ git pull
Already up-to-date.
$ git pull github master
From github.com:MikeBlyth/mission_net
 * branch            master     -> FETCH_HEAD
Already up-to-date.
$ git push github master
Everything up-to-date
$ git push
To git@github.com:MikeBlyth/mission_net.git
 ! [rejected]        add_command -> add_command (non-fast-forward)
error: failed to push some refs to 'git@github.com:MikeBlyth/mission_net.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.

My git config file is

[core]
  repositoryformatversion = 0
  filemode = true
  bare = false
  logallrefupdates = true
[remote "github"]
  url = git@github.com:MikeBlyth/mission_net.git
  fetch = +refs/heads/*:refs/remotes/github/*
[branch "master"]
  remote = github
  merge = refs/heads/master
[remote "heroku"]
  url = git@heroku.com:joslink.git
  fetch = +refs/heads/*:refs/remotes/heroku/*
  merge = refs/heads/master
[remote "heroku"]
url = git@heroku.com:joslink.git
fetch = +refs/heads/*:refs/remotes/heroku/*
  • 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-06-17T05:39:37+00:00Added an answer on June 17, 2026 at 5:39 am

    The syntax of ‘git push’ supports both an explicit and a shorthand version.
    The explicit version git push github master works for you. The shorthand version git push does not.

    If you use the shorthand version you do not tell git what remote to use and what local branch shall be pushed to what remote branch. Hence git has to guess what you mean.

    You can configure this with the setup of your remote and the push.default config:

       push.default
           Defines the action git push should take if no refspec is given on
           the command line, no refspec is configured in the remote, and no
           refspec is implied by any of the options given on the command line.
           Possible values are:
    
           ·    nothing - do not push anything.
    
           ·    matching - push all matching branches. All branches having the
               same name in both ends are considered to be matching. This is
               the default.
    
           ·    upstream - push the current branch to its upstream branch.
    
           ·    tracking - deprecated synonym for upstream.
    
           ·    current - push the current branch to a branch of the same
               name.
    

    Have a look at git branch -vv to check what branch is tracked by your current branch. Then check git config --get push.default to verify it is doing what you expect.

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

Sidebar

Related Questions

Github has the following recommendation for global git configuration ~/.gitconfig : [alias] # Is
Why isn't UTF-8 the default encoding for GitHub? Does that mean that there are
I'm trying to fetch a read-only git repository from github and have it be
If I do this: pip install -e git://github.com/nimbis/django.git#egg=Django-dev Then pip will grab the default
I just installed Hg-Git and I was wondering if it is possible to push
Developer A - Local Repository --> pulls/push ---> github Developer B - Local Repository
I have a public repository on github that I'm having trouble handling pull requests
I'm developing a custom contacts app. I read default Contacts app source from Github
github url I am using a simple search that displays search results: @adds =
On github, I forked an old version of another project. I made some changes

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.