From e3712f16864924645d04484d8392d613ae7d3104 Mon Sep 17 00:00:00 2001 From: NovikovDM Date: Mon, 22 May 2023 13:17:33 +0000 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=B3=D1=80=D1=83=D0=B7=D0=B8?= =?UTF-8?q?=D0=BB(=D0=B0)=20=D1=84=D0=B0=D0=B9=D0=BB=D1=8B=20=D0=B2=20''?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.txt | 916 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 916 insertions(+) create mode 100644 README.txt diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..00027bf --- /dev/null +++ b/README.txt @@ -0,0 +1,916 @@ +Отчет по лабораторной работе № 2 "Система контроля версий Git" + +Выполнил: Новиков Д. М. +Группа: А-02-22 +Проверил: + +Примечание: работа выполнялась на Windows. + +1. Создал на рабочем столе каталог lab02 и запустил в нем Git Bash, приглашение: + +u111-15@PROG-20 MINGW32 /c/Users/u111-15/Desktop/lab02 +$ + +2. Просмотрел файлы в рабочем каталоге можно командой "ls" --- пусто: + +u111-15@PROG-20 MINGW32 /c/Users/u111-15/Desktop/lab02 +$ ls + +u111-15@PROG-20 MINGW32 /c/Users/u111-15/Desktop/lab02 +$ + + +3. Создал каталоги Алисы и Боба, создал каталог "project", +изучил команду "cd" в процессе: + +u111-15@PROG-20 MINGW32 /c/Users/u111-15/Desktop/lab02 +$ mkdir alice + +u111-15@PROG-20 MINGW32 /c/Users/u111-15/Desktop/lab02 +$ mkdir bob + +u111-15@PROG-20 MINGW32 /c/Users/u111-15/Desktop/lab02 +$ cd bob + +u111-15@PROG-20 MINGW32 /c/Users/u111-15/Desktop/lab02/bob +$ cd .. + +u111-15@PROG-20 MINGW32 /c/Users/u111-15/Desktop/lab02 +$ cd alice + +u111-15@PROG-20 MINGW32 /c/Users/u111-15/Desktop/lab02/alice +$ mkdir project + +u111-15@PROG-20 MINGW32 /c/Users/u111-15/Desktop/lab02/alice +$ ls +project + +u111-15@PROG-20 MINGW32 /c/Users/u111-15/Desktop/lab02/alice +$ cd project + + + +4. Инициализировал репозитарий: +u111-15@PROG-20 MINGW32 /c/Users/u111-15/Desktop/lab02/alice/project +$ git init +Меняем имя ветки на main командой git branch -m main + + + +u111-15@PROG-20 MINGW32 /c/Users/u111-15/Desktop/lab02/alice/project (master) +$ git config user.name 'Alice (NovikovDM)' + +u111-15@PROG-20 MINGW32 /c/Users/u111-15/Desktop/lab02/alice/project (master) +$ git config user.email 'NovikovDM@mpei.ru' + + +5.Создание коммитов +Запускаем CodeBlocks и создаём проект в репозитарии Алисы: + +Вернувшись в Git Bash, просмотрим состояние рабочей копии: + +u111-15@PROG-20 MINGW32 /c/Users/u111-15/Desktop/lab02/alice/project (master) +$ git status + +Добавим файл main.cpp в индекс, то есть в набор изменений +u111-15@PROG-20 MINGW32 /c/Users/u111-15/Desktop/lab02/alice/project (master) +$ git add main.cpp + +Выполним коммит с файлом main.cpp и коротким сообщением: +u111-15@PROG-20 MINGW32 /c/Users/u111-15/Desktop/lab02/alice/project (master) +$git commit -m 'code: заготовка программы' + +Еще раз смотрим состояние рабочей копии +u111-15@PROG-20 MINGW32 /c/Users/u111-15/Desktop/lab02/alice/project (master) +$ git status + +6.Составление сообщений к коммитам +Добавьте файл project.cbp в индекс и сделайте коммит с ним, тема — build +u111-15@PROG-20 MINGW32 /c/Users/u111-15/Desktop/lab02/alice/project (master) +$ git add project.cbp + + +u111-15@PROG-20 MINGW32 /c/Users/u111-15/Desktop/lab02/alice/project (master) +$ git commit -m 'build: add project file' + +7.Cоздание коммитов с изменениями +Заменим тело функции main() на ввод двух чисел: +cout << "Enter A and B: "; +int a, b; +cin >> a >> b; +Коммитим изменения +1сп +u111-15@PROG-20 MINGW32 /c/Users/u111-15/Desktop/lab02/alice/project (master) +$ git add main.cpp +u111-15@PROG-20 MINGW32 /c/Users/u111-15/Desktop/lab02/alice/project (master) +$ git commit -m "..." + +2сп +u111-15@PROG-20 MINGW32 /c/Users/u111-15/Desktop/lab02/alice/project (master) +$ git add -u +u111-15@PROG-20 MINGW32 /c/Users/u111-15/Desktop/lab02/alice/project (master) +$ git commit -m'<<' + +3сп +u111-15@PROG-20 MINGW32 /c/Users/u111-15/Desktop/lab02/alice/project (master) +$ git commit -a -m'<<' + +8.Игнорирование файлов +Укажем Git игнорировать присутствие каталога bin. Для этого создадим в CodeBlocks новый файл (File → New... → Empty) и запишем в него строки +/bin +/obj +/*.layout + +9.Работа с журналом репозитария +git log --stat показывает файлы, измененные в коммитах. +git log --oneline --decorate показывает коммиты компактно (--oneline), а также показывает ссылки, концы веток и тэги (--decorate). +git log --oneline --decorate --all --graph делает то же для всех веток (--all), причем коммиты отображаются в терминале в виде дерева (--graph). +git log -- main.cpp показывает затрагивающие main.cpp; +git log --grep "code:" показывает коммиты с code: в сообщении. + +Найдите сначала коммиты по теме build, затем коммиты, затрагивающие project.cbp. +git log -- project.cbp +git log --grep "build" + +10.Просмотр коммитов +git show HEAD (текущий) +git show main (по имени ветви) +git show d2e8af (по хэшу нужного коммита) + +11.Просмотр изменений +u111-15@PROG-20 MINGW32 /c/Users/u111-15/Desktop/lab02/alice/project (master) +$ git diff +u111-15@PROG-20 MINGW32 /c/Users/u111-15/Desktop/lab02/alice/project (master) +$ git diff HEAD~2 +u111-15@PROG-20 MINGW32 /c/Users/u111-15/Desktop/lab02/alice/project (master) +$ git diff HEAD~2 HEAD + +12.Откат изменений +Возвращение к предыдущему комиту: +u111-15@PROG-20 MINGW32 /c/Users/u111-15/Desktop/lab02/alice/project (master) +$ git reset --hard HEAD~1 +Уберем изменения в main.cpp другим способом — откатив этот файл к состоянию в последнем коммите (HEAD): +u111-15@PROG-20 MINGW32 /c/Users/u111-15/Desktop/lab02/alice/project (master) +$git checkout HEAD -- main.cpp + +13.Обмен кодом через удаленное хранилище +u111-15@PROG-20 MINGW32 /c/Users/u111-15/Desktop/lab02/alice/project (master) +$ ssh-keygen +Запустить агент: + +eval $(ssh-agent -s) +Загрузить ключ (потребуется ввести пароль): + +ssh-add + +14.Получение проекта с сервера +u111-15@PROG-20 MINGW32 /c/Users/u111-15/Desktop/lab02/alice/project (master) +$ git remote -v +u111-15@PROG-20 MINGW32 /c/Users/u111-15/Desktop/lab02/bob +$ git clone git@uit.mpei.ru:NovikovDM/cs-lab02.git project +u111-15@PROG-20 MINGW32 /c/Users/u111-15/Desktop/lab02/alice/project (master) +$cd project +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) +$ git fetch +remote: Enumerating objects: 5, done. +remote: Counting objects: 100% (5/5), done. +remote: Compressing objects: 100% (3/3), done. +remote: Total 3 (delta 1), reused 0 (delta 0), pack-reused 0 +Unpacking objects: 100% (3/3), done. +From uit.mpei.ru:NovikovDM/cs-lab02 + ea9094f..58189b1 master -> origin/master + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) +$ git log --oneline --decorate --all --graph +* 58189b1 (origin/master) code: вывод произведения +* ea9094f (HEAD -> master) code: вывод разности +* f02e566 code: вывод суммы +* 1b4a85a build: add project file +* 375569d code: заготовка программы + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) +$ git pull --f-only +error: unknown option `f-only' +usage: git pull [] [ [...]] + + -v, --verbose be more verbose + -q, --quiet be more quiet + --progress force progress reporting + --recurse-submodules[=] + control for recursive fetching of submodules + +Options related to merging + -r, --rebase[=(false|true|merges|preserve|interactive)] + incorporate changes by rebasing rather than merging + -n do not show a diffstat at the end of the merge + --stat show a diffstat at the end of the merge + --log[=] add (at most ) entries from shortlog to merge commit message + --signoff[=...] add Signed-off-by: + --squash create a single commit instead of doing a merge + --commit perform a commit if the merge succeeds (default) + --edit edit message before committing + --ff allow fast-forward + --ff-only abort if fast-forward is not possible + --verify-signatures verify that the named commit has a valid GPG signature + --autostash automatically stash/stash pop before and after rebase + -s, --strategy + merge strategy to use + -X, --strategy-option + option for selected merge strategy + -S, --gpg-sign[=] + GPG sign commit + --allow-unrelated-histories + allow merging unrelated histories + +Options related to fetching + --all fetch from all remotes + -a, --append append to .git/FETCH_HEAD instead of overwriting + --upload-pack path to upload pack on remote end + -f, --force force overwrite of local branch + -t, --tags fetch all tags and associated objects + -p, --prune prune remote-tracking branches no longer on remote + -j, --jobs[=] number of submodules pulled in parallel + --dry-run dry run + -k, --keep keep downloaded pack + --depth deepen history of shallow clone + --unshallow convert to a complete repository + --update-shallow accept refs that update .git/shallow + --refmap specify fetch refmap + -4, --ipv4 use IPv4 addresses only + -6, --ipv6 use IPv6 addresses only + + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) +$ git add -u + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) +$ git commit -m 'code: вывод деления' +[master 0eeb8fa] code: вывод деления + 1 file changed, 3 insertions(+), 1 deletion(-) + + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) +$ git push +Enumerating objects: 5, done. +Counting objects: 100% (5/5), done. +Compressing objects: 100% (3/3), done. +Writing objects: 100% (3/3), 363 bytes | 181.00 KiB/s, done. +Total 3 (delta 1), reused 0 (delta 0) +remote: . Processing 1 references +remote: Processed 1 references in total +To uit.mpei.ru:NovikovDM/cs-lab02.git + 58189b1..37f4089 master -> master + + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) +$ git add -u + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) +$ git commit -m 'code: вывод максимума' +[master 4e1efcf] code: вывод максимума + 1 file changed, 7 insertions(+), 2 deletions(-) + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) +$ git push +Enumerating objects: 5, done. +Counting objects: 100% (5/5), done. +Compressing objects: 100% (3/3), done. +Writing objects: 100% (3/3), 414 bytes | 414.00 KiB/s, done. +Total 3 (delta 1), reused 0 (delta 0) +remote: . Processing 1 references +remote: Processed 1 references in total +To uit.mpei.ru:NovikovDM/cs-lab02.git + 37f4089..4e1efcf master -> master + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) +$ git log --decorate --oneline +4e1efcf (HEAD -> master, origin/master) code: вывод максимума +37f4089 code: вывод разности +58189b1 code: вывод произведения +ea9094f code: вывод разности +f02e566 code: вывод суммы +1b4a85a build: add project file +375569d code: заготовка программы + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) +$ git branch double + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) +$ git checkout double +Switched to branch 'double' + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (double) +$ git add -u + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (double) +$ git commit -m 'code: изменение типа переменных' +[double 8da0ebd] code: изменение типа переменных + 1 file changed, 1 insertion(+), 1 deletion(-) + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (double) +$ git checkout master +Switched to branch 'master' +Your branch is up to date with 'origin/master'. + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) +$ git push +To uit.mpei.ru:NovikovDM/cs-lab02.git + ! [rejected] master -> master (fetch first) +error: failed to push some refs to 'git@uit.mpei.ru:NovikovDM/cs-lab02.git' +hint: Updates were rejected because the remote contains work that you do +hint: not have locally. This is usually caused by another repository pushing +hint: to the same ref. You may want to first integrate the remote changes +hint: (e.g., 'git pull ...') before pushing again. +hint: See the 'Note about fast-forwards' in 'git push --help' for details. + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) +$ git pull +remote: Enumerating objects: 5, done. +remote: Counting objects: 100% (5/5), done. +remote: Compressing objects: 100% (3/3), done. +remote: Total 3 (delta 1), reused 0 (delta 0), pack-reused 0 +Unpacking objects: 100% (3/3), done. +From uit.mpei.ru:NovikovDM/cs-lab02 + 4e1efcf..f0a1776 master -> origin/master +Updating 4e1efcf..f0a1776 +Fast-forward + main.cpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) +$ git log --decorate --oneline +f0a1776 (HEAD -> master, origin/master) code: вывод минимума +4e1efcf code: вывод максимума +37f4089 code: вывод деления +58189b1 code: вывод произведения +ea9094f code: вывод разности +f02e566 code: вывод суммы +1b4a85a build: add project file +375569d code: заготовка программы + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) +$ git merge double +Auto-merging main.cpp +Merge made by the 'recursive' strategy. + main.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) +$ git log --decorate --oneline --all --graph +* 971ae3c (HEAD -> master) Merge branch 'double' +|\ +| * 8da0ebd (double) code: изменение типа переменных +* | f0a1776 (origin/master) code: вывод минимума +|/ +* 4e1efcf code: вывод максимума +* 37f4089 code: вывод деления +* 58189b1 code: вывод произведения +* ea9094f code: вывод разности +* f02e566 code: вывод суммы +* 1b4a85a build: add project file +* 375569d code: заготовка программы + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) +$ + + + + +bob: +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob +$ git clone git@uit.mpei.ru:NovikovDM/cs-lab02 project +Cloning into 'project'... +Enter passphrase for key '/c/Users/u111-09/.ssh/id_rsa': +remote: Enumerating objects: 12, done. +remote: Counting objects: 100% (12/12), done. +remote: Compressing objects: 100% (11/11), done. +remote: Total 12 (delta 1), reused 0 (delta 0), pack-reused 0 +Receiving objects: 100% (12/12), done. +Resolving deltas: 100% (1/1), done. + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob +$ + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob +$ cd project + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git config +usage: git config [] + +Config file location + --global use global config file + --system use system config file + --local use repository config file + --worktree use per-worktree config file + -f, --file use given config file + --blob read config from given blob object + +Action + --get get value: name [value-regex] + --get-all get all values: key [value-regex] + --get-regexp get values for regexp: name-regex [value-regex] + --get-urlmatch get value specific for the URL: section[.var] URL + --replace-all replace all matching variables: name value [value_regex] + --add add a new variable: name value + --unset remove a variable: name [value-regex] + --unset-all remove all matches: name [value-regex] + --rename-section rename section: old-name new-name + --remove-section remove a section: name + -l, --list list all + -e, --edit open an editor + --get-color find the color configured: slot [default] + --get-colorbool find the color setting: slot [stdout-is-tty] + +Type + -t, --type <> value is given this type + --bool value is "true" or "false" + --int value is decimal number + --bool-or-int value is --bool or --int + --path value is a path (file or directory name) + --expiry-date value is an expiry date + +Other + -z, --null terminate values with NUL byte + --name-only show variable names only + --includes respect include directives on lookup + --show-origin show origin of config (file, standard input, blob, command line) + --default with --get, use default value when missing entry + + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git commit -m 'code: вывод произведения' +On branch master +Your branch is up to date with 'origin/master'. + +nothing to commit, working tree clean + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git add main.cpp + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git commit -m 'code: вывод произведения' +On branch master +Your branch is up to date with 'origin/master'. + +nothing to commit, working tree clean + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git commit -m 'code: вывод произведения' +On branch master +Your branch is up to date with 'origin/master'. + +nothing to commit, working tree clean + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git log +commit ea9094fd2f1ced3bbce27b5e15ad28d4b8b3d34c (HEAD -> master, origin/master, origin/HEAD) +Author: Alice (NovikovDM) +Date: Mon Mar 13 14:38:38 2023 +0300 + + code: вывод разности + +commit f02e56655a5149c1d19cfafe2e8014b19127461e +Author: Alice (NovikovDM) +Date: Mon Mar 13 14:34:56 2023 +0300 + + code: вывод суммы + +commit 1b4a85a93e714b9992e12a78bee0d6993febb6f6 +Author: Alice (NovikovDM) +Date: Mon Mar 13 14:22:51 2023 +0300 + + build: add project file + +commit 375569df6965d47ed0e9b34b7b78a7f613970111 +Author: Alice (NovikovDM) +Date: Mon Mar 13 14:19:53 2023 +0300 + + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git add -u + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git commit -m 'code: вывод произведения' +On branch master +Your branch is up to date with 'origin/master'. + +nothing to commit, working tree clean + + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git add -u + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git commit -m 'code: вывод произведения' +[master 58189b1] code: вывод произведения + Committer: u111-09 +Your name and email address were configured automatically based +on your username and hostname. Please check that they are accurate. +You can suppress this message by setting them explicitly. Run the +following command and follow the instructions in your editor to edit +your configuration file: + + git config --global --edit + +After doing this, you may fix the identity used for this commit with: + + git commit --amend --reset-author + + 1 file changed, 2 insertions(+), 1 deletion(-) + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git push +Enter passphrase for key '/c/Users/u111-09/.ssh/id_rsa': +Enumerating objects: 5, done. +Counting objects: 100% (5/5), done. +Compressing objects: 100% (3/3), done. +Writing objects: 100% (3/3), 365 bytes | 182.00 KiB/s, done. +Total 3 (delta 1), reused 0 (delta 0) +remote: . Processing 1 references +remote: Processed 1 references in total +To uit.mpei.ru:NovikovDM/cs-lab02 + ea9094f..58189b1 master -> master + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git pull +Enter passphrase for key '/c/Users/u111-09/.ssh/id_rsa': +remote: Enumerating objects: 5, done. +remote: Counting objects: 100% (5/5), done. +remote: Compressing objects: 100% (3/3), done. +remote: Total 3 (delta 1), reused 0 (delta 0), pack-reused 0 +Unpacking objects: 100% (3/3), done. +From uit.mpei.ru:NovikovDM/cs-lab02 + 58189b1..37f4089 master -> origin/master +Updating 58189b1..37f4089 +Fast-forward + main.cpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git log +commit 37f408941ff6633c95761a56189c9a0629f4afc5 (HEAD -> master, origin/master, origin/HEAD) +Author: Alice (NovikovDM) +Date: Mon Mar 13 16:29:56 2023 +0300 + + code: вывод деления + +commit 58189b1c70b56677668e485167bad74ed7c29559 +Author: u111-09 +Date: Mon Mar 13 16:15:12 2023 +0300 + + code: вывод произведения + +commit ea9094fd2f1ced3bbce27b5e15ad28d4b8b3d34c +Author: Alice (NovikovDM) +Date: Mon Mar 13 14:38:38 2023 +0300 + + code: вывод разности + +commit f02e56655a5149c1d19cfafe2e8014b19127461e +Author: Alice (NovikovDM) +Date: Mon Mar 13 14:34:56 2023 +0300 + + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git add -u + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git commit -m 'code: вывод минимума' +[master efb07d3] code: вывод минимума + Committer: u111-09 +Your name and email address were configured automatically based +on your username and hostname. Please check that they are accurate. +You can suppress this message by setting them explicitly. Run the +following command and follow the instructions in your editor to edit +your configuration file: + + git config --global --edit + +After doing this, you may fix the identity used for this commit with: + + git commit --amend --reset-author + + 1 file changed, 5 insertions(+), 1 deletion(-) + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git push +Enter passphrase for key '/c/Users/u111-09/.ssh/id_rsa': +To uit.mpei.ru:NovikovDM/cs-lab02 + ! [rejected] master -> master (fetch first) +error: failed to push some refs to 'git@uit.mpei.ru:NovikovDM/cs-lab02' +hint: Updates were rejected because the remote contains work that you do +hint: not have locally. This is usually caused by another repository pushing +hint: to the same ref. You may want to first integrate the remote changes +hint: (e.g., 'git pull ...') before pushing again. +hint: See the 'Note about fast-forwards' in 'git push --help' for details. + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git pull +Enter passphrase for key '/c/Users/u111-09/.ssh/id_rsa': +remote: Enumerating objects: 5, done. +remote: Counting objects: 100% (5/5), done. +remote: Compressing objects: 100% (3/3), done. +remote: Total 3 (delta 1), reused 0 (delta 0), pack-reused 0 +Unpacking objects: 100% (3/3), done. +From uit.mpei.ru:NovikovDM/cs-lab02 + 37f4089..4e1efcf master -> origin/master +Auto-merging main.cpp +CONFLICT (content): Merge conflict in main.cpp +Automatic merge failed; fix conflicts and then commit the result. + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master|MERGING) +$ git log +commit efb07d32c5825786c5b8c39b2d7f687c03083d3b (HEAD -> master) +Author: u111-09 +Date: Mon Mar 13 16:49:15 2023 +0300 + + code: вывод минимума + +commit 37f408941ff6633c95761a56189c9a0629f4afc5 +Author: Alice (NovikovDM) +Date: Mon Mar 13 16:29:56 2023 +0300 + + code: вывод деления + +commit 58189b1c70b56677668e485167bad74ed7c29559 +Author: u111-09 +Date: Mon Mar 13 16:15:12 2023 +0300 + + code: вывод произведения + +commit ea9094fd2f1ced3bbce27b5e15ad28d4b8b3d34c +Author: Alice (NovikovDM) +Date: Mon Mar 13 14:38:38 2023 +0300 + + code: вывод разности + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master|MERGING) +$ git pull +error: Pulling is not possible because you have unmerged files. +hint: Fix them up in the work tree, and then use 'git add/rm ' +hint: as appropriate to mark resolution and make a commit. +fatal: Exiting because of an unresolved conflict. + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master|MERGING) +$ git log --decorate --oneline +efb07d3 (HEAD -> master) code: вывод минимума +37f4089 code: вывод деления +58189b1 code: вывод произведения +ea9094f code: вывод разности +f02e566 code: вывод суммы +1b4a85a build: add project file +375569d code: заготовка программы + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master|MERGING) +$ git pull +error: Pulling is not possible because you have unmerged files. +hint: Fix them up in the work tree, and then use 'git add/rm ' +hint: as appropriate to mark resolution and make a commit. +fatal: Exiting because of an unresolved conflict. + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master|MERGING) +$ git add -u + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master|MERGING) +$ git add -u + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master|MERGING) +$ git commit -m 'code: вывод минимума' +[master a4852ff] code: вывод минимума + Committer: u111-09 +Your name and email address were configured automatically based +on your username and hostname. Please check that they are accurate. +You can suppress this message by setting them explicitly. Run the +following command and follow the instructions in your editor to edit +your configuration file: + + git config --global --edit + +After doing this, you may fix the identity used for this commit with: + + git commit --amend --reset-author + + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git pull +Enter passphrase for key '/c/Users/u111-09/.ssh/id_rsa': +Already up to date. + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git log --decorate --oneline +a4852ff (HEAD -> master) code: вывод минимума +efb07d3 code: вывод минимума +4e1efcf (origin/master, origin/HEAD) code: вывод максимума +37f4089 code: вывод деления +58189b1 code: вывод произведения +ea9094f code: вывод разности +f02e566 code: вывод суммы +1b4a85a build: add project file +375569d code: заготовка программы + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git reset --hard efb07d3 +HEAD is now at efb07d3 code: вывод минимума + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git log --decorate --oneline +efb07d3 (HEAD -> master) code: вывод минимума +37f4089 code: вывод деления +58189b1 code: вывод произведения +ea9094f code: вывод разности +f02e566 code: вывод суммы +1b4a85a build: add project file +375569d code: заготовка программы + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git reset --hard 37f4089 +HEAD is now at 37f4089 code: вывод деления + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git log --decorate --oneline +37f4089 (HEAD -> master) code: вывод деления +58189b1 code: вывод произведения +ea9094f code: вывод разности +f02e566 code: вывод суммы +1b4a85a build: add project file +375569d code: заготовка программы + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git pull +Enter passphrase for key '/c/Users/u111-09/.ssh/id_rsa': +Updating 37f4089..4e1efcf +Fast-forward + main.cpp | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git log --decorate --oneline +4e1efcf (HEAD -> master, origin/master, origin/HEAD) code: вывод максимума +37f4089 code: вывод деления +58189b1 code: вывод произведения +ea9094f code: вывод разности +f02e566 code: вывод суммы +1b4a85a build: add project file +375569d code: заготовка программы + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git add -u + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git commit -m 'code: вывод минимума' +On branch master +Your branch is up to date with 'origin/master'. + +nothing to commit, working tree clean + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git log --decorate --oneline +4e1efcf (HEAD -> master, origin/master, origin/HEAD) code: вывод максимума +37f4089 code: вывод деления +58189b1 code: вывод произведения +ea9094f code: вывод разности +f02e566 code: вывод суммы +1b4a85a build: add project file +375569d code: заготовка программы + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git reset --hard 37f4089 +HEAD is now at 37f4089 code: вывод деления + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git log --decorate --oneline +37f4089 (HEAD -> master) code: вывод деления +58189b1 code: вывод произведения +ea9094f code: вывод разности +f02e566 code: вывод суммы +1b4a85a build: add project file +375569d code: заготовка программы + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git add -u + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git commit -m 'code: вывод минимума' +On branch master +Your branch is behind 'origin/master' by 1 commit, and can be fast-forwarded. + (use "git pull" to update your local branch) + +nothing to commit, working tree clean + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git log --decorate --oneline +37f4089 (HEAD -> master) code: вывод деления +58189b1 code: вывод произведения +ea9094f code: вывод разности +f02e566 code: вывод суммы +1b4a85a build: add project file +375569d code: заготовка программы + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git add -u + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git commit -m 'code: вывод минимума' +On branch master +Your branch is behind 'origin/master' by 1 commit, and can be fast-forwarded. + (use "git pull" to update your local branch) + +nothing to commit, working tree clean + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git pull +Enter passphrase for key '/c/Users/u111-09/.ssh/id_rsa': +Updating 37f4089..4e1efcf +Fast-forward + main.cpp | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git log --decorate --oneline +4e1efcf (HEAD -> master, origin/master, origin/HEAD) code: вывод максимума +37f4089 code: вывод деления +58189b1 code: вывод произведения +ea9094f code: вывод разности +f02e566 code: вывод суммы +1b4a85a build: add project file +375569d code: заготовка программы + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git add -u + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git commit -m 'code: вывод минимума' +On branch master +Your branch is up to date with 'origin/master'. + +nothing to commit, working tree clean + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git rebase origin/master +Current branch master is up to date. + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git log --decorate --oneline +4e1efcf (HEAD -> master, origin/master, origin/HEAD) code: вывод максимума +37f4089 code: вывод деления +58189b1 code: вывод произведения +ea9094f code: вывод разности +f02e566 code: вывод суммы +1b4a85a build: add project file +375569d code: заготовка программы + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git add -u + + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git commit -m 'code: вывод минимума' +[master f0a1776] code: вывод минимума + Committer: u111-09 +Your name and email address were configured automatically based +on your username and hostname. Please check that they are accurate. +You can suppress this message by setting them explicitly. Run the +following command and follow the instructions in your editor to edit +your configuration file: + + git config --global --edit + +After doing this, you may fix the identity used for this commit with: + + git commit --amend --reset-author + + 1 file changed, 2 insertions(+), 1 deletion(-) + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git rebase origin/master +Current branch master is up to date. + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git log --decorate --oneline +f0a1776 (HEAD -> master) code: вывод минимума +4e1efcf (origin/master, origin/HEAD) code: вывод максимума +37f4089 code: вывод деления +58189b1 code: вывод произведения +ea9094f code: вывод разности +f02e566 code: вывод суммы +1b4a85a build: add project file +375569d code: заготовка программы + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ git push +Enter passphrase for key '/c/Users/u111-09/.ssh/id_rsa': +Enumerating objects: 5, done. +Counting objects: 100% (5/5), done. +Compressing objects: 100% (3/3), done. +Writing objects: 100% (3/3), 356 bytes | 356.00 KiB/s, done. +Total 3 (delta 1), reused 0 (delta 0) +remote: . Processing 1 references +remote: Processed 1 references in total +To uit.mpei.ru:NovikovDM/cs-lab02 + 4e1efcf..f0a1776 master -> master + +u111-09@PROG-29 MINGW32 ~/Desktop/lab02/bob/project (master) +$ +