Is there a way to clone the repo without creating the containing directory?

I have this file structure:

folderIWantStuffIn/
  - old_stuff

      

Now I want to add new stuff that is in the git repository. I would like to be able to use git clone

both git pull

directly in the directory and get the following:

folderIWantStuffIn/
  - old_stuff
  - new_stuff

      

When I use git clone

I get this:

folderIWantStuffIn/
  - old_stuff
  - NewStuffFolder/
      - new_stuff

      

Are there flags that can be passed in git clone

to get this behavior?

+2


a source to share


1 answer


Try The git clone $URL .

magic is .

-it tells git the directory where it should clone the repo (in this case we're using .

, aka, the current directory). See the docs for details .



+4


a source







All Articles