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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T04:22:32+00:00 2026-06-08T04:22:32+00:00

I needed to have a local branch pulling and pushing to a remote branch

  • 0

I needed to have a local branch pulling and pushing to a remote branch of a different name. The pull is setup automatically after cloning and fetching. But the push was a little harder. I wanted this:

git push <remote> <localBranch>:<remoteBranch>

without having to worry about the local:remote every time. I’ve got all that working thanks to this blog post.

So as the blog explains, I set my global config to use the ‘upstream’ option by default. e.g:

git config --global push.default upstream

And it correctly pushes the local branch to the remote branch with just git push <remote>.

But when I do a git remote -v show <remote> on a remote with the default master branch as the upstream, I get the following:

* remote <remote>
  Fetch URL: <giturl>
  Push  URL: <giturl>
  HEAD branch: master
  Remote branch:
    master tracked
  Local branch configured for 'git pull':
    myLocalBranch merges with remote master
  Local ref configured for 'git push':
    master pushes to master (local out of date)

Why does it still report the local ‘master’ branch as the source for pushing? It even says out of date (which it is if using the local ‘master’). Except doing the git push <remote> results in Everything up-to-date so it is definetly using the myLocalBranch correctly.

Am I misunderstanding something? Is this a bug in the git remote show command? Or have I got my config into a weird state?

  • 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-08T04:22:33+00:00Added an answer on June 8, 2026 at 4:22 am

    Actually, the OP was under the false impression that the ‘git remote‘ was mentioning master as the branch to which myLocalBranch was pushing.

    This isn’t true: all that was displayed is that the local master is pushing to the remote master (probably set during the initial clone of the repo).

    The branch.myLocalBranch.merge config specific to myLocalBranch isn’t listed by the git remote.

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

Sidebar

Related Questions

We have an existing java-based heavyweight project that needed an interactive script interpreter. After
Let's pretend I have the following xaml... <UserControl.Resources> <local:ViewModel x:Name=viewModel /> <local:LoadChildrenValueConverter x:Name=valueConverter />
Do different threads accessing method foo have their own copy of local variables, or
Tracking a single remote branch as a local branch is straightforward enough. $ git
I have two machines: remote and local . I want remote to be my
I've recently encountered a problem designing a web page. I needed to have rounded
For doing builds, packaging files up, etc, it's needed to have a completely clean
I have some icons inside divs and needed to lay them out with a
I have a source code that is needed to be converted by creating classes,
I have classes that are needed in both my web service and my server.

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.