As I from time to time merge a repository into an existing one, I keep this todo list on how-to
- Create an orphan branch
git checkout --orphan my-merging-repo
- Reset all
git reset --hard && git clean -fd
- Add remote
git remote add my-merging-repo git@my-merging-repo
- Pull master
git pull my-merging-repo master
- Move into appropriate folder (skipping .gitignore)
mkdir -p src/my-merging-repo
for file in `git ls-files | grep -v ".gitignore" | sed 's,/.*,/,' | uniq`; do git mv $file src/my-merging-repo/; done
Memo to myself: Update next time to add an environment var for
my-merging-repo