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

Re: Two newbie question: "dead" branches and merging after cherry-pick.

From
Alex Riesen <raa.lkml@gmail.com>
Date
Jan 27, 2006, 19:47 UTC
Message-ID
<20060127194730.GB6169@steel.home>
In-Reply-To
<20060127173619.GA26199@pern.dea.icai.upcomillas.es>
Romano Giannetti, Fri, Jan 27, 2006 18:36:19 +0100:
Show 9 quoted lines
> - I use to work on a topic branch to make test, try solutions for
> bugs, etc. Say I am done with the branch "test-bill-idea". I decide
> it's a dead branch, so that I do not want to see it in day-by-day
> work (git branch, basically), but I do not want to loose it. If I
> delete the branch I will loose all its commit at the next prune,
> correct? There is a way to maintain it as a dead or hidden branch,
> shown for example just by gitk --all? If I tag the tip of the
> branch, and then delete .git/refs/head/test-bill-idea, will the
> "dead branch commits" be preserved by next prune(s)? 
Yes, it will.

You can actually move the reference file anywhere under .git/refs/, and "git prune" will never touch it and gitk will show it different color (looks grey to me). The tags are shown yellow, which can be associated with "dead for some time" already.

> - Easier: suppose I cheery-picked "abababab" from branch "testing"
> to master branch. What will happen if later I decide to merge
> all "testing" to master branch? I will have a merge conflict (trying
> to apply two times the same fix) or not? 

Yes, you probably will have to deal with a conflict (it can match the branch to be merged exactly, which is hardly a conflict).

Previous: Romano GiannettiNext: Junio C Hamano
Message 2 of 3 in “Two newbie question: "dead" branches and merging after cherry-pick.”
  1. Romano GiannettiJan 27, 2006
  2. Alex RiesenJan 27, 2006
  3. Junio C HamanoJan 27, 2006

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.