简体   繁体   中英

Commit multiple project folders into One repository

I am currently learning Angular and the Course contains different modules and each module has its own angular project setup. Now in order to archive my work for future reference, Please let me know on how to add multiple angular project folders into single github repository??

For Example: i have two folders -- Angular-Databinding and Angular-services in which each one is a project folder that contains src, package.json and gitignore and other files. So i want to add these two folders into one single repository

In your github repository folder you need to create the workspace fro

1. Creates a new workspace and an initial Angular application.

Check this out:codehttps://angular.io/cli/new

If you don't need the show case application run:

ng new angular-workspace  --create-application=false

Otherwise:

ng new angular-workspace

You will have this:

在此处输入图像描述

2. Creates the Angular-Databinding application

ng g application Angular-Databinding

在此处输入图像描述

3. Creates the Angular-services application

And the same for the seconf=d application:

ng g application Angular-services

在此处输入图像描述

There are few options.

1)

  • Create one repository, say mycourses and create a branch master.
  • Checkout master branch and leave it as it is.
  • Create two new branches (angular-data-binding, angular-services)
  • Switch to 1st branch and place the first folder code, push it to the branch
  • Switch to 2nd branch and place the second folder code, push it to branch so when ever you want to work on those select appropriate branches
  • Create one repository, say mycourses and create a branch master.
  • Checkout master branch
  • Create two folders binding, services and place corresponding code inside it
  • Push the changes to the master branch
  • Create one repository, say mycourses and create a branch master.
  • Checkout master branch
  • Place the first app code into it and commit & push the changes to master
  • Place code changes related to second one and commit & push (for angular app most of the base set up including package json and all remains the same. most of the changes will be inside the app folder alone)

Choose the option that makes your learning experience easier.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM