git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: 2 things about branches

From
JFJ. Bruce Fields <bfields@fieldses.org>
Date
Feb 19, 2007, 18:37 UTC
Message-ID
<20070219183703.GB29930@fieldses.org>
In-Reply-To
<1171908840.10817.21.camel@localhost>
On Mon, Feb 19, 2007 at 07:13:59PM +0100, Raimund Bauer wrote:
Show 11 quoted lines
> I think it's a good idea to not list remote branches in 'git branch'
> output per default, but imho we should make an exception for the branch
> the user is currently on.
> Currently when I do 'git checkout origin/next' the checkout works fine
> and I get the warning about the remote branch, but an informational
> query 'git branch' right after that says
> 
> * (no branch)
>   master
> 
> 'git branch -r' also doesn't mark me as being on origin/next.

That's because you're not really "on" origin/next. Your currently checked-out state happens to be the same as the state that origin/next points at, but that's not quite the same thing. The main difference being that if you commit something, origin/next won't be moved forward to point at the new commit.

> Maybe we could query the remote-branches for a matching ref this case?
If that's what you want you could use e.g.
	git describe --all
--b.
Previous: Raimund Bauer
Message 2 of 2 in “2 things about branches”
  1. Raimund BauerFeb 19, 2007
  2. J. Bruce FieldsFeb 19, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.