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

Project- vs. Package-Level Branching in Git

From
THThomas Hauk <tom@shaggyfrog.com>
Date
Jan 27, 2011, 19:38 UTC
Message-ID
<14F4737F-E8E4-4E4E-A625-16CA63CF9EFF@shaggyfrog.com>
Back when I worked at a large games company, we used Perforce, and our repo structure looked a little something like this:
/branches
	/alpha
	/beta
/mainline
	/packages
		/external
			/foolib
				/1.0
				/1.1
				/2.0
		/internal
			/barlib
				/dev
				/1.0
				/2.0
			/bazlib
				/2.34
				/2.35
			/qux
				/dev
At the package level, we would split up packages/libraries into two groups based on if they were developed at the company or not (external/internal), and inside each one, we might have multiple versions. In the example above, the repo is for the "qux" game, which uses an internal "bazlib" library developed by another group, and the "barlib" library which was developed for use on "qux" and may be used simultaneously on other projects.
Project-level branches took mainline as a base and branched into the /branches directory. Package-level branches would usually take the "dev" version (which represented the current development version, akin to "master" in Git) as a base and branch into the same parent directory but with an actual version name.
I've successfully used this repo structure with several other projects over the years at other companies (who were mostly using Subversion). Now I'm trying to get into the Git swing of things, but it seems to be that Git only offers project-level branching, and doesn't allow for the kind of package-level branching I'm describing here.
Am I incorrect or is there a way to accomplish with Git what I was doing before with P4 and SVN?

-- Thomas Hauk Shaggy Frog Software www.shaggyfrog.com

Next: Andreas Ericsson
Message 1 of 16 in “Project- vs. Package-Level Branching in Git”
  1. Thomas HaukJan 27, 2011
  2. Andreas EricssonJan 27, 2011
  3. Ævar Arnfjörð BjarmasonJan 27, 2011
  4. Thomas HaukJan 27, 2011
  5. Jay SoffianJan 28, 2011
  6. Jakub NarebskiJan 28, 2011
  7. Enrico WeigeltJan 29, 2011
  8. David AguilarJan 29, 2011
  9. Enrico WeigeltJan 30, 2011
  10. Jakub NarebskiJan 31, 2011
  11. Enrico WeigeltJan 31, 2011
  12. Marc BranchaudJan 28, 2011
  13. in-gitvger@baka.orgJan 28, 2011
  14. Eugene SajineJan 28, 2011
  15. Enrico WeigeltJan 29, 2011
  16. Enrico WeigeltJan 29, 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.