From 3b0889d175bf33e045b5e7a492b634e8b0598870 Mon Sep 17 00:00:00 2001 From: Gojo Satoru Date: Thu, 15 Feb 2024 11:36:51 +0300 Subject: [PATCH 1/3] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB?= =?UTF-8?q?=D0=B8=20=D1=84=D0=B0=D0=B9=D0=BB=20=D1=81=20=D0=B8=D0=BD=D1=81?= =?UTF-8?q?=D1=82=D1=80=D1=83=D0=BA=D1=86=D0=B8=D0=B5=D0=B9=20=D0=BF=D0=BE?= =?UTF-8?q?=20=D0=B3=D0=B8=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- git_howto.md | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 git_howto.md diff --git a/git_howto.md b/git_howto.md new file mode 100644 index 00000000..8377f6d8 --- /dev/null +++ b/git_howto.md @@ -0,0 +1,58 @@ +# Подсказка по GIT + +## Начало работы + +Создание репозитория: +```sh +git init +``` + +Добавление файла +```sh +git add +``` + +Сохранение изменений с комментарием "Message" +```sh +git commit -m "Message" +``` + +## Контроль версий + +Отображение всех изменений +```sh +git log +``` + +Сокращённый вариант отображения всех изменений +```sh +git log --oneline +``` + +Графическое отображение слияний внутри log +```sh +git log --graph +``` + +## Работа с ветками + +Перемещение по веткам +```sh +git checkout <имя_ветки> +``` + +Отображение всех веток +```sh +git branch +``` + +Создание новой ветки +```sh +git branch <имя новой ветки> +``` + +Удаление ветки +```sh +git branch -d <имя ветки для удаления> +``` + From 8019badce6e204fe767f6b241d39606f86afc5c3 Mon Sep 17 00:00:00 2001 From: Gojo Satoru Date: Thu, 15 Feb 2024 11:42:31 +0300 Subject: [PATCH 2/3] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB?= =?UTF-8?q?=D0=B8=20=D0=B8=D0=BD=D1=81=D1=82=D1=80=D1=83=D0=BA=D1=86=D0=B8?= =?UTF-8?q?=D1=8E=20=D0=B4=D0=BB=D1=8F=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D1=83=20=D1=81=20=D1=83=D0=B4=D0=B0=D0=BB=D1=91=D0=BD=D0=BD?= =?UTF-8?q?=D1=8B=D0=BC=D0=B8=20=D1=80=D0=B5=D0=BF=D0=BE=D0=B7=D0=B8=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D0=B8=D1=8F=D0=BC=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- git_howto.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/git_howto.md b/git_howto.md index 8377f6d8..c786a64c 100644 --- a/git_howto.md +++ b/git_howto.md @@ -56,3 +56,19 @@ git branch <имя новой ветки> git branch -d <имя ветки для удаления> ``` +## Работа с удалёнными репозиториями + +Клонировать репозиторий из github в локальную папку. +```sh +git clone <адрес репозитиория> +``` + +Отправить локальный репозиторий в удалённый репозиторий +```sh +git push +``` + +Загрузить актуальную версию из удалённого репозитория +```sh +git pull +``` From 69a4f52bd7122d2fe9e7c634ca7bddf26abd6d9f Mon Sep 17 00:00:00 2001 From: Gojo Satoru Date: Thu, 15 Feb 2024 11:44:41 +0300 Subject: [PATCH 3/3] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB?= =?UTF-8?q?=D0=B8=20=D0=BE=D0=BF=D0=B8=D1=81=D0=B0=D0=BD=D0=B8=D0=B5=20pul?= =?UTF-8?q?l=20request?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- git_howto.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/git_howto.md b/git_howto.md index c786a64c..740e8fe0 100644 --- a/git_howto.md +++ b/git_howto.md @@ -72,3 +72,8 @@ git push ```sh git pull ``` + +Сделать запрос на принятие изменений владельцем репозитория, на который делали fork +```sh +git pull request +``` \ No newline at end of file