To push project to GitHub

  1. Go to github.com
  2. Create new repository
  3. Copy repository url
  4. Now run of of the fallowing git commands:

Create a new repository on the command line

echo "# PROJECTNAME" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/USERNAME/PROJECTNAME.git
git push -u origin main

…or push an existing repository from the command line

git remote add origin https://github.com/USERNAME/PROJECTNAME.git
git branch -M main
git push -u origin main
  • remember to replace all capital USERNAME with your github user name and PROJECTNAME with the name of the GitHub repository name. For example
https://github.com/DevWL/k8s-node-express-nginx.git
0
Would love your thoughts, please comment.x
()
x