From: Cheeray Huang <cheeray.huang@gmail.com>
To: git@vger.kernel.org
Subject: Report a bug, about track remote repository.
Date: Sun, 21 Oct 2012 02:49:57 +0800 [thread overview]
Message-ID: <5082F255.9060600@gmail.com> (raw)
Hi,
I think I found a bug, when I used local branches to track remote
branch. But I'm not very sure, can anyone double check this? I'd like
to finger this out. I think you can reproduce this bug as below steps:
precondition:
Suppose that you have a remote branch in repository, named origin/work.
And then you want to track it with a local branch.
Steps:
1. So you can do this:
git checkout -t origin/work
now, you have a local branch also named "work" to track "origin/work".
It works nicely, you can use "push/pull" command without any detail
parameters to sync anything with the remote branch.
2. Create another branch, ex. named "work2", to track "origin/work"
again, though maybe there are not so many people that will do like this.
You will find that local branch "work2" can't "push" to "origin/work".
ex. After you committed something in work2, you typed "git status", git
would tell you:
Your branch is ahead of 'origin/work' by x commit.
And then you used "git push", git can't display the information about
changing hash value in remote branch, just printed "everything is up to
date".
Actually, you can use some exact parameters to solve this, such as:
git push origin work2:work
But, I still think it is a bug.
BTW, I found this bug when I used github. I don't know whether it is
related to github.
--
B&R,
Cheeray
next reply other threads:[~2012-10-20 18:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-20 18:49 Cheeray Huang [this message]
2012-10-20 23:46 ` Report a bug, about track remote repository Philip Oakley
2012-10-21 2:44 ` Cheeray Huang
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5082F255.9060600@gmail.com \
--to=cheeray.huang@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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).