1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

How to add an existing Angular project into the same Git repo as my ASP.NET Core Web API (VS +...

Discussão em 'Angular' iniciado por Suparna Dhara, Novembro 21, 2025.

  1. I am building a full-stack project where:


    • Backend: ASP.NET Core Web API (created in Visual Studio 2022)


    • Frontend: Angular project (created separately in VS Code)


    • Git: I initialized Git from Visual Studio, so a .git folder already exists in the Web API solution folder

    Now I want to place my Angular project inside the same Git repository, so that both frontend and backend are tracked together.

    My current structure:

    MySolution/
    API/ ← ASP.NET Core Web API (already in Git)
    .git/ ← Created automatically by Visual Studio


    Then I created Angular separately:

    Angular/ ← New Angular app created in VS Code


    But this Angular folder is outside the Git repo, and I'm not sure what the correct way is to attach it to the same repository without breaking anything.

    What I want to achieve

    A structure like this, all in one Git repo:

    MySolution/
    API/
    Angular/
    .git/


    Both projects should be version-controlled together so I can commit and push them in one repository.

    Question

    How can I correctly add my existing Angular project into the same Git repository that Visual Studio already created for the ASP.NET Core Web API?

    Should I:

    • move the Angular folder inside the Git root
    • re-initialize Git inside the Angular folder
    • or use some Visual Studio Git option?

    I want the safest approach without corrupting the existing repo or losing history.

    Continue reading...

Compartilhe esta Página