Update git/overall.md

This commit is contained in:
honney committed 2025-11-20 18:31:46 +00:00
1 parent 427edb0e8c
commit 76baead0d9
1 file changed
+35 -1
+35 -1
View File
@@ -13,4 +13,38 @@ git switch 'branch'
# A new branch
```
git switch -c 'branch'
```
```
## Creating a new repository on the command line
```
touch README.md
```
```
git init
```
```
git checkout -b main
```
```
git add README.md
```
```
git commit -m "first commit"
```
```
git remote add origin git-https-url
```
```
git push -u origin main
```
## Pushing an existing repository from the command line
```
git remote add origin git-https-url
```
```
git push -u origin main
```