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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:16:58+00:00 2026-05-27T06:16:58+00:00

I have local git repository on my pc with 2 branches, let’s say branch1

  • 0

I have local git repository on my pc with 2 branches, let’s say
branch1
branch2

I have a remote github repo setup.
So far I’ve been working with only branch1. Now I have switched to branch 2 and have been working with it for a couple of days. I have no problem doing

git push origin master

and I receive

Enter passphrase for key '/c/Users/elijah/.ssh/id_rsa':
Counting objects: 39, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (21/21), done.
Writing objects: 100% (25/25), 2.44 KiB, done.
Total 25 (delta 7), reused 0 (delta 0)
To git@github.com:los123/Apptwit.git
   5e6004f..7572482  master -> master

So things look pretty normal, it’s just when I go to my github repo I:

  1. see only master branch there

  2. I don’t see the last commit I did from branch2 (even though it was successful)

Can anybody clarify what is going on? (is it by design that I can only synch one branch with github?)
Thanks you.

  • 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-05-27T06:16:58+00:00Added an answer on May 27, 2026 at 6:16 am

    git push -u origin branch2

    (The -u sets branch2 to track github’s version of branch2, like your master probably tracks github’s master. Affects things like git status showing “you are ahead by N commits”)

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

Sidebar

Related Questions

I have a a remote git repo and a local clone. Let's say I
I have 2 branches: master and branch1 both in local and remote repository. Now
I have a local git repository which tracks a remote SVN repository via git
I have a remote tracking branch tracked locally in my local repository using 'git
I have merged two branches in a local Git repository, with a bunch of
I have a local Git repository I've been developing under for a few days:
I have a local git repository created with git svn clone . I make
I have two git repositories: report.git (Master on remote location) cloned.git (Local) I lost
I have a local repository cloned from a bare remote repository. The following command
If I have a public Git repository that contains 3 branches like the following:

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.