Add an Existing Folder to A GIT Repository

First, you should open git repository bash, and Change the current working directory to your local project.

Initialize the local directory as a Git repository.For this type ?


git init

Add the files in your new local repository. This stages them for the first commit.


git add

Commit the files that you've staged in your local repository.


git commit -m "First commit"

At the top of your GitHub repository's Quick Setup page, click to copy the remote repository URL. And in command type


git remote add origin remote repository URL
git remote -v

Push the changes in your repository -->


git push origin master

If there are any error like [error:failed to push some refs to 'https://github.........'] during git push try this -->


git pull --rebase origin master

After complete


git push origin master

We Serve clients globally in diverse industries

Stay Upto Date With Our Newsletter.