0

I want to push my frontend repo to a directory of a remote repo. E.g. push the repo to the app directory of remote.

Frontend repo:

/--
    |- tsconfig.json
    |- webpack.config.js
    |- ...

Remote:

/--
    |- app/
        |- tsconfig.json
        |- webpack.config.js
        |- ...
    |- server/
        |- main.js
        |- ...

The subtree command has come to my mind, but it seems to be limited to local. I'm wondering if there is any way to do it, other than create a local repo containing both app and server.

  • Git makes a terrible deployment system. If you're using Git *as* a deployment system, you'll have to conform to Git's rules. Note that a Git *repository* is a collection of commits. Each *commit* is immutable and it's the *commits* that contain the files; the file paths within the commit are part of the immutable data. You push *commits* (to a repository): you don't push a repository, nor a file, just some set of commits. So, yes, if you use Git as your deployment system, that's what you have to do. (I don't have any recommended deployment systems myself as that's not what I do.) – torek Oct 28 '22 at 02:19

0 Answers0