Followers

Wednesday, October 14, 2020

How to push your local project folder to git remote repo

 How to push your local project folder to git


When you have your local project, and if you want to push that to remote git, please follow the below instructions.


step1:

    Navigate to the Project folder. I have my project folder under C:\CICD

    open command prompt --> run 

    cd c:\CICD\exmaplepush

Step2:

    Now we need to run the project initialization command.

    git init

step3:

    add all your local files to the local repo.

    git add * or git add . or git add all

step4:

    Commit all added files to a local folder.

    git commit -m "all files commit"

step5:

    Now add the project to the remote repo.

    git remote add origin <remote_reop folder path>

    ex: https://<git.username>@gitlab.com/<git.username>/exmaplepush

step6:

    In the final step, we are pushing to a remote location.

    git push origin master