I have an odd use case, and am not very familiar with Git. I have two git repos; repo one which is empty, and repo two which has files. I also have a folder ./foo. I want something similar to this:
git clone repo_one .
git clone repo_two . (I just want the files from repo_two. No .git folder or anything)
git add --a
git push repo_one
git clone repo_two .
git clone repo_one . (possible in an existing directory though?)
Since you've cloned both the Git repos, execute the following command on repo #2 to export (or archive) it without its
git archive master | tar -x -C /path/inside/repo1
The final sequence of events would be something like this:
cd foo git clone repo_one git clone repo_two cd repo_two git archive master | tar -x -C ../repo_1