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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:17:34+00:00 2026-06-18T09:17:34+00:00

I never used git before GitHub released the Windows app, so I’ve never used

  • 0

I never used git before GitHub released the Windows app, so I’ve never used it in command line.

So here’s my situation:
I did some commits on master, then switched branch and did some commits there too. All without pushing to GitHub.
When I then clicked sync in the the windows app (which I assume does git push), to my surprise, all my commits were pushed to my new branch – even the commits I made while I was in master.

Since this is the behavior of the windows app, I guess I have to use the command line.
What is the correct git push command to push the commits to the correct branches on the remote?

  • 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-18T09:17:35+00:00Added an answer on June 18, 2026 at 9:17 am

    To push all branches (refs under refs/heads), use the following command (where origin is your remote):

    git push origin --all
    

    You can also set push.default to matching in your config to push all branches having the same name on both ends by default. For example:

    git config --global push.default matching
    

    Since Git 2.0 the default is simple which is the the safest option.

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

Sidebar

Related Questions

Situation I've never before used git or any other version control. Now I've got
I've never used git before, but I'd like to download the android source code
I'm very new to Git and have never used any VCS before. I just
I've never used Git before and would like to learn. I have a private
Having never used awk before on Linux I am attempting to understand how it
I have never used Foxpro before. Can you convert the following Foxpro code into
I've never used JSON before so I'm not familiar with its syntax. At the
I've never used eval() before, so I assume that I just got the syntax
I've never used Java AWT before and now I've got a piece of code
Never used Game Center before in my apps. So be nice if the question

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.