Mike Kasprzak <m...@sykhronics.com> writes:

> What I would like to do is git clone inside that directory. Alas, git
> will not let you clone in any directory containing a file.

In the ideal world, I think both of these two commands:

    $ git clone $URL somewhere
    $ cd somewhere && git clone $URL .

should behave just like:

    - if somewhere/.git exists, barf and fail
    - otherwise, do the "git init && git add remote && git fetch"
      followed by "git checkout" dance.

without any additional option.  The final "checkout" step should
fail if the "untracked files" you have in the existing directory
interfere with it.

It used to be that you always had to create a "new" directory, not
even an empty directory was allowed.  Recently we took a small step
in that direction.

That hasn't happened, and will not happen unless somebody works on
it.  The thing is that it would not just be the matter of adding a
command line flag.  There are tons of things "git clone" can do
differently from "git fetch" and using much simpler and performant
logic because it assumes that the directory it is cloning into is an
empty one.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to