babajaj
babajaj

Reputation: 228

How do I merge Angular frontend and Node backend in one git repository?

I have an Angular frontend project in one repo and a local backend node project (currently not in a repo). I want to be able to work on both at the same time so having them in the same git repo would make it way easier to share changes.

My problem is I don't know which files need to move and which files can stay at the root. There are plenty of Angular, IDE, Node, and git files/folders and I have no idea where to start. I need to host both locally and eventually deploy.

Any tips on how to actually go about this? My current structure is below:

frontend frontend

backend enter image description here

Upvotes: 2

Views: 9956

Answers (1)

kadash
kadash

Reputation: 290

If you want to store everything in one repository and still have git history of frontend app:

  1. Create frontend folder in root of the frontend repository and move all folders and files into it besides .git folder and .gitignore file
  2. Create backend folder in root of the frontend repository and paste there content of backend code files
  3. In root of the repository git add everything and git commit all and git push it to repository

Upvotes: 4

Related Questions