diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8a30d25 --- /dev/null +++ b/.gitignore @@ -0,0 +1,398 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.tlog +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio 6 auto-generated project file (contains which files were open etc.) +*.vbp + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files +*.ncb +*.aps + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# Visual Studio History (VSHistory) files +.vshistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp + +# JetBrains Rider +*.sln.iml diff --git a/отчёт.txt b/отчёт.txt new file mode 100644 index 0000000..826dd14 --- /dev/null +++ b/отчёт.txt @@ -0,0 +1,1763 @@ + +/c/Users/Andrey/Desktop/lab02 + +$ mkdir alice + +Создание папки alice + +/c/Users/Andrey/Desktop/lab02 + +$ mkdir bob + +Аналогично + +/c/Users/Andrey/Desktop/lab02 + +$ cd alice + +Переход в подкаталог alice + +/c/Users/Andrey/Desktop/lab02/alice + +$ mkdir project + +Создание папки project + +/c/Users/Andrey/Desktop/lab02/alice + +$ cd project + +Переход в подкаталог project + +/c/Users/Andrey/Desktop/lab02/alice/project + +$ cd .. + +Переход вверх по ветке + +/c/Users/Andrey/Desktop/lab02/alice + +$ cd project + +Переход в каталог project + +/c/Users/Andrey/Desktop/lab02/alice/project + +$ git init + +Initialized empty Git repository in C:/Users/vrumy/OneDrive/Рабочий стол/Lab02/alice/project/.git/ + +Инициализация пустого репозитория + +/c/Users/Andrey/Desktop/lab02/alice/project (master) + +$ git branch -m main + +Изменение имени ветви на main + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ ls -A + +.git/ + +Просмотр каталога .git + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git config user.name 'Alice (RumyantsevVA)' + +/c/Users/Andrey/Desktop/lab02/alice (main) + +$ git config user.email 'RumiantsevVadA@mpei.ru' + +Настройка репозитария + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git status + +On branch main (на ветке …) + + + +No commits yet (нет отслеживаемых файлов) + + + +Untracked files: (неотслеживаемые файлы) + + (use "git add ..." to include in what will be committed) + + ./ + + + +nothing added to commit but untracked files present (use "git add" to track) + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git add project.cpp + +Начато отслеживание кода программы + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git status + +On branch main (на ветке …) + + + +No commits yet + + + +Changes to be committed: изменения, которые необходимо зафиксировать) + + (use "git rm --cached ..." to unstage) + + new file: project.cpp + + + +Untracked files: (неотслеживаемые файлы) + + (use "git add ..." to include in what will be committed) + + .vs/ + + project.sln + + project.vcxproj + + project.vcxproj.filters + + project.vcxproj.user + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git status + +On branch main + +Changes not staged for commit: (незафиксированные изменения) + + (use "git add ..." to update what will be committed) + + (use "git restore ..." to discard changes in working directory) + + modified: project.cpp (измененные файлы) + + + +Untracked files: (неотслеживаемые файлы) + + (use "git add ..." to include in what will be committed) + + .vs/ + + project.sln + + project.vcxproj + + project.vcxproj.filters + + project.vcxproj.user + + x64/ + + + +no changes added to commit (use "git add" and/or "git commit -a") + + + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git add project.cpp + +Начало отслеживания файла … + + + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git commit -m "ввод чисел" Присвоение имени файлу + +[main faf0f0d] ввод чисел + +1 file changed, 9 insertions(+), 3 deletions(-) кол-во изменений (добавления, удаления) + + + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git add -u начало отслеживания всех измененных файлов + + + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git commit -m "вывод суммы" + +[main 46b61eb] вывод суммы присвоение имени файлу + +1 file changed, 2 insertions(+), 1 deletion(-) + + + +Игнорирование файлов: + +Visual studio самостоятельно создает .gitignore файл + + + +Журнал гита + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git log + +commit 628a92f1619684fcacff53fdb8858eeff5c2a213 (HEAD -> main) + +Author: VadRum + +Date: Wed Sep 6 10:01:07 2023 +0300 + + + + все изменения + + + +commit 46b61eb00f02bac5915c583ee84ee61caf0c55de + +Author: VadRum + +Date: Wed Sep 6 09:35:27 2023 +0300 + + + + вывод суммы + + + +commit faf0f0d513689d4b155757f0ad11d6953550c3be + +Author: VadRum + +Date: Wed Sep 6 09:28:05 2023 +0300 + + + + ввод чисел + + + +commit cc31c9926c7f93902bf1303c84e96e71d7813ac8 + +Author: VadRum + +Date: Thu Aug 31 20:15:17 2023 +0300 + + + + code: заготовка программы + +желтым показаны изменения файла, который отслеивается + + + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git log --stat + +commit 628a92f1619684fcacff53fdb8858eeff5c2a213 (HEAD -> main) + +Author: VadRum + +Date: Wed Sep 6 10:01:07 2023 +0300 + + + + все изменения + + + +project/project.cpp | 4 +++- + +1 file changed, 3 insertions(+), 1 deletion(-) + + + +commit 46b61eb00f02bac5915c583ee84ee61caf0c55de + +Author: VadRum + +Date: Wed Sep 6 09:35:27 2023 +0300 + + + + вывод суммы + + + +project/project.cpp | 3 ++- + +1 file changed, 2 insertions(+), 1 deletion(-) + + + +commit faf0f0d513689d4b155757f0ad11d6953550c3be + +Author: VadRum + +Date: Wed Sep 6 09:28:05 2023 +0300 + + + + ввод чисел + + + +project/project.cpp | 12 +++++++++--- + +1 file changed, 9 insertions(+), 3 deletions(-) + + + +commit cc31c9926c7f93902bf1303c84e96e71d7813ac8 + +Author: VadRum + +Date: Thu Aug 31 20:15:17 2023 +0300 + + + + code: заготовка программы + + + +показаны конкретные изменения файла, плюс дата, время и хеш каждого коммита + + + + + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git log --oneline --decorate + +628a92f (HEAD -> main) все изменения + +46b61eb вывод суммы + +faf0f0d ввод чисел + +cc31c99 code: заготовка программы + + + +показаны изменения в компактном виде + + + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git log --oneline --decorate --all --graph + +* 628a92f (HEAD -> main) все изменения + +* 46b61eb вывод суммы + +* faf0f0d ввод чисел + +* cc31c99 code: заготовка программы + + + +Изменения в компактном виде для всех веток + + + + + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git log project.cpp + +commit 628a92f1619684fcacff53fdb8858eeff5c2a213 (HEAD -> main) + +Author: VadRum + +Date: Wed Sep 6 10:01:07 2023 +0300 + + + + все изменения + + + +commit 46b61eb00f02bac5915c583ee84ee61caf0c55de + +Author: VadRum + +Date: Wed Sep 6 09:35:27 2023 +0300 + + + + вывод суммы + + + +commit faf0f0d513689d4b155757f0ad11d6953550c3be + +Author: VadRum + +Date: Wed Sep 6 09:28:05 2023 +0300 + + + + ввод чисел + + + +commit cc31c9926c7f93902bf1303c84e96e71d7813ac8 + +Author: VadRum + +Date: Thu Aug 31 20:15:17 2023 +0300 + + + + code: заготовка программы + + + +изменения, затрагивающие файл project.cpp + + + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git log --grep "build" + +Поиск коммитов по теме build + + + +Просмотр коммитов + + + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git show HEAD + +commit 628a92f1619684fcacff53fdb8858eeff5c2a213 (HEAD -> main) + +Author: VadRum + +Date: Wed Sep 6 10:01:07 2023 +0300 + + + + все изменения + + + +diff --git a/project/project.cpp b/project/project.cpp + +index acb0195..6596c03 100644 + +--- a/project/project.cpp + ++++ b/project/project.cpp + +@@ -12,7 +12,9 @@ int main() + + cout << endl; + + cin >> B; + + cout << endl; + +- cout << A + B; + ++ cout << "A + B = " << A + B << '\n' + ++ << "A - B = " << A - B << '\n'; + ++ + + + +} + + + +Просмотр текущего состояния файла + + + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git show 46b61eb + +commit 46b61eb00f02bac5915c583ee84ee61caf0c55de + +Author: VadRum + +Date: Wed Sep 6 09:35:27 2023 +0300 + + + + вывод суммы + + + +diff --git a/project/project.cpp b/project/project.cpp + +index 0b0df77..acb0195 100644 + +--- a/project/project.cpp + ++++ b/project/project.cpp + +@@ -2,6 +2,7 @@ + +// + + + +#include + ++#include + +using namespace std; + +int main() + +{ + +@@ -11,7 +12,7 @@ int main() + + cout << endl; + + cin >> B; + + cout << endl; + +- + ++ cout << A + B; + + + +} + + + +Просмотр предпоследнего коммита по хешу + + + + + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git show HEAD~1 + +commit 46b61eb00f02bac5915c583ee84ee61caf0c55de + +Author: VadRum + +Date: Wed Sep 6 09:35:27 2023 +0300 + + + + вывод суммы + + + +diff --git a/project/project.cpp b/project/project.cpp + +index 0b0df77..acb0195 100644 + +--- a/project/project.cpp + ++++ b/project/project.cpp + +@@ -2,6 +2,7 @@ + +// + + + +#include + ++#include + +using namespace std; + +int main() + +{ + +@@ -11,7 +12,7 @@ int main() + + cout << endl; + + cin >> B; + + cout << endl; + +- + ++ cout << A + B; + + + +} + + + + + +Просмотр предпоследнего коммита с помощью head~1 + + + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git show main~1 + +commit 46b61eb00f02bac5915c583ee84ee61caf0c55de + +Author: VadRum + +Date: Wed Sep 6 09:35:27 2023 +0300 + + + + вывод суммы + + + +diff --git a/project/project.cpp b/project/project.cpp + +index 0b0df77..acb0195 100644 + +--- a/project/project.cpp + ++++ b/project/project.cpp + +@@ -2,6 +2,7 @@ + +// + + + +#include + ++#include + +using namespace std; + +int main() + +{ + +@@ -11,7 +12,7 @@ int main() + + cout << endl; + + cin >> B; + + cout << endl; + +- + ++ cout << A + B; + + + +} + +Просмотр предпоследнего коммита по ветке + + + + + + + +Просмотр изменений + + + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git diff + +diff --git a/project/project.cpp b/project/project.cpp + +index 6596c03..1054c24 100644 + +--- a/project/project.cpp + ++++ b/project/project.cpp + +@@ -13,7 +13,8 @@ int main() + + cin >> B; + + cout << endl; + + cout << "A + B = " << A + B << '\n' + +- << "A - B = " << A - B << '\n'; измененная строка (стерты некоторые + ++ << "A - B = " << A - B << '\n' знаки) (с -) + ++ << "A*B=" << A * B << '\n'; добавленные и измененные строки (с +) + + + +Изменения от последнего коммита до последней версии + + + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git diff HEAD~2 + +diff --git a/project/.gitignore b/project/.gitignore + +new file mode 100644 + +index 0000000..0a079b6 + +--- /dev/null + ++++ b/project/.gitignore + +@@ -0,0 +1,2 @@ + ++/bin + ++/obj + +\ No newline at end of file + +diff --git a/project/project.cpp b/project/project.cpp + +index 0b0df77..1054c24 100644 + +--- a/project/project.cpp + ++++ b/project/project.cpp + +@@ -2,6 +2,7 @@ + +// + + + +#include + ++#include + +using namespace std; + +int main() + +{ + +@@ -11,6 +12,9 @@ int main() + + cout << endl; + + cin >> B; + + cout << endl; + ++ cout << "A + B = " << A + B << '\n' + ++ << "A - B = " << A - B << '\n' + ++ << "A*B=" << A * B << '\n'; + + + + + +} + + + +Показывает изменения от пред-предпоследнего коммита + +Файлик с /bin и /obj я удалил, т.к. visual studio самостоятельно создает .gitignore файлик + + + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git diff HEAD~2 HEAD + +diff --git a/project/project.cpp b/project/project.cpp + +index 0b0df77..6596c03 100644 + +--- a/project/project.cpp + ++++ b/project/project.cpp + +@@ -2,6 +2,7 @@ + +// + + + +#include + ++#include + +using namespace std; + +int main() + +{ + +@@ -11,6 +12,8 @@ int main() + + cout << endl; + + cin >> B; + + cout << endl; + ++ cout << "A + B = " << A + B << '\n' + ++ << "A - B = " << A - B << '\n'; + + + + + +} + + + +Разница между пред-предпоследним коммитом и последним коммитом + + + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git diff HEAD~2 HEAD + +diff --git a/project/project.cpp b/project/project.cpp + +index a60f2ae..c750b7f 100644 + +--- a/project/project.cpp + ++++ b/project/project.cpp + +@@ -2,10 +2,18 @@ + +// + + + +#include + ++#include + ++using namespace std; + + + +int main() + +{ + +- std::cout << "Hello World!\n"; + ++ cout << "Enter A and B: "; + ++ int a, b; + ++ cin >> a >> b; + ++ cout << "A + B = " << a + b << '\n' + ++ << "A - B = " << a - b << '\n'; + ++ + ++ + +} + + + +Различия между первым и последним коммитом + + + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git add -u + + + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git commit -m "code:вывод произведения" + +[main cf6ab4d] code:вывод произведения + +1 file changed, 2 insertions(+), 1 deletion(-) + +Коммит вывода произведения + + + + + +Откат изменений + + + + + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git reset --hard HEAD~1 + +HEAD is now at b907391 code: сумма и разность + +Откат до предыдущего коммита + +Изменил функцию, добавив // you may type whatever you want + + + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git checkout HEAD -- project.cpp + + + +Откат до последней отслеживаемой версии + + + + + +Ssh + + + + + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ ssh-keygen + +Generating public/private rsa key pair. + +Enter file in which to save the key (/c/Users/vrumy/.ssh/id_rsa): Место сохранения ssh ключа + +Enter passphrase (empty for no passphrase): Кодовая фраза + +Enter same passphrase again: Кодовая фраза + +Your identification has been saved in + +Your public key has been saved in .pub место сохранения публичного ключа + +The key fingerprint is: + +SHA256:fbw6o6/bKy77s8EfRynkdwRDEbMHbQCB9nC9fvcAAbc vrumy@DESKTOP-3J6E873 + +The key's randomart image is: + ++---[RSA 3072]----+ + +| .+*@= | + +| + ..oBo | + +| . +. E+o | + +| +..o+ | + +| S +.*.. | + +| . =.oo .| + +| o . o. o.| + +| . o+o+ .| + +| .=BO*+ | + ++----[SHA256]-----+ + + + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ eval $(ssh-agent -s) + +Agent pid 1665 + +Запуск агента + + + + + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ ssh-add + +Enter passphrase for /c/Users/vrumy/.ssh/id_rsa: + +Identity added: /c/Users/vrumy/.ssh/id_rsa (vrumy@DESKTOP-3J6E873) + + + +Загрузка ключа + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ cat ~/.ssh/id_rsa.pub + +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC4KrTxRLqH2oWiFU6V1nfk+Sr8G/y2pUeED25CNsOMdkcaNFIjdHwzPbKLx4WTNbL6nyugWTWZ1FIPK6+CUrjw0ASML1DoNXhhSfs0uiuLoV7SHZN+OQyfoLDw39CnnMbM8gNF2ApE7FF4XI7KLZBsHTeOdr0zsykXA/9ufGQbeqeEYx7ITl0QDdPfqZDFfyWMOY0DGBEuG9LIIEkwBU5+2uM3S5ruMv23VmZp/5oIVZQzL/VNjmOabUeDwU48COG21/Cm7M12fh7tVZQmNWFDPdfEAPhCZMkpMv7b9+7FXPaCzhkkFWb8xxaBafxWp999JvpTbFDGySMz/QirGZYWfC+ezysiE7xUm78FbqZTYkcjH/kxqdx0wqvbLayCMHDfQ12PeRoPXsjYt9g8/wa/PitV7t6XUqPa0KgDYX4xdhOb5Zk5SxmDv80jOWkdqJuQd44XzVqkyfmQCFC9nZOihcQckYr0axHjsZ+t12IM+lzwlldwlju7RBmDHN9bPkk= vrumy@DESKTOP-3J6E873 + + + +вывод ключа текстом + + + +загрузка проекта на сервер + + + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git remote add origin git@uit.mpei.ru:RumyantsevVA/cs-lab02.git + + + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git push -u origin main + +Enumerating objects: 3, done. + +Counting objects: 100% (3/3), done. + +Delta compression using up to 8 threads + +Compressing objects: 100% (2/2), done. + +Writing objects: 100% (3/3), 1.01 KiB | 345.00 KiB/s, done. + +Total 3 (delta 0), reused 0 (delta 0), pack-reused 0 + +remote: . Processing 1 references + +remote: Processed 1 references in total + +To uit.mpei.ru:RumyantsevVA/cs-lab02.git + +* [new branch] main -> main + +branch 'main' set up to track 'origin/main' + +работа на машине Боба: + + + +/c/Users/Andrey/Desktop/lab02/bob + +$ git clone git@uit.mpei.ru:RumyantsevVA/cs-lab02.git + +Cloning into 'cs-lab02'... + +Enter passphrase for key '/c/Users/vrumy/.ssh/id_rsa': + +remote: Enumerating objects: 6, done. + +remote: Counting objects: 100% (6/6), done. + +remote: Compressing objects: 100% (5/5), done. + +remote: Total 6 (delta 0), reused 0 (delta 0), pack-reused 0 + +Receiving objects: 100% (6/6), 4.21 KiB | 1.40 MiB/s, done. + + + +Клонирование репозитария + + + +Настройка конфига для боба + +/c/Users/Andrey/Desktop/lab02/bob/project (main) + +$ git config user.name 'Bob (RumyantsevVA)' + + + +/c/Users/Andrey/Desktop/lab02/bob/project (main) + +$ git config user.email 'RumiantsevVadA@mpei.ru' + + + +Коммит изменений (вывод произведения) + +/c/Users/Andrey/Desktop/lab02/bob/project (main) + +$ git add project.cpp + + + +/c/Users/Andrey/Desktop/lab02/bob/project (main) + +$ git commit -m "code: Вывод произведения" + +[main de15672] code: Вывод произведения + +1 file changed, 1 insertion(+) + + + +Отправка на сервер с машины боба + +/c/Users/Andrey/Desktop/lab02/bob/project (main) + +$ git push + +Enter passphrase for key '/c/Users/vrumy/.ssh/id_rsa': + +Enumerating objects: 5, done. + +Counting objects: 100% (5/5), done. + +Delta compression using up to 8 threads + +Compressing objects: 100% (3/3), done. + +Writing objects: 100% (3/3), 395 bytes | 395.00 KiB/s, done. + +Total 3 (delta 1), reused 0 (delta 0), pack-reused 0 + +remote: . Processing 1 references + +remote: Processed 1 references in total + +To uit.mpei.ru:RumyantsevVA/cs-lab02.git + + 87a5a27..de15672 main -> main + + + +Загрузка изменений на машину Алисы + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git fetch + +Enter passphrase for key '/c/Users/vrumy/.ssh/id_rsa': + +remote: Enumerating objects: 8, done. + +remote: Counting objects: 100% (8/8), done. + +remote: Compressing objects: 100% (6/6), done. + +remote: Total 6 (delta 1), reused 0 (delta 0), pack-reused 0 + +Unpacking objects: 100% (6/6), 3.56 KiB | 165.00 KiB/s, done. + +From uit.mpei.ru:RumyantsevVA/cs-lab02 + + fc46131..de15672 main -> origin/main + + + + + +проверка истории веток + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git log --oneline --decorate --all --graph + +* de15672 (origin/main) code: Вывод произведения + +* 87a5a27 Загрузил(а) файлы в '' + +* fc46131 (HEAD -> main) code: вывод произведения + + + + + +Продвижение ветки main к скачанной версии + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git pull --ff-only + +Enter passphrase for key '/c/Users/vrumy/.ssh/id_rsa': + +Updating fc46131..de15672 + +Fast-forward + +VisualStudio.gitignore | 398 +++++++++++++++++++++++++++++++++++++++++++++++++ + +project.cpp | 1 + + +2 files changed, 399 insertions(+) + +create mode 100644 VisualStudio.gitignore + + + + + +изменение кода с машины Alice + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git add project.cpp + + + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git commit -m "code: деление" + +[main e09320f] code: деление + +1 file changed, 4 insertions(+), 2 deletions(-) + + + +Отправление изменений в репозиторий + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git push + +Enter passphrase for key '/c/Users/vrumy/.ssh/id_rsa': + +Enumerating objects: 5, done. + +Counting objects: 100% (5/5), done. + +Delta compression using up to 8 threads + +Compressing objects: 100% (3/3), done. + +Writing objects: 100% (3/3), 389 bytes | 389.00 KiB/s, done. + +Total 3 (delta 1), reused 0 (delta 0), pack-reused 0 + +remote: . Processing 1 references + +remote: Processed 1 references in total + +To uit.mpei.ru:RumyantsevVA/cs-lab02.git + + de15672..e09320f main -> main + + + +проверка на соответствие на машине Боба + +/c/Users/Andrey/Desktop/lab02/bob/project (main) + +$ git log --oneline --decorate --all --graph + +* e09320f (origin/main, origin/HEAD) code: деление + +* de15672 (HEAD -> main) code: Вывод произведения + +* 87a5a27 Загрузил(а) файлы в '' + +* fc46131 code: вывод произведения + + + + + +/c/Users/Andrey/Desktop/lab02/bob/project (main) + +$ git pull --ff-only + +Enter passphrase for key '/c/Users/vrumy/.ssh/id_rsa': + +error: Your local changes to the following files would be overwritten by merge: + + project.cpp + +Please commit your changes or stash them before you merge. + +Aborting + +Updating de15672..e09320f + +Обновление до последней версии + + + +Вывод максимума с машины Alice + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git add project.cpp + + + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git commit -m "code: максимум" + +[main 5c686ff] code: максимум + +1 file changed, 8 insertions(+), 1 deletion(-) + + + +Загрузка кода Alice + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git push + +Enter passphrase for key '/c/Users/vrumy/.ssh/id_rsa': + +Enumerating objects: 5, done. + +Counting objects: 100% (5/5), done. + +Delta compression using up to 8 threads + +Compressing objects: 100% (3/3), done. + +Writing objects: 100% (3/3), 398 bytes | 398.00 KiB/s, done. + +Total 3 (delta 1), reused 0 (delta 0), pack-reused 0 + +remote: . Processing 1 references + +remote: Processed 1 references in total + +To uit.mpei.ru:RumyantsevVA/cs-lab02.git + + e09320f..5c686ff main -> main + + + +изменение кода с машины боба + +/c/Users/Andrey/Desktop/lab02/bob/project (main) + +$ git add project.cpp + + + +/c/Users/Andrey/Desktop/lab02/bob/project (main) + +$ git commit -m "code: минимум" + +[main 9b0ec32] code: минимум + +1 file changed, 11 insertions(+), 4 deletions(-) + + + + + +Попытка отправить изменения боба + +/c/Users/Andrey/Desktop/lab02/bob/project (main) + +$ git push + +Enter passphrase for key '/c/Users/vrumy/.ssh/id_rsa': + +To uit.mpei.ru:RumyantsevVA/cs-lab02.git + +! [rejected] main -> main (fetch first) + +error: failed to push some refs to 'uit.mpei.ru:RumyantsevVA/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. + + + +Загрузка кода с гитхаба от лица боба + +/c/Users/Andrey/Desktop/lab02/bob/project (main) + +$ git fetch + +Enter passphrase for key '/c/Users/vrumy/.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), 378 bytes | 8.00 KiB/s, done. + +From uit.mpei.ru:RumyantsevVA/cs-lab02 + + e09320f..5c686ff main -> origin/main + + + + + +расхождение веток локального глобального репозитариев + +/c/Users/Andrey/Desktop/lab02/bob/project (main) + +$ git log --oneline --decorate --all --graph + +* 9b0ec32 (HEAD -> main) code: минимум + +| * 5c686ff (origin/main, origin/HEAD) code: максимум + +| * e09320f code: деление + +|/ + +* de15672 code: Вывод произведения + +* 87a5a27 Загрузил(а) файлы в '' + +* fc46131 code: вывод произведения + + + +Попытка перемещения коммита боба поверх коммита Alice + +/c/Users/Andrey/Desktop/lab02/bob/project (main) + +$ git rebase origin/main + +Auto-merging project.cpp + +CONFLICT (content): Merge conflict in project.cpp + +error: could not apply 9b0ec32... code: минимум + +hint: Resolve all conflicts manually, mark them as resolved with + +hint: "git add/rm ", then run "git rebase --continue". + +hint: You can instead skip this commit: run "git rebase --skip". + +hint: To abort and get back to the state before "git rebase", run "git rebase --abort". + +Could not apply 9b0ec32... code: минимум + + + +В программе появились метки конфликтов + + + +/c/Users/Andrey/Desktop/lab02/bob/project (main|REBASE 1/1) + +$ git add project.cpp + + + +/c/Users/Andrey/Desktop/lab02/bob/project (main|REBASE 1/1) + +$ git rebase --continue + +[detached HEAD 36b64ed] code: минимум + +1 file changed, 8 insertions(+), 2 deletions(-) + +Successfully rebased and updated refs/heads/main. + + + + + +Изменения зафиксированы + + + +Отправка изменений на сервер + +/c/Users/Andrey/Desktop/lab02/bob/project (main) + +$ git push + +Enter passphrase for key '/c/Users/vrumy/.ssh/id_rsa': + +Enumerating objects: 5, done. + +Counting objects: 100% (5/5), done. + +Delta compression using up to 8 threads + +Compressing objects: 100% (3/3), done. + +Writing objects: 100% (3/3), 380 bytes | 380.00 KiB/s, done. + +Total 3 (delta 1), reused 0 (delta 0), pack-reused 0 + +remote: . Processing 1 references + +remote: Processed 1 references in total + +To uit.mpei.ru:RumyantsevVA/cs-lab02.git + + 5c686ff..36b64ed main -> main + + + + + +Создание ветки double + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git branch double + + + +Переключение на ветку double + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git checkout double + +Switched to branch 'double' + + + + + +Изменение типа чисел и коммит изменения + +/c/Users/Andrey/Desktop/lab02/alice/project (double) + +$ git add project.cpp + + + +/c/Users/Andrey/Desktop/lab02/alice/project (double) + +$ git commit -m "code: действительные числа" + +[double 595d3dc] code: действительные числа + +1 file changed, 1 insertion(+), 1 deletion(-) + + + +Переключение на ветку main + +/c/Users/Andrey/Desktop/lab02/alice/project (double) + +$ git checkout main + +Switched to branch 'main' + +Your branch is up to date with 'origin/main'. + + + +Синхронизация кода на машине Alice с сервером + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git fetch + +Enter passphrase for key '/c/Users/vrumy/.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), 360 bytes | 7.00 KiB/s, done. + +From uit.mpei.ru:RumyantsevVA/cs-lab02 + + 5c686ff..36b64ed main -> origin/main + + + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git pull --ff-only + +Enter passphrase for key '/c/Users/vrumy/.ssh/id_rsa': + +Updating 5c686ff..36b64ed + +Fast-forward + +project.cpp | 10 ++++++++-- + +1 file changed, 8 insertions(+), 2 deletions(-) + + + + + +Информация по веткам: + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git log --oneline --decorate --all --graph + +* 595d3dc (double) code: действительные числа новый тип данных + +| * 36b64ed (HEAD -> main, origin/main) code: минимум вывод минимума + +|/ + +* 5c686ff code: максимум вывод максимума + +* e09320f code: деление вывод деления + +* de15672 code: Вывод произведения + +* 87a5a27 Загрузил(а) файлы в '' + +* fc46131 code: вывод произведения + + + + + + + +Слитие двух веток в одну + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git merge double + +Auto-merging project.cpp + +Merge made by the 'ort' strategy. + +project.cpp | 2 +- + +1 file changed, 1 insertion(+), 1 deletion(-) + + + + + +Отправка изменений на сервер + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git push + +Enter passphrase for key '/c/Users/vrumy/.ssh/id_rsa': + +Enumerating objects: 10, done. + +Counting objects: 100% (10/10), done. + +Delta compression using up to 8 threads + +Compressing objects: 100% (6/6), done. + +Writing objects: 100% (6/6), 741 bytes | 370.00 KiB/s, done. + +Total 6 (delta 2), reused 0 (delta 0), pack-reused 0 + +remote: . Processing 1 references + +remote: Processed 1 references in total + +To uit.mpei.ru:RumyantsevVA/cs-lab02.git + + 36b64ed..0f52409 main -> main + + + + + +История всех веток + + + +/c/Users/Andrey/Desktop/lab02/alice/project (main) + +$ git log --oneline --decorate --all –-graph + +* 0f52409 (HEAD -> main, origin/main) Merge branch 'double' слияние веток + +|\ + +| * 595d3dc (double) code: действительные числа + +* | 36b64ed code: минимум + +|/ + +* 5c686ff code: максимум + +* e09320f code: деление + +* de15672 code: Вывод произведения + +* 87a5a27 Загрузил(а) файлы в '' + +* fc46131 code: вывод произведения + + + + + + + + + + + + +