0

I've been googling on Git for a few hours now and I'm going nowhere, so hope you can help.

I have a local path /path/to/somewhere/ And this is in sync with my remote BitBucket repo https://bitbucket.org/company/somewhere.git

Now I want to add another folder like /path/to/there/ And I want it to appear in the same repository https://bitbucket.org/company/somewhere.git/there/

I tried using "git subtree add --prefix=there https://bitbucket.org/company/somewhere.git" but it responds with:

prefix 'somewhere' already exists.

When I log in to Bitbucket and check, it doesnt.

Exie
  • 466
  • 5
  • 16

1 Answers1

0

Git doesn't work like this you have to have one more repository for /path/to/there/ to be able to include it into your /path/to/somewhere/ as a sub directory. When you have two repository you can:

$ cd /path/to/somewhere/
$ git subtree add --prefix=there https://bitbucket.org/company/THERE.git master

Then a new directory there appeares in the /path/to/somewhere/.

For more information take a look at this

neshkeev
  • 6,280
  • 3
  • 26
  • 47
  • Thankyou. I ended up using a symbolic link like: `cd /path/to/somewhere/` `ln -s /path/to/there/ there/` It's not pretty, but it gets the job done. – Exie Jul 31 '15 at 00:35