All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: `git checkout --orpan` leaves a dirty worktree
Date: Fri, 8 Feb 2013 12:04:02 -0800	[thread overview]
Message-ID: <20130208200402.GB8461@google.com> (raw)
In-Reply-To: <CALkWK0mjf5vsiHvMW-QyzMHdmZQvdzjw_ORJnMd=mT6RCqB1xg@mail.gmail.com>

Ramkumar Ramachandra wrote:

> Why should I have to `git rm -rf .` after a `git checkout --orphan`?
> What sort of misfeature/ incomplete feature is this?

One designed for the "going open source" use case, where you have
existing code that you want to put into a new branch without history.
When there is no existing code, it seems simpler to do

	cd ..
	git init code-that-has-nothing-to-do-previous-cwd
	cd code-that-*
	... hack hack hack ...
	git commit
	git remote add origin <url>
	git push -u origin master

BTW, I suspect a clearer way to say what you meant is "Sounds like a
misfeature" which is gentler and more focused than an implied "What
kind of idiot designed this?"  Even if you are thinking the latter. :)

Hope that helps,
Jonathan

  reply	other threads:[~2013-02-08 20:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-08 19:50 `git checkout --orpan` leaves a dirty worktree Ramkumar Ramachandra
2013-02-08 20:04 ` Jonathan Nieder [this message]
2013-02-08 20:11   ` Ramkumar Ramachandra
2013-02-08 20:17     ` Junio C Hamano
2013-02-10 20:10       ` Jens Lehmann
2013-02-08 20:12   ` Junio C Hamano
2013-02-08 20:31 ` Martin von Zweigbergk
2013-02-08 20:38   ` Ramkumar Ramachandra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130208200402.GB8461@google.com \
    --to=jrnieder@gmail.com \
    --cc=artagnon@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.