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

Using local trees and cogito

From
Jon Smirl <jonsmirl@gmail.com>
Date
Jun 16, 2005, 02:37 UTC
Message-ID
<9e473391050615193719d81951@mail.gmail.com>

I took Jeff Garzik's scripts for managing multiple trees and reworked them a little for cogito. I changed the names to something that makes more sense to me, but what does everyone think? Or can cogito already do this I just can't figure it out?

In my terminology forks are different tree heads in the same git tree (local branches).

cg-fork fname -- make a new tree head from the current tree and switch to it. cg-goto fname -- switch the current working tree to one of the forks. cg-goto -- display the name of the current fork cg-goto -l -- display the name of all forks cg-diff fname -- diff the current working tree to a fork cg-merge fname -- merge another fork into the current fork

I fixed goto to not jump if there are pending changes. Is there a better way to do this?

Is fork a good name since branches refer to other git trees? I'm somewhat confused about exactly what a branch consists of, it looks to me like the path to another external tree.

I do find Jeff's work very useful since it allows me to keep twenty patches in a single tree and jump between them. This is better than bk where I had to keep multiple entire trees with a build in each of them. This way I only rebuild the files that changed after a jump.

One problem I did notice is that if you add file in a fork and jump to a fork without the file, it doesn't get removed. That's not a big problem but it can be confusing.

-- 
Jon Smirl
jonsmirl@gmail.com
Next: Jan Harkes
Message 1 of 3 in “Using local trees and cogito”
  1. Jon SmirlJun 16, 2005
  2. Jan HarkesJun 16, 2005
  3. Matthias UrlichsJun 17, 2005

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.