git remote add secret_prefix-tools ssh://[email protected]:1234/secret_prefix-tools
git fetch secret_prefix-tools
git branch tools secret_prefix-tools/master
git read-tree --prefix builder/ -u tools:builder
git commitOr just copy-paste files and commit it :) It is not a git way, but there is no difference at all.
This part is more tricky. I didn't found an easy way to do it (probably I was looking for the most tricky one from the beginning, but still).
Get repo
git remote add secret_prefix-tools ssh://[email protected]:1234/secret_prefix-tools
git fetch secret_prefix-tools
git branch tools secret_prefix-tools/masterFilter branch
git filter-branch --prune-empty --subdirectory-filter builder toolsAdd subtree (since directory builder/ already exist, create temp directory)
git subtree add --prefix temp toolsMove all files from temp/ to builder/
git commit -m "Move secret_prefix-tools/builder/* files to builder/ folder"