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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T00:06:56+00:00 2026-06-15T00:06:56+00:00

I am starting with Git, so I feel that this question could be the

  • 0

I am starting with Git, so I feel that this question could be the newbiest question of day because this task is so simple, but it’s causing a terrible headache..

I have 2 local branches:

  • master
  • local/production

And 2 remotes:

  • master
  • production

I need to pass local changes to production. So, my workflow was:

git checkout local/production
git merge master
git commit
git push

git merge:
Seems Work fine, it detected all differences.

git commit:

On branch local/production

Your branch is ahead of ‘origin/production’ by 2 commits.

nothing to commit (working directory clean)

And git push:

Everything up-to-date

So that’s all, I couldn’t push my changes to remote repository.

  • 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-15T00:06:57+00:00Added an answer on June 15, 2026 at 12:06 am

    Root cause: To cut the explanation short, it appears to me that your local/production is not tracking origin/production. You can check this with git branch -avv.

    About git push: Note that git push without arguments will update all the remote branches that have updated in your local tracking branches (from the git-push(1) manual page):

    git push ...  [<repository> [<refspec>...]]
    
    The special refspec : (or +: to allow non-fast-forward updates) directs git to
    push "matching" branches: for every branch that exists on the local side, the
    remote side is updated if a branch of the same name already exists on the remote
    side. This is the default operation mode if no explicit refspec is found (that is
    neither on the command line nor in any Push line of the corresponding remotes
    file---see below).
    

    Because the result of simple git push is sometimes little unexpected if forgotten what changes done in local branches, I personally like to explicitly specify which branches I want to push. In your case it seems this is what you want to do:

    git push origin local/production:production
    

    If you want local/production to track origin/production, you can make the local/production tracking branch for origin/production using option -u:

    git push -u origin local/production:production
    

    (only required once). Then you can pull from origin to local/production.

    Executive Summary: you need to understand the concept of tracking branch and the peculiar semantics of git push.

    P.S. I am wondering about your choice of your branch name local/production here. Why not just production? I am suspecting you already have production tracking origin/production and maybe use local/production for you local development. In this case a reasonable work flow is like this:

    1. git pull origin production:production to pull the changes to your production
    2. If there are new commits in production, that is local/production is behind then either rebase your local/production on production (or merge production on local/production)
    3. the moment you want to push your changes, merge or cherry-pick your commits to production and push the changes with git push origin production:production.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm starting to understand git but I'm still having some trouble with the abstraction.
Any advice on Git repository organization for starting a new project on JRuby that
I am trying to use p4merge with git but I am getting: Error starting
First of all, I should say that I'm starting to learn git so that
I've got a question regarding git branching protocol. I'm starting to get more familiar
I followed this post to setup a remote git repo. Instead of starting from
I think my question is somewhat similar to CaptainPicard's but dissimilar enough that I
I'm just starting to use git for my thesis and my question is what
I'm just starting to use git-deploy instead of capistrano, the problem is though that
Working SVN repo I'm starting a git repo to interact with a svn repo.

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.