git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Orphan branch not well-defined?
@ 2023-11-22  0:28 Craig H Maynard
  2023-11-22  1:08 ` Junio C Hamano
  2023-11-22  1:42 ` Chris Torek
  0 siblings, 2 replies; 7+ messages in thread
From: Craig H Maynard @ 2023-11-22  0:28 UTC (permalink / raw)
  To: Git Community

Team,

Recently I tried creating an orphan branch in an existing repo using git-checkout and git-switch. 

Both commands have an --orphan option.

The results were different:

git checkout --orphan <newbranch> retained the entire working tree, including subdirectories and their contents.

git switch --orphan <newbranch> retained subdirectories but NOT their content.

Leaving aside the question of whether or not this is a bug, there doesn't appear to be any formal definition of the term "orphan branch" in the git documentation. Am I missing something?

Thanks,
Craig



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-11-24  2:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-22  0:28 Orphan branch not well-defined? Craig H Maynard
2023-11-22  1:08 ` Junio C Hamano
2023-11-22  1:42 ` Chris Torek
2023-11-24  2:03   ` Junio C Hamano
2023-11-24  2:12     ` Junio C Hamano
2023-11-24  2:27     ` Eric Sunshine
2023-11-24  2:31       ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).