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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T01:34:34+00:00 2026-05-18T01:34:34+00:00

Sorry if this question has been asked already. Am cloning from a repo named

  • 0

Sorry if this question has been asked already.

Am cloning from a repo named “git_lab” which has a branch named “test”
When cloning i use “-b myname_test” to create a local branch named “myname_test” and local clone is named “myname_git_lab”

When i do “git pull” it automatically fetches and merges changes from “test” to “myname_test”, but for git push, i need to specify the repo and branch name.

$>git remote show git_lab

Local branch configured for ‘git pull’:
myname_test merges with remote test

Is there a way where i can configure “local branch configured for ‘git push'” so that i dont need to specify the branch and repo name?

  • 1 1 Answer
  • 1 View
  • 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-18T01:34:35+00:00Added an answer on May 18, 2026 at 1:34 am

    There are two things you can do here.

    • Set push.default to tracking, so that it will push all branches to the remote branches they track, not the ones they have the same name as, then configure your branch with appropriate tracking information. (e.g. set branch.master.remote to origin and branch.master.merge to refs/heads/foo.)

    • Push manually. git push origin master:foo will push your local master branch to the branch foo on the remote origin.

    However, I’d suggest that what you really want to do is just make the branch names the same.

    (You can set config parameters either with git config, e.g. git config push.default tracking, or by directly editing the .git/config file.)

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

Sidebar

Related Questions

I'm sorry if this question has been asked already, but I couldn't find it
I am sorry, for I believe that this question has been asked already, but
I am sorry to ask this question when it has already been asked but
sorry if this question has already been answered somewhere else, but I couldn't find
Sorry if this question has been asked before but I couldn't find a good
Sorry if this question has been asked before. On my search through SO I
Sorry if this question has all ready been asked, maybe someone can point me
sorry if this question has been asked before, I searched but wasn't sure on
I'm sorry if this question has been asked before, I've tried googling/looking on here/browsing
So, if this question has been asked before, I'm sorry. I'm not exactly sure

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.