Initialize the local directory as a Git repository. git init Add the files in your new local repository. This stages them for the first commit. git add . Optional step: Configure your name and email id in git The following command will open git config file in terminal editor (vim or nano) git config --global --edit Commit the files that you've staged in your local repository. git commit -m 'First project import' Add the URL for the remote repository where your local repostory will be pushed. Replace <PROJECT_NAME> with name of project on Github. git remote add origin https://github.com/amberj/<PROJECT_NAME>.git Sets the new remote: git remote -v Push the changes in your local repository to GitHub. git push -u origin main