Вы не можете выбрать более 25 тем
Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
|
1 год назад | |
---|---|---|
.gitignore | 1 год назад | |
README.txt | 1 год назад | |
main.cpp | 1 год назад | |
project.vcxproj | 1 год назад |
README.txt
1. Создал lab02, запустил Git Bash, приглашение:
uprkt@uprktk MINGW64 ~/Desktop/lab02
$
2. Проверил содержимое через ls; пусто:
uprkt@uprktk MINGW64 ~/Desktop/lab02
$ ls
uprkt@uprktk MINGW64 ~/Desktop/lab02
$
3. Создал папки alice, bob:
uprkt@uprktk MINGW64 ~/Desktop/lab02
$ mkdir alice
uprkt@uprktk MINGW64 ~/Desktop/lab02
$ mkdir bob
uprkt@uprktk MINGW64 ~/Desktop/lab02
$ cd alice
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice
$ mkdir project
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice
$ cd project
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project
$ cd ..
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice
$ cd project
4. Создал проект VS
5. Инициализировал git:
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project
$ git init
Initialized empty Git repository in C:/Users/uprkt/Desktop/lab02/alice/project/.git/
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (master)
$
Git создал ветвь 'master'.
Решил сменить имя ветви на 'main' после первого коммита.
6. Настроил пользователя:
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (master)
$ git config user.name 'Alice (MamakinYR)'
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (master)
$ git config user.email 'MamakinYR@mpei.ru'
7. Проверил содержимое 'project':
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (master)
$ ls
main.cpp project.vcxproj project.vcxproj.user
project.sln project.vcxproj.filters x64/
8. Проверил статус:
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (master)
$ git status
On branch master // В ветке master
No commits yet // Коммитов в этой ветке пока не было
Untracked files: // Файлы, которые не отслеживаются
(use "git add <file>..." to include in what will be committed)
.vs/
main.cpp
project.sln
project.vcxproj
project.vcxproj.filters
project.vcxproj.user
x64/
nothing added to commit but untracked files present (use "git add" to track) // В коммит ничего не добавлено кроме неотслеживаемых файлов
9. Добавил main.cpp в отслеживаемые:
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (master)
$ git add main.cpp
10. Снова проверил состояние:
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (master)
$ git status
On branch master
No commits yet
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: main.cpp
Untracked files:
(use "git add <file>..." to include in what will be committed)
.vs/
project.sln
project.vcxproj
project.vcxproj.filters
project.vcxproj.user
x64/
Now main.cpp is being tracked.
В ответе система говорит о том, что main.cpp теперь отслеживается и его изменения можно добавить в коммит
11. Сделал первый коммит:
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (master)
$ git commit -m 'code: заготовка прогоаммы'
[master (root-commit) d4447ab] code: заготовка прогоаммы
1 file changed, 7 insertions(+)
create mode 100644 main.cpp
12. Поменял имя ветки на 'main':
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (master)
$ git branch -m main
13. Начал отслеживание файла проекта:
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ git add project.vcxproj
14. Сделал коммит с файлом проекта:
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ git commit -m 'build: добавлен файл проекта'
[main dea427f] build: добавлен файл проекта
1 file changed, 135 insertions(+)
create mode 100644 project.vcxproj
15. Проверил состояние после изменений в main.cpp:
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ git status
On branch main
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: main.cpp // отображаются изменения в файле
Untracked files:
(use "git add <file>..." to include in what will be committed)
.vs/
project.sln
project.vcxproj.filters
project.vcxproj.user
x64/
no changes added to commit (use "git add" and/or "git commit -a")
16. Коммитнул main.cpp (1 метод):
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ git add main.cpp
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ git commit -m 'code: добавлен ввод двух чисел'
[main 5d86b92] code: добавлен ввод двух чисел
1 file changed, 3 insertions(+), 1 deletion(-)
17. --(2 метод):
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ git add -u
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ git commit -m 'code: добавлен вывод суммы чисел'
[main 8b986c8] code: добавлен вывод суммы чисел
1 file changed, 1 insertion(+)
18. --(3 метод):
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ git commit -a -m 'code: добавлен вывод разности чисел'
[main f18aae5] code: добавлен вывод разности чисел
1 file changed, 2 insertions(+), 1 deletion(-)
19. Создал .gitignore:
/project.sln
/project.vcxproj.filters
/project.vcxproj.user
/x64
/.vs/
20. Начал отслеживать .gitignore:
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ git add .gitignore
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ git commit -m 'git: .gitignore занесен под git'
[main e24a7c8] git: .gitignore занесен под git
1 file changed, 5 insertions(+)
create mode 100644 .gitignore
21. Проверил состояние:
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ git status
On branch main
nothing to commit, working tree clean
22. Проверил историю коммитов через log, попробовал различные опции:
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ git log
commit e24a7c84989c8c1f2d9132f8dff0613a80153bec (HEAD -> main)
Author: Alice (MamakinYR) <MamakinYR@mpei.ru>
Date: Mon Mar 11 16:14:51 2024 +0300
git: .gitignore занесен под git
commit f18aae5bcce0e38603946b4c1726cce6a6b81a85
Author: Alice (MamakinYR) <MamakinYR@mpei.ru>
Date: Mon Mar 11 16:00:17 2024 +0300
code: добавлен вывод разности чисел
commit 8b986c87775d24dff3a03b7586a55f0d1604c032
Author: Alice (MamakinYR) <MamakinYR@mpei.ru>
Date: Mon Mar 11 15:56:30 2024 +0300
code: добавлен вывод суммы чисел
commit 5d86b920d0c2f32e39fb449deba0bfff380873c2
Author: Alice (MamakinYR) <MamakinYR@mpei.ru>
Date: Mon Mar 11 15:53:16 2024 +0300
code: добавлен ввод двух чисел
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ git log --stat
commit e24a7c84989c8c1f2d9132f8dff0613a80153bec (HEAD -> main)
Author: Alice (MamakinYR) <MamakinYR@mpei.ru>
Date: Mon Mar 11 16:14:51 2024 +0300
git: .gitignore занесен под git // описание коммита
.gitignore | 5 +++++
1 file changed, 5 insertions(+) // Изменен 1 файл, добавлено 5 строк
commit f18aae5bcce0e38603946b4c1726cce6a6b81a85 // хэш коммита
Author: Alice (MamakinYR) <MamakinYR@mpei.ru> // его автор
Date: Mon Mar 11 16:00:17 2024 +0300 // дата
code: добавлен вывод разности чисел
main.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
commit 8b986c87775d24dff3a03b7586a55f0d1604c032
Author: Alice (MamakinYR) <MamakinYR@mpei.ru>
Date: Mon Mar 11 15:56:30 2024 +0300
code: добавлен вывод суммы чисел
main.cpp | 1 +
1 file changed, 1 insertion(+)
commit 5d86b920d0c2f32e39fb449deba0bfff380873c2
Author: Alice (MamakinYR) <MamakinYR@mpei.ru>
Date: Mon Mar 11 15:53:16 2024 +0300
code: добавлен ввод двух чисел
main.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
commit dea427f1208fca865cf410463985c24bf765edb3
Author: Alice (MamakinYR) <MamakinYR@mpei.ru>
Date: Mon Mar 11 15:45:37 2024 +0300
build: добавлен файл проекта
project.vcxproj | 135 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 135 insertions(+)
commit d4447abfeaff42aaefaea6ac46f00b17258b0df4
Author: Alice (MamakinYR) <MamakinYR@mpei.ru>
Date: Mon Mar 11 15:38:03 2024 +0300
code: заготовка прогоаммы
main.cpp | 7 +++++++
1 file changed, 7 insertions(+)
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ git log --oneline --decorate
e24a7c8 (HEAD -> main) git: .gitignore занесен под git
f18aae5 code: добавлен вывод разности чисел
8b986c8 code: добавлен вывод суммы чисел
5d86b92 code: добавлен ввод двух чисел
dea427f build: добавлен файл проекта
d4447ab code: заготовка прогоаммы
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ git log --oneline --decorate --all --graph
* e24a7c8 (HEAD -> main) git: .gitignore занесен под git
* f18aae5 code: добавлен вывод разности чисел
* 8b986c8 code: добавлен вывод суммы чисел
* 5d86b92 code: добавлен ввод двух чисел
* dea427f build: добавлен файл проекта
* d4447ab code: заготовка прогоаммы
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ git log --grep "build:"
commit dea427f1208fca865cf410463985c24bf765edb3
Author: Alice (MamakinYR) <MamakinYR@mpei.ru>
Date: Mon Mar 11 15:45:37 2024 +0300
build: добавлен файл проекта
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ git log -- project.vcxproj
commit dea427f1208fca865cf410463985c24bf765edb3
Author: Alice (MamakinYR) <MamakinYR@mpei.ru>
Date: Mon Mar 11 15:45:37 2024 +0300
build: добавлен файл проекта
23. Проверил конкретный коммит:
Последний:
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ git show HEAD
commit e24a7c84989c8c1f2d9132f8dff0613a80153bec (HEAD -> main)
Author: Alice (MamakinYR) <MamakinYR@mpei.ru>
Date: Mon Mar 11 16:14:51 2024 +0300
git: .gitignore занесен под git
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..baf245d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+/project.sln
+/project.vcxproj.filters
+/project.vcxproj.user
+/x64
+/.vs/
\ No newline at end of file
Предпоследний:
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ git show HEAD~1
commit f18aae5bcce0e38603946b4c1726cce6a6b81a85
Author: Alice (MamakinYR) <MamakinYR@mpei.ru>
Date: Mon Mar 11 16:00:17 2024 +0300
code: добавлен вывод разности чисел
diff --git a/main.cpp b/main.cpp
index 67551e7..007bcb4 100644
--- a/main.cpp
+++ b/main.cpp
@@ -6,5 +6,6 @@ int main()
cout << "Enter A and B: ";
int a, b;
cin >> a >> b;
- cout << a + b;
+ cout << "A + B = " << a + b << '\n'
+ << "A - B = " << a - b << '\n';
}
\ No newline at end of file
24. Проверил изменения:
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ git diff
diff --git a/main.cpp b/main.cpp // Разница есть между новой и старой версией main.cpp
index 007bcb4..c392087 100644
--- a/main.cpp // Старая версия
+++ b/main.cpp // Новая версия
@@ -7,5 +7,6 @@ int main()
int a, b;
cin >> a >> b;
cout << "A + B = " << a + b << '\n'
- << "A - B = " << a - b << '\n';
+ << "A - B = " << a - b << '\n'
+ << "A * B = " << a * b << '\n';
}
\ No newline at end of file
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ git diff HEAD~2
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..baf245d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+/project.sln
+/project.vcxproj.filters
+/project.vcxproj.user
+/x64
+/.vs/
\ No newline at end of file
diff --git a/main.cpp b/main.cpp
index 67551e7..c392087 100644
--- a/main.cpp
+++ b/main.cpp
@@ -6,5 +6,7 @@ int main()
cout << "Enter A and B: ";
int a, b;
cin >> a >> b;
- cout << a + b;
+ cout << "A + B = " << a + b << '\n'
+ << "A - B = " << a - b << '\n'
+ << "A * B = " << a * b << '\n';
}
\ No newline at end of file
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ git diff HEAD~2 HEAD
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..baf245d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+/project.sln
+/project.vcxproj.filters
+/project.vcxproj.user
+/x64
+/.vs/
\ No newline at end of file
diff --git a/main.cpp b/main.cpp
index 67551e7..007bcb4 100644
--- a/main.cpp
+++ b/main.cpp
@@ -6,5 +6,6 @@ int main()
cout << "Enter A and B: ";
int a, b;
cin >> a >> b;
- cout << a + b;
+ cout << "A + B = " << a + b << '\n'
+ << "A - B = " << a - b << '\n';
}
\ No newline at end of file
Разница между первым коммитом и коммитом, в котором добавлен вывод разности(хэши найдены через просмотр истории коммитов):
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ git diff d4447abfeaff42aaefaea6ac46f00b17258b0df4 f18aae5bcce0e38603946b4c1726cce6a6b81a85
diff --git a/main.cpp b/main.cpp
index 261272d..007bcb4 100644
--- a/main.cpp
+++ b/main.cpp
@@ -3,5 +3,9 @@
using namespace std;
int main()
{
- cout << "Hello, world!";
+ cout << "Enter A and B: ";
+ int a, b;
+ cin >> a >> b;
+ cout << "A + B = " << a + b << '\n'
+ << "A - B = " << a - b << '\n';
}
\ No newline at end of file
diff --git a/project.vcxproj b/project.vcxproj
new file mode 100644
index 0000000..fa3d36a
--- /dev/null
+ cin >> a >> b;
+ cout << "A + B = " << a + b << '\n'
+ << "A - B = " << a - b << '\n';
}
\ No newline at end of file
diff --git a/project.vcxproj b/project.vcxproj
new file mode 100644
index 0000000..fa3d36a
--- /dev/null
+++ b/project.vcxproj
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <VCProjectVersion>17.0</VCProjectVersion>
+ <Keyword>Win32Proj</Keyword>
+ <ProjectGuid>{b4d25831-3242-494b-b8ee-195a935033f8}</ProjectGuid>
+ <RootNamespace>project</RootNamespace>
+ <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v143</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v143</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v143</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v143</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="Shared">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <SDLCheck>true</SDLCheck>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ConformanceMode>true</ConformanceMode>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <SDLCheck>true</SDLCheck>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ConformanceMode>true</ConformanceMode>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <SDLCheck>true</SDLCheck>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ConformanceMode>true</ConformanceMode>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
diff --git a/main.cpp b/main.cpp
diff --git a/main.cpp b/main.cpp
index 261272d..007bcb4 100644
--- a/main.cpp
+++ b/main.cpp
@@ -3,5 +3,9 @@
using namespace std;
int main()
{
- cout << "Hello, world!";
+ cout << "Enter A and B: ";
+ int a, b;
+ cin >> a >> b;
+ cout << "A + B = " << a + b << '\n'
+ << "A - B = " << a - b << '\n';
}
\ No newline at end of file
diff --git a/project.vcxproj b/project.vcxproj
new file mode 100644
index 0000000..fa3d36a
--- /dev/null
+++ b/project.vcxproj
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <VCProjectVersion>17.0</VCProjectVersion>
+ <Keyword>Win32Proj</Keyword>
+ <ProjectGuid>{b4d25831-3242-494b-b8ee-195a935033f8}</ProjectGuid>
+ <RootNamespace>project</RootNamespace>
+ <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v143</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v143</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v143</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v143</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="Shared">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <SDLCheck>true</SDLCheck>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ConformanceMode>true</ConformanceMode>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <SDLCheck>true</SDLCheck>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ConformanceMode>true</ConformanceMode>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <SDLCheck>true</SDLCheck>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ConformanceMode>true</ConformanceMode>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <SDLCheck>true</SDLCheck>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ConformanceMode>true</ConformanceMode>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
25. Коммитнул изменения в main.cpp:
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ git commit -a -m "code: added product output"
[main 3e60b61] code: added product output
1 file changed, 2 insertions(+), 1 deletion(-)
26. Откатил до HEAD~1:
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ git reset --hard HEAD~1
HEAD is now at e24a7c8 git: .gitignore занесен под git
27. Изменил main.cpp, откатил до версии коммита HEAD:
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ git checkout HEAD -- main.cpp
28. Создал пару ключей:
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ ssh-keygen
Generating public/private ed25519 key pair.
Enter file in which to save the key (/c/Users/uprkt/.ssh/id_ed25519):
Created directory '/c/Users/uprkt/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/uprkt/.ssh/id_ed25519
Your public key has been saved in /c/Users/uprkt/.ssh/id_ed25519.pub
The key fingerprint is:
SHA256:EZbS9s3oCCwUnfxisS2Npxp0MDPU7GA75oXaaCSQMyQ uprkt@uprktk
The key's randomart image is:
+--[ED25519 256]--+
|Eo .o* oo. |
|* O O.+. |
|.o o @ X.. + |
|. . B % =.o o |
| o B * *So |
| + + . . . |
| . o |
| . |
| |
+----[SHA256]-----+
29. Запустил агент, добавил в него ключ:
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ eval $(ssh-agent -s)
Agent pid 1051
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ ssh-add
Enter passphrase for /c/Users/uprkt/.ssh/id_ed25519:
Identity added: /c/Users/uprkt/.ssh/id_ed25519 (uprkt@uprktk)
30. Скопировал открытый ключ:
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ cat ~/.ssh/id_ed25519.pub
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFdmf1Gpyr0HS5OYJw0k+ir+mY9ye6NtJCj+ymHMfmRz uprkt@uprktk
31. Отправил проект на сервер:
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ git push -u origin main
The authenticity of host 'uit.mpei.ru (10.1.6.13)' can't be established.
ED25519 key fingerprint is SHA256:Q5w0UKEzQKA3J6NyMtjwCLvtAykoxdugIXjx6NwU4NA.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'uit.mpei.ru' (ED25519) to the list of known hosts.
Enumerating objects: 18, done.
Counting objects: 100% (18/18), done.
Delta compression using up to 12 threads
Compressing objects: 100% (17/17), done.
Writing objects: 100% (18/18), 2.97 KiB | 761.00 KiB/s, done.
Total 18 (delta 3), reused 0 (delta 0), pack-reused 0 (from 0)
remote: . Processing 1 references
remote: Processed 1 references in total
To uit.mpei.ru:MamakinYR/cs-lab02.git
* [new branch] main -> main
branch 'main' set up to track 'origin/main'.
32. Склонировал проект в каталог Боба:
uprkt@uprktk MINGW64 ~/Desktop/lab02/bob
$ git clone git@uit.mpei.ru:MamakinYR/cs-lab02.git project
Cloning into 'project'...
Enter passphrase for key '/c/Users/uprkt/.ssh/id_ed25519':
remote: Enumerating objects: 18, done.
remote: Counting objects: 100% (18/18), done.
remote: Compressing objects: 100% (17/17), done.
remote: Total 18 (delta 3), reused 0 (delta 0), pack-reused 0
Receiving objects: 100% (18/18), done.
Resolving deltas: 100% (3/3), done.
33. Настроил пользователя Боб:
uprkt@uprktk MINGW64 ~/Desktop/lab02/bob/project (main)
$ git config user.name 'Bob (MamakiYR)'
uprkt@uprktk MINGW64 ~/Desktop/lab02/bob/project (main)
$ git config user.email 'MamakinYR.mpei.ru'
34. Изменил main.cpp на машине Боба, коммитнул от его имени:
uprkt@uprktk MINGW64 ~/Desktop/lab02/bob/project (main)
$ git add main.cpp
uprkt@uprktk MINGW64 ~/Desktop/lab02/bob/project (main)
$ git commit -m "code: added product output"
[main 2a1ca96] code: added product output
1 file changed, 2 insertions(+), 1 deletion(-)
uprkt@uprktk MINGW64 ~/Desktop/lab02/bob/project (main)
$ git show HEAD
commit 2a1ca9611bf0dc8f9f68df12557a29f6a69e14d1 (HEAD -> main)
Author: Bob (MamakiYR) <MamakinYR.mpei.ru>
Date: Sun Mar 24 23:39:15 2024 +0300
code: added product output
diff --git a/main.cpp b/main.cpp
index 007bcb4..c8946ed 100644
--- a/main.cpp
+++ b/main.cpp
@@ -7,5 +7,6 @@ int main()
int a, b;
cin >> a >> b;
cout << "A + B = " << a + b << '\n'
- << "A - B = " << a - b << '\n';
+ << "A - B = " << a - b << '\n'
+ << "A - B = " << a * b << '\n';
}
\ No newline at end of file
Видно, что коммит от имени Боба
35. Отправил изменения на сервер:
uprkt@uprktk MINGW64 ~/Desktop/lab02/bob/project (main)
$ git push
Enter passphrase for key '/c/Users/uprkt/.ssh/id_ed25519':
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 12 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 371 bytes | 371.00 KiB/s, done.
Total 3 (delta 1), reused 0 (delta 0), pack-reused 0 (from 0)
remote: . Processing 1 references
remote: Processed 1 references in total
To uit.mpei.ru:MamakinYR/cs-lab02.git
e24a7c8..2a1ca96 main -> main
36. Увидел, что при коммите требуется пароль, запустил агент на машине Боба:
uprkt@uprktk MINGW64 ~/Desktop/lab02/bob/project (main)
$ eval $(ssh-agent -s)
Agent pid 1187
uprkt@uprktk MINGW64 ~/Desktop/lab02/bob/project (main)
$ ssh-add
Enter passphrase for /c/Users/uprkt/.ssh/id_ed25519:
Identity added: /c/Users/uprkt/.ssh/id_ed25519 (uprkt@uprktk)
37. Загрузил изменения на машине Алисы:
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ 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), 351 bytes | 31.00 KiB/s, done.
From uit.mpei.ru:MamakinYR/cs-lab02
e24a7c8..2a1ca96 main -> origin/main
Ветка Алисы отстает на один коммит, но изменений в ней нет:
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ git status
On branch main
Your branch is behind 'origin/main' by 1 commit, and can be fast-forwarded.
(use "git pull" to update your local branch)
nothing to commit, working tree clean
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ git log --oneline --decorate --all --graph
* 2a1ca96 (origin/main) code: added product output
* e24a7c8 (HEAD -> main) git: .gitignore занесен под git
* f18aae5 code: добавлен вывод разности чисел
* 8b986c8 code: добавлен вывод суммы чисел
* 5d86b92 code: добавлен ввод двух чисел
* dea427f build: добавлен файл проекта
* d4447ab code: заготовка прогоаммы
38. Продвинул ветку Алисы:
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ git pull --ff-only
Updating e24a7c8..2a1ca96
Fast-forward
main.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
39. Создал и отправил коммит с машины Алисы, загрузил и продвинул у Боба:
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ git add main.cpp
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ git commit -m "code: added divison output"
[main 7369cc1] code: added divison output
1 file changed, 2 insertions(+), 1 deletion(-)
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ git push
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 12 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 373 bytes | 373.00 KiB/s, done.
Total 3 (delta 1), reused 0 (delta 0), pack-reused 0 (from 0)
remote: . Processing 1 references
remote: Processed 1 references in total
To uit.mpei.ru:MamakinYR/cs-lab02.git
2a1ca96..7369cc1 main -> main
uprkt@uprktk MINGW64 ~/Desktop/lab02/bob/project (main)
$ 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), 353 bytes | 18.00 KiB/s, done.
From uit.mpei.ru:MamakinYR/cs-lab02
2a1ca96..7369cc1 main -> origin/main
Updating 2a1ca96..7369cc1
Fast-forward
main.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
40. Добавил вывод максимума за Алису, закоммитил и отправил:
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ git add main.cpp
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ git commit -m "code: added max output"
[main e91778b] code: added max output
1 file changed, 6 insertions(+)
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ git push
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 12 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 (from 0)
remote: . Processing 1 references
remote: Processed 1 references in total
To uit.mpei.ru:MamakinYR/cs-lab02.git
7369cc1..e91778b main -> main
41. Добавил вывод минимума за Боба, создал конфликт:
uprkt@uprktk MINGW64 ~/Desktop/lab02/bob/project (main)
$ git add main.cpp
uprkt@uprktk MINGW64 ~/Desktop/lab02/bob/project (main)
$ git commit -m "code: added min output"
[main 15fdf2c] code: added min output
1 file changed, 6 insertions(+)
uprkt@uprktk MINGW64 ~/Desktop/lab02/bob/project (main)
$ git push
To uit.mpei.ru:MamakinYR/cs-lab02.git
! [rejected] main -> main (fetch first)
error: failed to push some refs to 'uit.mpei.ru:MamakinYR/cs-lab02.git'
hint: Updates were rejected because the remote contains work that you do not
hint: have locally. This is usually caused by another repository pushing to
hint: the same ref. If you want to integrate the remote changes, use
hint: 'git pull' before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
42. Загрузил коммиты на машине Боба:
uprkt@uprktk MINGW64 ~/Desktop/lab02/bob/project (main)
$ 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), 375 bytes | 23.00 KiB/s, done.
From uit.mpei.ru:MamakinYR/cs-lab02
7369cc1..e91778b main -> origin/main
Auto-merging main.cpp
CONFLICT (content): Merge conflict in main.cpp
Automatic merge failed; fix conflicts and then commit the result.
В истории отображается расхождение веток:
uprkt@uprktk MINGW64 ~/Desktop/lab02/bob/project (main|MERGING)
$ git log --oneline --decorate --all --graph
* 15fdf2c (HEAD -> main) code: added min output
| * e91778b (origin/main, origin/HEAD) code: added max output
|/
* 7369cc1 code: added divison output
* 2a1ca96 code: added product output
* e24a7c8 git: .gitignore занесен под git
* f18aae5 code: добавлен вывод разности чисел
* 8b986c8 code: добавлен вывод суммы чисел
* 5d86b92 code: добавлен ввод двух чисел
* dea427f build: добавлен файл проекта
* d4447ab code: заготовка прогоаммы
43. rebase выдает ошибку:
uprkt@uprktk MINGW64 ~/Desktop/lab02/bob/project (main)
$ git rebase origin/main
Auto-merging main.cpp
CONFLICT (content): Merge conflict in main.cpp
error: could not apply 15fdf2c... code: added min output
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm <conflicted_files>", 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 15fdf2c... code: added min output
На этот момент последний коммит в хранилище - коммит Алисы, конфликтующий с коммитом Боба
44. Разрешил конфликт версий файла main.cpp:
uprkt@uprktk MINGW64 ~/Desktop/lab02/bob/project (main|REBASE 1/1)
$ git add main.cpp
uprkt@uprktk MINGW64 ~/Desktop/lab02/bob/project (main|REBASE 1/1)
$ git rebase --continue
[detached HEAD d994f26] code: added min output
Author: Bob (MamakiYR) <MamakinYR.mpei.ru>
1 file changed, 8 insertions(+), 2 deletions(-)
Successfully rebased and updated refs/heads/main.
45. Проверил историю, отправил изменения:
uprkt@uprktk MINGW64 ~/Desktop/lab02/bob/project (main)
$ git log --oneline --decorate --all --graph
* d994f26 (HEAD -> main) code: added min output
* e91778b (origin/main, origin/HEAD) code: added max output
* 7369cc1 code: added divison output
* 2a1ca96 code: added product output
* e24a7c8 git: .gitignore занесен под git
* f18aae5 code: добавлен вывод разности чисел
* 8b986c8 code: добавлен вывод суммы чисел
* 5d86b92 code: добавлен ввод двух чисел
* dea427f build: добавлен файл проекта
* d4447ab code: заготовка прогоаммы
Расхождения устранены
uprkt@uprktk MINGW64 ~/Desktop/lab02/bob/project (main)
$ git push
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 12 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 429 bytes | 429.00 KiB/s, done.
Total 3 (delta 1), reused 0 (delta 0), pack-reused 0 (from 0)
remote: . Processing 1 references
remote: Processed 1 references in total
To uit.mpei.ru:MamakinYR/cs-lab02.git
e91778b..d994f26 main -> main
46. Создал ветку double и переключился на нее:
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ git branch double
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ git checkout double
Switched to branch 'double'
47. Изменил тип переменных, закоммитил изменения:
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (double)
$ git add main.cpp
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (double)
$ git commit -m "code: changed a, b type to double"
[double 4c22b9e] code: changed a, b type to double
1 file changed, 1 insertion(+), 1 deletion(-)
48. Синхронизировал main на машине Алисы с сервером:
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ 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), 409 bytes | 25.00 KiB/s, done.
From uit.mpei.ru:MamakinYR/cs-lab02
e91778b..d994f26 main -> origin/main
Updating e91778b..d994f26
Fast-forward
main.cpp | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
49. История всех веток:
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ git log --oneline --decorate --all --graph
* 4c22b9e (double) code: changed a, b type to double
| * d994f26 (HEAD -> main, origin/main) code: added min output
|/
* e91778b code: added max output
* 7369cc1 code: added divison output
* 2a1ca96 code: added product output
* e24a7c8 git: .gitignore занесен под git
* f18aae5 code: добавлен вывод разности чисел
* 8b986c8 code: добавлен вывод суммы чисел
* 5d86b92 code: добавлен ввод двух чисел
* dea427f build: добавлен файл проекта
* d4447ab code: заготовка прогоаммы
50. Слил ветки double и main:
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ git merge double
Auto-merging main.cpp
Merge made by the 'ort' strategy.
main.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
51. Отправил изменения на сервер:
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ git push
Enumerating objects: 10, done.
Counting objects: 100% (10/10), done.
Delta compression using up to 12 threads
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 729 bytes | 729.00 KiB/s, done.
Total 6 (delta 2), reused 0 (delta 0), pack-reused 0 (from 0)
remote: . Processing 1 references
remote: Processed 1 references in total
To uit.mpei.ru:MamakinYR/cs-lab02.git
d994f26..582fa3d main -> main
52. История всех веток:
uprkt@uprktk MINGW64 ~/Desktop/lab02/alice/project (main)
$ git log --oneline --decorate --all --graph
* 582fa3d (HEAD -> main, origin/main) Merge branch 'double'
|\
| * 4c22b9e (double) code: changed a, b type to double
* | d994f26 code: added min output
|/
* e91778b code: added max output
* 7369cc1 code: added divison output
* 2a1ca96 code: added product output
* e24a7c8 git: .gitignore занесен под git
* f18aae5 code: добавлен вывод разности чисел
* 8b986c8 code: добавлен вывод суммы чисел
* 5d86b92 code: добавлен ввод двух чисел
* dea427f build: добавлен файл проекта
* d4447ab code: заготовка прогоаммы