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

Re: Why can't git open empty branches ?

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Apr 11, 2012, 12:19 UTC
Message-ID
<20120411121907.GA30340@burratino>
In-Reply-To
<4F856F67.4000609@danisch.de>
Hadmut Danisch wrote:
Show 7 quoted lines
> Creating independent branches by pushing two separates into a single
> remote bare is a nice idea, but if I understood git correctly, the very
> first commit in a repos is always to the master branch, where you have
> two masters trying to push into the shared remote bare. This is
> obviously solvable if you use the correct commands and maybe delete and
> re-clone the repos, but this is all overcomplicated and non-trivial.
> Nothing I could do without reading manuals.

I suppose you had to read the manual to learn the "git commit" and "git branch -m" commands, yes. But what's wrong with that, or how could we fix it?

	git init code
	cd code
	... hack away ...
	git remote add origin <url>
	git push -u origin master
	cd ..
	git init website
	cd website
	... hack away ...
	git branch -m website
	git remote add origin <url>
	git push -u origin website
	cd ..

I wonder if there is a potential documentation or error message update lurking behind these questions.

Hope that helps, Jonathan

Previous: Hadmut DanischNext: Matthieu Moy
Message 6 of 8 in “Why can't git open empty branches ?”
  1. Hadmut DanischApr 11, 2012
  2. Jonathan NiederApr 11, 2012
  3. Hadmut DanischApr 11, 2012
  4. Matthieu MoyApr 11, 2012
  5. Hadmut DanischApr 11, 2012
  6. Jonathan NiederApr 11, 2012
  7. Matthieu MoyApr 11, 2012
  8. Holger HellmuthApr 11, 2012

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.