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

Re: git branch

From
MKMarcus Karlsson <mk@acc.umu.se>
Date
May 23, 2011, 11:46 UTC
Message-ID
<20110523114633.GE7387@kennedy.acc.umu.se>
In-Reply-To
<BANLkTinzped82Njnw4ZUeHY6Qu4R4hKK-w@mail.gmail.com>
On Mon, May 23, 2011 at 01:36:09PM +0200, Gergely Buday wrote:
Show 17 quoted lines
> Hi there,
> 
> I created
> 
> git branch install_2.0
> 
> for my install script. Then pushed to
> 
> git push origin install_2.0
> 
> so that github stores by branch
> 
> after another commit I tried to push again but git told me that I'm
> not on that branch. Why git loses the state that I'm on a branch? What
> should I do to have my expected behaviour?
> 
> - Gergely

I'm not sure if I'm following you correctly, but with Git you need to check out your branch after creating it. Run git checkout install_2.0 after you have created it.

	Marcus
Previous: Gergely BudayNext: Gergely Buday
Message 2 of 4 in “git branch”
  1. Gergely BudayMay 23, 2011
  2. Marcus KarlssonMay 23, 2011
  3. Gergely BudayMay 23, 2011
  4. Tim MazidMay 23, 2011

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.