Git basics

I'm not a git expert, sometimes I need a reminder when setting up a new repository of the commands necessary.

Creating a new repository on the command line

touch README.md
git init

git add README.md
git commit -m "Initial commit"
git remote add origin https://<url to repository>.git
git push -u origin master

Pushing an existing repository from the command line

git remote add origin https://<url to repository>.git
git push -u origin master

Previous Post Next Post

Add a comment

Comments

QiYIeuvqXCAm
Written on Sat, 06 Jul 2024 13:23:41 by bitCXmWBnUyMIf
gCRohkmAP
Written on Tue, 28 May 2024 18:20:12 by CUvZPdxDSLtVQBR