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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:46:23+00:00 2026-05-24T23:46:23+00:00

I have a local repository cloned from a remote one. When I do: git

  • 0

I have a local repository cloned from a remote one. When I do:

git branch -a

I get:

* add-real-testcases
  couchdb_1.1.0
  master
  remotes/origin/HEAD -> origin/master
  remotes/origin/couchdb_1.1.0

Now, I think this is not correct. I was expecting something like:

  couchdb_1.1.0 -> origin/couchdb_1.1.0

Since my couchdb_1.1.0 branch is tracking a remote branch (I just pushed to it, without extra info). So I go and I check my .git/config:

[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
[remote "origin"]
        fetch = +refs/heads/*:refs/remotes/origin/*
        url = git@myhost.com:my_repo.git
[branch "master"]
        remote = origin
        merge = refs/heads/master
[branch "couchdb_1.1.0"]
        remote = origin
        merge = refs/heads/couchdb_1.1.0

The tracking info is there, as I expected. But git branch -a is not showing it.

I got to this situation probably because I have been creating and deleting local and remote branches. So I try to solve this reporting issue by setting the upstream manually (even though it is already set in the config, but anyway …)

$ git branch couchdb_1.1.0 --set-upstream origin/couchdb_1.1.0
Branch couchdb_1.1.0 set up to track remote branch couchdb_1.1.0 from origin.

But git branch -a is still not showing it.

I though git branch was getting the info from .git/config, but somehow it is not. Or maybe I am confused about what the -> syntax in git branch -a means?

  • 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-24T23:46:24+00:00Added an answer on May 24, 2026 at 11:46 pm

    You are misinterpreting the output of git branch -a. git branch is not showing you information about which remote branches your local branches are tracking you it is just showing you which branches are “symbolic refs” to other branches.

    In this case origin’s HEAD is a symbolic ref to master on origin. This is just telling you that the default (or for non-bare repositories the checked-out) branch on origin is master.

    Try git branch -vv to see the tracking relationships of your local branches.

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

Sidebar

Related Questions

I have a local repository cloned from a bare remote repository. The following command
I have a Git repository on my local machine that I cloned from my
I have a local git repository which tracks a remote SVN repository via git
I have setup hudson to check out from my remote git repository but i
I have a local repository and I want to get the latest changes from
I have a local git repository created with git svn clone . I make
I have a local repository I'm working on and its remote is hosted on
I have a local Git repository I've been developing under for a few days:
Since version 1.5 Subversion supports to have a local caching-proxy for the main Master-repository.
I have repository on GitHub to which I commit regularly from my local computer.

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.