TIL you can set a folder with a git repository as a remote
Uncategorized
5
Posts
2
Posters
0
Views
-
TIL you can set a folder with a git repository as a remote
-
TIL you can set a folder with a git repository as a remote
no way, this works
cd /path/to/remote git init --bare cd /path/to/repo git remote add origin file:///path/to/remote git push origin main -
no way, this works
cd /path/to/remote git init --bare cd /path/to/repo git remote add origin file:///path/to/remote git push origin main@sekomi
I merged a few projects into a monorepo this way
boom, monorepo with preserved historycd monorepo git init cd .. cd myproject1 mkdir myproject1/ git mv -k * myproject1/ git mv -k .* myproject1/ git commit -m "move to subdir, monorepo" cd .. cd monorepo git remote add -f myproject1 ../myproject1 git merge --allow-unrelated-histories myproject1/main -
@sekomi
I merged a few projects into a monorepo this way
boom, monorepo with preserved historycd monorepo git init cd .. cd myproject1 mkdir myproject1/ git mv -k * myproject1/ git mv -k .* myproject1/ git commit -m "move to subdir, monorepo" cd .. cd monorepo git remote add -f myproject1 ../myproject1 git merge --allow-unrelated-histories myproject1/mainwait, you can merge several git repos into one?
-
wait, you can merge several git repos into one?
@sekomi yeah, just make sure to move them using
git mv -k * subdir/to a subdirectory and commit that, so that there are no conflicts -
R relay@relay.infosec.exchange shared this topic