tags:

views:

21

answers:

1

I have this file structure:

folderIWantStuffIn/
  - old_stuff

Now I want to add some new stuff that is in a git repo. I'd like to be able to use git clone and git pull right in the directory and get this:

folderIWantStuffIn/
  - old_stuff
  - new_stuff

When I use git clone, I get this:

folderIWantStuffIn/
  - old_stuff
  - NewStuffFolder/
      - new_stuff

Are there flags I can pass into git clone to get this behavior?

+1  A: 

Try git clone $URL . The magic there is the .—it tells git the directory into which it should clone the repo (in this case, we're using ., aka, the current directory). See the docs for more options.

Hank Gay
That's clever, I like it. Is there anyway to use this if there are already files in the directory?
Zach
I don't see an easy way, but there's nothing stopping you from temporarily moving the files to a different directory and then moving them back after you you clone the repo, right?
Hank Gay
Yeah, I was looking for a way to distribute a plugin, so I was hoping to be able to give out an easy command. Anyway....good enough for the check....thanks
Zach