Lukas Juhrich
Lukas Juhrich

Reputation: 395

Using git to copy files

How can I use git to copy the files I changed in a pimarily worked in (./bll) to another directory (./bll_remote), which actually is a softlink to another directory (which is in a mounted webdav-directory, that's the background) with git push?

btw I am quite new to git, so I may not have understood everything regarding the concept of repositories (so probably that's why the solutions i found at google did not work properly for me)!

Edit: I forgot to mention, one solution seemed to work — git remote add ../bll_remote followed by git push -u origin master returned it would have finished writing 3.2MiB — but when i looked into that dir, it only showed up these strange files created due to the --bare option, but nowhere in there were the added and pushed files… what did I do wrong? Or, different question, why have I to use the --bare option to make it work?

Upvotes: 1

Views: 302

Answers (1)

Code-Apprentice
Code-Apprentice

Reputation: 83587

A "bare" repository does not contain a working directory. The "strainge files" you see are all the data that git uses to recreate the files under version control. If you want a full repository, you should probably start over and reinitialize the target directory without the --bare option.

Upvotes: 1

Related Questions