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

Re: Re: Re: Add "clone" support to lntree

From
Petr Baudis <pasky@ucw.cz>
Date
Apr 16, 2005, 11:39 UTC
Message-ID
<20050416113955.GB14326@pasky.ji.cz>
In-Reply-To
<Pine.LNX.4.58.0504152014330.7211@ppc970.osdl.org>

Dear diary, on Sat, Apr 16, 2005 at 05:16:12AM CEST, I got a letter where Linus Torvalds <torvalds@osdl.org> told me that...

Show 13 quoted lines
> On Sat, 16 Apr 2005, Petr Baudis wrote:
> > 
> > I'm wondering, whether each tree should be fixed to a certain branch.
> 
> I'm wondering why you talk about "branches" at all.
> 
> No such thing should exist. There are no branches. There are just 
> repositories. You can track somebody elses repository, but you should 
> track it by location, not by any "branch name".
> 
> And you track it by just merging it.
> 
> Yeah, we don't have really usable merges yet, but..

First, this "level" of branches concerns multiple working directories tied to a single repository. It seems like a sensible thing to do; and you agreed with it too (IIRC). And when you do that, git-pasky just saves some work for you. For git-pasky, branch is really just a symbolic name for a commit ID, which gets updated every time you commit in some repository. Nothing more.

So the whole point of this is to have a symbolic name for some other working directory. When you want to merge, you don't need to go over to the other directory, do commit-id, cut'n'paste, and feed that to git merge. You just do

		git merge myotherbranch

Now, about remote repositories. When you pull a remote repository, that does not mean it has to be immediately merged somewhere. It is very useful to have another branch you do *not* want to merge, but you want to do diffs to it, or even check it out / export it later to some separate directory. Again, the "branch" is just a symbolic name for the head commit ID of what you pulled, and the pointer gets updated every time you pull again - that's the whole point of it.

The last concept are "tracking" working directories. If you pull the tracked branch to this directory, it also automerges it. This is useful when you have a single canonical branch for this directory, which it should always mirror. That would be the case e.g. for the gazillions of Linux users who would like to just have the latest bleeding kernel of your, and they expect to use git just like a "different CVS". Basically, they will just do

		git pull
instead of
		cvs update
:-).
-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor
Previous: Linus TorvaldsNext: Daniel Barkalow
Message 5 of 29 in “Add "clone" support to lntree”
  1. Add "clone" support to lntreeDaniel Barkalow, Apr 16, 2005
  2. Petr BaudisApr 16, 2005
  3. Petr BaudisApr 16, 2005
  4. Linus TorvaldsApr 16, 2005
  5. Petr BaudisApr 16, 2005
  6. Daniel BarkalowApr 16, 2005
  7. Petr BaudisApr 16, 2005
  8. Daniel BarkalowApr 17, 2005
  9. Petr BaudisApr 19, 2005
  10. Change "pull" to _only_ download, and "git update"=pull+merge?David A. Wheeler, Apr 19, 2005
  11. David GreavesApr 19, 2005
  12. Petr BaudisApr 19, 2005
  13. Martin SchlemmerApr 19, 2005
  14. Petr BaudisApr 19, 2005
  15. Jon SeymourApr 19, 2005
  16. Martin SchlemmerApr 19, 2005
  17. Daniel BarkalowApr 19, 2005
  18. David A. WheelerApr 19, 2005
  19. Daniel BarkalowApr 19, 2005
  20. Ingo MolnarApr 20, 2005
  21. Petr BaudisApr 20, 2005
  22. Ingo MolnarApr 20, 2005
  23. Ingo MolnarApr 20, 2005
  24. Petr BaudisApr 20, 2005
  25. David MansfieldApr 20, 2005
  26. Daniel BarkalowApr 16, 2005
  27. Petr BaudisApr 16, 2005
  28. Daniel BarkalowApr 16, 2005
  29. Petr BaudisApr 16, 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.