Recursively add the entire folder to a repository

后端 未结 15 1391
野的像风
野的像风 2020-11-30 16:23

I am trying to add a branch to the master branch on GitHub and push a folder onto that branch.

The folder structure of the branch looks like - SocialApp/SourceCode/D

15条回答
  •  被撕碎了的回忆
    2020-11-30 16:51

    Navigate to the folder where you have your files
    if you are on a windows machine you will need to start git bash from which you will get a command line interface then use these commands

    git init   //this initializes a .git  repository in your working directory
    
    git remote add origin  // this points to correct repository where files will be uploaded
    
    git add *   // this adds all the files to the initialialized git repository
    

    if you make any changes to the files before merging it to the master you have to commit the changes by executing

    git commit -m "applied some changes to the branch"
    

    After this checkout the branch to the master branch

提交回复
热议问题