git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Easiest way to clone over an existing directory?
@ 2016-06-15 15:51 Josh Triplett
  2016-06-16  2:44 ` brian m. carlson
  0 siblings, 1 reply; 2+ messages in thread
From: Josh Triplett @ 2016-06-15 15:51 UTC (permalink / raw)
  To: git

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)?

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

end of thread, other threads:[~2016-06-16  2:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-15 15:51 Easiest way to clone over an existing directory? Josh Triplett
2016-06-16  2:44 ` brian m. carlson

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).