Skip to content

Latest commit

 

History

History
64 lines (45 loc) · 968 Bytes

File metadata and controls

64 lines (45 loc) · 968 Bytes

GIT шпаргалка

Инициализация репозитория

git init

Добавление файлов

git add

Первый коммит

git commit -m "Initial commit"

История коммитов

git log

Генерация ключа

ssh-keygen -t ed25519 -C "email@example.com"

Просмотр публичного ключа

cat ~/.ssh/id_ed25519.pub

Проверка соединения с GitHub

ssh -T git@github.com

Связь локального и удалённого репозитория (через HTTPS или SSH)

git remote add origin git@github.com:username/repo.git

или

git remote add origin https://github.com/username/repo.git

Отправить изменения

git push -u origin main

Просмотр статуса

git status