All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josh Triplett <josh@joshtriplett.org>
To: git@vger.kernel.org
Subject: Easiest way to clone over an existing directory?
Date: Wed, 15 Jun 2016 08:51:34 -0700	[thread overview]
Message-ID: <20160615155133.GA13168@x> (raw)

Currently, every time I set up a new system, I run the following:

git clone $MY_HOMEDIR
mv home/.git .
rm -r home
git checkout -f

This seems like an odd dance to go through.  But I can't just git clone
into ~ directly, because git clone will not clone into an existing
non-empty directory.

(I could use "git clone -n" to avoid the unnecessary checkout, but the
files are small, and it wouldn't remove the need to rmdir so the number
of commands would remain the same.)

Does some better way exist to handle this?  And if not, would it make
sense for git clone to have an option to clone into an existing
directory (which should also avoid setting junk_work_tree)?

             reply	other threads:[~2016-06-15 15:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-15 15:51 Josh Triplett [this message]
2016-06-16  2:44 ` Easiest way to clone over an existing directory? brian m. carlson

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=20160615155133.GA13168@x \
    --to=josh@joshtriplett.org \
    --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.