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

Re: fast forward a branch from another

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
May 12, 2011, 15:34 UTC
Message-ID
<4DCBFDE9.9060700@drmicha.warpmail.net>
In-Reply-To
<4DCBFD55.9050005@fastmail.fm>
Michael J Gruber venit, vidit, dixit 12.05.2011 17:31:
Show 21 quoted lines
> Eric Frederich venit, vidit, dixit 12.05.2011 16:40:
>> Often times I get into a situation where I have a "development" branch
>> that gets ahead of say a "stable" branch.
>> When I am ready to call the development branch stable this is what I do.
>>
>> $ git checkout stable
>> $ git merge development
>> $ git checkout development
>>
>> The problem here is that the act of going backwards (via checking out
>> stable) really messes up my IDE and or Text editors.
>> Is there any way to do this without switching branches, which modifies
>> my working directory, which messes up my IDE?
> 
> I assume this is a ff-situation, i.e. stable is fully contained in
> developement? then you can reset branch stable like this:
> 
> test 0 -eq $(git rev-list  --count ^development stable) && git branch -f
> stable development
> 
> (I thought you could git rev-list --quiet but I'm too dumb :|)

In fact, am I even too dumb to set my from address today. Sorry! Have to give "virtual identity" another try...

Michael
Previous: Michael J GruberNext: Junio C Hamano
Message 3 of 7 in “fast forward a branch from another”
  1. Eric FrederichMay 12, 2011
  2. Michael J GruberMay 12, 2011
  3. Michael J GruberMay 12, 2011
  4. Junio C HamanoMay 12, 2011
  5. Phil HordMay 12, 2011
  6. Junio C HamanoMay 12, 2011
  7. Phil HordMay 12, 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.