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

Add a comment

Comments

EaJGHuADcVK
Written on Sat, 24 Aug 2024 01:11:37 by MvRmSLJpGswe
iJpSXvlZFMbYtk
Written on Sun, 18 Aug 2024 09:24:10 by tjuCSPyJrvGWE
gIMjdLmOufZW
Written on Fri, 05 Jan 2024 19:47:35 by AtFqDQHCEuSbwd
cLiyTkHJPEzsC
Written on Fri, 05 Jan 2024 19:47:34 by RIUZTLaMBA
CfzAdgrjxtD
Written on Wed, 13 Dec 2023 07:46:48 by YiMNkWQGcDJA
QHOnrlhYG
Written on Wed, 13 Dec 2023 07:46:46 by XtdHNLjgEFa
kpMTlPztjiuwXWay
Written on Sat, 28 May 2022 05:45:55 by JyHxzQlfXMb
FsUfXoQB
Written on Sat, 28 May 2022 05:45:54 by PWKihtUA