# Git



### create a new repository on the command line

```bash
echo # main-contents >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/ecs-support/main-contents.git
git push -u origin main
```



### push an existing repository from the command line

```bash
git remote add origin https://github.com/Knowledge-Dragons/coding.git
git branch -M master
git push -u origin master
```
