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

Re: unseeking?

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Apr 24, 2005, 22:10 UTC
Message-ID
<Pine.LNX.4.21.0504241742070.30848-100000@iabervon.org>
In-Reply-To
<20050424213841.GD11094@tumblerings.org>
On Sun, 24 Apr 2005, Zack Brown wrote:
Show 10 quoted lines
> On Sun, Apr 24, 2005 at 02:47:30PM -0400, Daniel Barkalow wrote:
> 
> So why not just do 'git init URL' to get the upstream sources, make your
> edits, do 'git pull' to track the upstream sources every once in
> awhile, and do 'git diff' when you're ready to send your changes to the
> upstream maintainer.
> 
> I think I've understood your explanation of what's actually happening,
> but I still don't see its significance. What do you get from a fork that
> you don't get from a regular old init and pull?

Primarily, the ability to inspect and build the mainline tree. If you want to take a look at what's going on in the mainline without getting it again or messing with your working directory or local commits, you can do that.

Also, if you're doing two independant sets of edits, you can share the downloads for updates between them. Say I'm working on an ambitious project to do block-move cross-file merges in git. I've got a fork that I'm working on that in. After I've done a bunch of work there, I notice a bug report about some of my other code in the project. I fork off another branch from the mainline to fix it in, so that I can ignore the fact that I'm a dozen commits into this other thing, fix the bug, and ship off the changes.

With fork, I save having to download the contents of the remote repository again, because the object storage is shared. Also, I can merge my bug fixes into my long-term work without waiting for them to show up in the mainline (although that makes the later merge potentially trickier) or, in general, needing to transfer them between repositories.

The other main thing is the way that I actually split up patches. I have a fork of the mainline. I make a second fork of the mainline. I diff "second:first" to get the changes I need to split up, apply some of them, commit, and then repeat. In order to diff "second:first", both have to be stored in the same repository (because, otherwise, git won't be able to find one or the other commit to look at). In the first iteration, when second is mainline, it doesn't matter, but in later iterations I want to get fewer and fewer changes to include or postpone, which requires using commits from the splitting process.

	-Daniel
*This .sig left intentionally blank*
Previous: Zack BrownNext: Zack Brown
Message 8 of 15 in “unseeking?”
  1. Zack BrownApr 24, 2005
  2. Petr BaudisApr 24, 2005
  3. Zack BrownApr 24, 2005
  4. Daniel BarkalowApr 24, 2005
  5. Zack BrownApr 24, 2005
  6. Daniel BarkalowApr 24, 2005
  7. Zack BrownApr 24, 2005
  8. Daniel BarkalowApr 24, 2005
  9. Zack BrownApr 25, 2005
  10. Daniel BarkalowApr 25, 2005
  11. Zack BrownApr 25, 2005
  12. Petr BaudisApr 26, 2005
  13. Zack BrownApr 26, 2005
  14. Petr BaudisApr 26, 2005
  15. Rename tracking, revisited (was: unseeking?)Kevin Smith, Apr 24, 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.