From c6adf51d3b1806a67f3723a4f76a0acf3b72dbfd Mon Sep 17 00:00:00 2001 From: deterquetejoder Date: Sat, 15 Jul 2023 20:11:14 +0500 Subject: [PATCH 1/8] adding Instruction file --- instruction.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 instruction.md diff --git a/instruction.md b/instruction.md new file mode 100644 index 0000000..e69de29 From ea58a5b40db256dcd29307ad4d5860843475b5e3 Mon Sep 17 00:00:00 2001 From: deterquetejoder Date: Sat, 15 Jul 2023 20:16:09 +0500 Subject: [PATCH 2/8] adding a line --- instruction.md | 1 + 1 file changed, 1 insertion(+) diff --git a/instruction.md b/instruction.md index e69de29..88d3cf0 100644 --- a/instruction.md +++ b/instruction.md @@ -0,0 +1 @@ +to push a new branch to the existing git project special attributes should be used From 77ee6c0f97128801357c295b6626e38d0cb2253a Mon Sep 17 00:00:00 2001 From: deterquetejoder Date: Sat, 15 Jul 2023 20:28:49 +0500 Subject: [PATCH 3/8] adding additional lines --- instruction.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/instruction.md b/instruction.md index 88d3cf0..609fc86 100644 --- a/instruction.md +++ b/instruction.md @@ -1 +1,3 @@ -to push a new branch to the existing git project special attributes should be used +## to push a new branch to the existing git project special attributes should be used + +the command is __"git push --set-upstream origin (current branch name)"__ From 481d52808a2786a00f8ef5a11973da091d8659fa Mon Sep 17 00:00:00 2001 From: deterquetejoder Date: Sat, 15 Jul 2023 20:37:43 +0500 Subject: [PATCH 4/8] description amend attribute --- instruction.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/instruction.md b/instruction.md index 609fc86..c6a0232 100644 --- a/instruction.md +++ b/instruction.md @@ -1,3 +1,8 @@ ## to push a new branch to the existing git project special attributes should be used the command is __"git push --set-upstream origin (current branch name)"__ + + ## Remaking the last commit +somtime you realy need to rewrite the last commit without adding a new one + +in order to rewrite it, use the attribute __--amend__ with the command __commit__ From 3de565e126d9c9aa2a9503f06738f0633b54ac77 Mon Sep 17 00:00:00 2001 From: deterquetejoder Date: Sat, 15 Jul 2023 20:37:43 +0500 Subject: [PATCH 5/8] description amend attribute --- instruction.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/instruction.md b/instruction.md index 609fc86..32b4e18 100644 --- a/instruction.md +++ b/instruction.md @@ -1,3 +1,8 @@ ## to push a new branch to the existing git project special attributes should be used the command is __"git push --set-upstream origin (current branch name)"__ + + ## Remaking the last commit +somtimes you realy need to rewrite the last commit without adding a new one + +in order to rewrite it, use the attribute __--amend__ with the command __commit__ From d83f673a452fc1ae0f28d6afba75d54d754d5bb1 Mon Sep 17 00:00:00 2001 From: deterquetejoder Date: Sat, 15 Jul 2023 21:32:37 +0500 Subject: [PATCH 6/8] addin myReadme --- myReadme.md | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 myReadme.md diff --git a/myReadme.md b/myReadme.md new file mode 100644 index 0000000..f251a60 --- /dev/null +++ b/myReadme.md @@ -0,0 +1,51 @@ +# Инструкция для работы с Git и удалёнными репозиториями + + + +## Что такое Git? +Git - это одна из реализаций распределённых систем контроля версий, имеющая как и локальные, так и удалённые репозитории. Является самой популярной реализацией систем контроля версий в мире. +## Подготовка репозитория +Для создание репозитория необходимо выполнить команду *git init* в папке с репозиторием и у Вас создаться репозиторий (появится скрытая папка .git) + +## Создание коммитов + +### Git add +Для добавления измений в коммит используется команда *git add*. Чтобы использовать команду *git add* напишите *git add <имя файла>* + +### Просмотр состояния репозитория +Для того, чтобы посмотреть состояние репозитория используется команда *git status*. Для этого необходимо в папке с репозиторием написать *git status*, и Вы увидите были ли измения в файлах, или их не было. + +### Создание коммитов +Для того, чтобы создать коммит(сохранение) необходимо выполнить команду *git commit*. Выполняется она так: *git commit -m "<сообщение к коммиту>*. Все файлы для коммита должны быть ***ДОБАВЛЕНЫ*** и сообщение к коммиту писать ***ОБЯЗАТЕЛЬНО***. + +## Перемещение между сохранениями +Для того, чтобы перемещаться между коммитами, используется команда *git checkout*. Используется она в папке с пепозиторием следующим образом: *git checkout <номер коммита>* + +## Журнал изменений +Для того, чтобы посмтреть все сделанные изменения в репозитории, используется команда *git log*. Для этого достаточно выполнить команду *git log* в папке с репозиторием. + +using the "*--oneline*" attribute with this command is **more** a convenient way of using it. + +## Ветки в Git + +In easy words, GIT branch is the local copy of the main codebase which will have the changes of the new feature or bug fix, which will later be merged with the main codebase once after verified. + +### Создание ветки + +
Git branching
+ +Для того, чтобы создать ветку, используется команда *git branch*. Делается это следующим образом в папке с репозиторием: *git branch <название новой ветки>* + +## Branch switching + +to switch between branches use git switch "name branch" + + +
GIT Switching
+ +## Слияние веток + +Для того чтобы дабавить ветку в текущую ветку используется команда *git merge * + +## Удаление веток +Для удаления ветки ввести команду "git branch -d 'name branch'" From f9c4f4d68ec718591cb4b852643f2f92817a00c4 Mon Sep 17 00:00:00 2001 From: deterquetejoder Date: Sat, 15 Jul 2023 21:47:14 +0500 Subject: [PATCH 7/8] inserted info from instruction. to myReadme.md --- myReadme.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/myReadme.md b/myReadme.md index f251a60..bcd9c30 100644 --- a/myReadme.md +++ b/myReadme.md @@ -18,6 +18,11 @@ Git - это одна из реализаций распределённых с ### Создание коммитов Для того, чтобы создать коммит(сохранение) необходимо выполнить команду *git commit*. Выполняется она так: *git commit -m "<сообщение к коммиту>*. Все файлы для коммита должны быть ***ДОБАВЛЕНЫ*** и сообщение к коммиту писать ***ОБЯЗАТЕЛЬНО***. +## Rewriting the last commit +somtimes you realy need to rewrite the last commit without adding a new one + +in order to rewrite it, use the attribute __--amend__ with the command __commit__ + ## Перемещение между сохранениями Для того, чтобы перемещаться между коммитами, используется команда *git checkout*. Используется она в папке с пепозиторием следующим образом: *git checkout <номер коммита>* @@ -49,3 +54,9 @@ to switch between branches use git switch "name branch" ## Удаление веток Для удаления ветки ввести команду "git branch -d 'name branch'" + +# Synchronization to GitHub + +## to push a new branch to the existing git project special attributes should be used + +the command is __"git push --set-upstream origin (current branch name)"__ \ No newline at end of file From 01b1e5bc19371902acb9608a2e7c378bedce194a Mon Sep 17 00:00:00 2001 From: deterquetejoder Date: Sat, 15 Jul 2023 22:24:37 +0500 Subject: [PATCH 8/8] added some more command discription --- myReadme.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/myReadme.md b/myReadme.md index bcd9c30..96d1069 100644 --- a/myReadme.md +++ b/myReadme.md @@ -57,6 +57,37 @@ to switch between branches use git switch "name branch" # Synchronization to GitHub +## git clone + +to download existing repository, *git clone* command is used + +Example: *git clone __GitHub link__* + +It'll download a pointed repo to your folder + +## git pull + +This command downloads all changes to your repo and tries to merge them + +## git push + +This command uploads your repo version to remoute repo + +**! requires the authorisation at first using!* + +## pull request + +This command is to suggest changes to existing project of another author + + All changes should be suggested through another new branch: +* do "fork" for the repo +* git clone of YOUR repo version +* create a new branch and change it +* commit changes +* upload it to your GitHub +* on GitHub site push "pull request" button. + + ## to push a new branch to the existing git project special attributes should be used the command is __"git push --set-upstream origin (current branch name)"__ \ No newline at end of file