Skip to content
This repository has been archived by the owner on Aug 24, 2023. It is now read-only.

Latest commit

 

History

History
19 lines (17 loc) · 438 Bytes

git-commands.md

File metadata and controls

19 lines (17 loc) · 438 Bytes

m122 - Git Commands

Create new repository on command line

echo "# <name>" >> README.md
git init
git add README.md
git commit -m "initial commit"
git branch -M main
git remote add origin https://github.com/<name>/<reponame>.git
git push -u origin main

Push existing repository on command line

git remote add origin https://github.com/<name>/<reponame>.git
git branch -M main
git push -u origin main