19 lines
508 B
Markdown
19 lines
508 B
Markdown
# Git
|
|
|
|
## Git setup
|
|
|
|
- `git config --global user.name "John Doe"` - configure global user
|
|
- `git config --global user.email johndoe@example.com` - configure global user email
|
|
|
|
## Add new commit
|
|
|
|
- `git init` - initiallize repository
|
|
- `git add README.md` - add file/s to repository
|
|
- `git commit -m "first commit"` - commit file
|
|
- `git branch -M main`
|
|
|
|
## Remote repository push
|
|
|
|
- `git remote add origin https://github.com/foglar/[name].git` - add remote url
|
|
- `git push origin master` - push master branch
|