git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Johnny Lee" <johnnylee194@gmail.com>
To: git@vger.kernel.org
Subject: [HELP] A local branch has disappeared
Date: Mon, 19 Jan 2009 11:54:04 +0800	[thread overview]
Message-ID: <488807870901181954p558756f5v94c8a6681125e8bb@mail.gmail.com> (raw)

Hi all,

Today I found my current branch (named cupcake) has disappeared.
git@tomato:~/golf$ git branch -a
  htc_cupcake
  tmo_cupcake
  origin/HEAD
  origin/cupcake
  origin/device

As you can see, there is no "*" to mark the current branch.

But when I check the HEAD, it still pointed to the cupcake branch
git@tomato:~/golf$ cat .git/HEAD
ref: refs/heads/cupcake

But when I check the ref/heads, the cupcake is missing
git@tomato:~/golf$ ls .git/refs/heads/
htc_cupcake  tmo_cupcake

And the cupcake in still in the config:
git@tomato:~/golf$ cat .git/config
[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
        sharedRepository = 1
[remote "origin"]
        url = /home/rick/golfresort/device/.git
        fetch = +refs/heads/*:refs/remotes/origin/*
[branch "cupcake"]
        remote = origin
        merge = refs/heads/cupcake

I'm confused:
1. I didn't do any aggressive operations. Why the branch has
disappeared? Normally I have done these operation for this repo:
   i. pull from parent repo
   ii. cloned by children repo
   iii. pulled by children repo
   iv. pushed from children repo
2. Is there any way to resume the cupcake branch? Can I manually add
the cupcake to ref/heads?

Thanks very much for your considerations,
Johnny
-- 
we all have our crosses to bear

             reply	other threads:[~2009-01-19  3:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-19  3:54 Johnny Lee [this message]
2009-01-19  5:37 ` [HELP] A local branch has disappeared Neil Macneale
     [not found]   ` <488807870901182219j763995c6y1796cf3c0a98a958@mail.gmail.com>
2009-01-19  7:16     ` Johnny Lee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=488807870901181954p558756f5v94c8a6681125e8bb@mail.gmail.com \
    --to=johnnylee194@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).