Files
knowledge/git/overall.md
2025-11-20 18:31:46 +00:00

51 lines
664 B
Markdown

### Miscellaneous practical things with the git command
## Big files
# For some git repos like LLMs you may need to pull with
```
git lfs pull
```
## to switch to a branch
# An existing branch
```
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
```