code: отчёт
Этот коммит содержится в:
862
README.txt
Обычный файл
862
README.txt
Обычный файл
@@ -0,0 +1,862 @@
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02
|
||||
$ mkdir alice
|
||||
mkdir: cannot create directory ‘alice’: File exists
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02
|
||||
$ mkdir bob
|
||||
mkdir: cannot create directory ‘bob’: File exists
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02
|
||||
$ cd alice
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice
|
||||
$ mkdir project
|
||||
mkdir: cannot create directory ‘project’: File exists
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice
|
||||
$ cd ..
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02
|
||||
$ cd alice
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice
|
||||
$ cd project
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project
|
||||
$ git init
|
||||
Initialized empty Git repository in C:/Users/User/Desktop/lab02/alice/project/.git/
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (master)
|
||||
$ git config user.name 'Alice (PokhilAA)'
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (master)
|
||||
$ git config user.email 'PokhilAA@mpei.ru'
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (master)
|
||||
$ git status
|
||||
On branch master
|
||||
|
||||
No commits yet
|
||||
|
||||
nothing to commit (create/copy files and use "git add" to track)
|
||||
Пояснение:
|
||||
История не содержит еще коммитов.
|
||||
1) В новый коммит ничего не планируется добавить
|
||||
2) В рабочей копии нет ничегоб что можно было бы добавить
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (master)
|
||||
$ git add main.cpp
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (master)
|
||||
$ git status
|
||||
On branch master
|
||||
|
||||
No commits yet
|
||||
|
||||
Untracked files:
|
||||
(use "git add <file>..." to include in what will be committed)
|
||||
main.cpp
|
||||
project.cbp
|
||||
|
||||
nothing added to commit but untracked files present (use "git add" to track)
|
||||
|
||||
Пояснение: в рабочей копии замечен файл, но он не отслеживается
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (master)
|
||||
$ git add main.cpp
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (master)
|
||||
$ git commit -m 'code: preparation of the program'
|
||||
[master (root-commit) 07591a8] code: preparation of the program
|
||||
1 file changed, 9 insertions(+)
|
||||
create mode 100644 main.cpp
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (master)
|
||||
$ git add project.cbp
|
||||
warning: in the working copy of 'project.cbp', LF will be replaced by CRLF the next time Git touches it
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (master)
|
||||
$ git commit -m 'build: add project file'
|
||||
[master 0cbc146] build: add project file
|
||||
1 file changed, 40 insertions(+)
|
||||
create mode 100644 project.cbp
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (master)
|
||||
$ git status
|
||||
On branch master
|
||||
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)
|
||||
bin/
|
||||
obj/
|
||||
|
||||
no changes added to commit (use "git add" and/or "git commit -a")
|
||||
Пояснение: git стал отслеживать файл
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (master)
|
||||
$ git add main.cpp
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (master)
|
||||
$ git commit -m 'code: add sum'
|
||||
[master 1be4709] code: add sum
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (master)
|
||||
$ git add -u
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (master)
|
||||
$ git commit -m 'code: add dif'
|
||||
[master ab86a14] code: add dif
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (master)
|
||||
$ git status
|
||||
On branch master
|
||||
Untracked files:
|
||||
(use "git add <file>..." to include in what will be committed)
|
||||
.gitignore
|
||||
project.depend
|
||||
|
||||
nothing added to commit but untracked files present (use "git add" to track)
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (master)
|
||||
$ git status
|
||||
On branch master
|
||||
Untracked files:
|
||||
(use "git add <file>..." to include in what will be committed)
|
||||
.gitignore
|
||||
|
||||
nothing added to commit but untracked files present (use "git add" to track)
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (master)
|
||||
$ git add .gitignore
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (master)
|
||||
$ git commit -m 'git: ignore'
|
||||
[master 8f7d08d] git: ignore
|
||||
1 file changed, 3 insertions(+)
|
||||
create mode 100644 .gitignore
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (master)
|
||||
$ git log --stat
|
||||
commit 8f7d08d6fd2163a678269404352ce7082f10813f (HEAD -> master)
|
||||
Author: Alice(PokhilAA) <PokhilAA@mpei.ru>
|
||||
Date: Sun Mar 24 21:12:22 2024 +0300
|
||||
|
||||
git: ignore
|
||||
|
||||
.gitignore | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
commit ab86a14946d1550edb0760f3a846f2fa90a6679d
|
||||
Author: Alice(PokhilAA) <PokhilAA@mpei.ru>
|
||||
Date: Sun Mar 24 21:06:12 2024 +0300
|
||||
|
||||
code: add dif
|
||||
|
||||
main.cpp | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
commit a762a912f99df3b067533cce4f7f9bc3144eba4d
|
||||
Author: Alice(PokhilAA) <PokhilAA@mpei.ru>
|
||||
Date: Sun Mar 24 21:05:33 2024 +0300
|
||||
|
||||
code: add sum
|
||||
|
||||
main.cpp | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
commit 0cbc146f279243a1bcc680a21ff671811bb4abac
|
||||
Author: Alice(PokhilAA) <PokhilAA@mpei.ru>
|
||||
Date: Sun Mar 24 21:01:55 2024 +0300
|
||||
|
||||
build: add project file
|
||||
|
||||
project.cbp | 40 ++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 40 insertions(+)
|
||||
|
||||
commit 07591a88bd4ca06f85a867f0c8daa0190e044ffa
|
||||
Author: Alice(PokhilAA) <PokhilAA@mpei.ru>
|
||||
Date: Sun Mar 24 20:59:54 2024 +0300
|
||||
|
||||
code: preparation of the program
|
||||
|
||||
main.cpp | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
(END)
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (master)
|
||||
$ git log --oneline --decorate
|
||||
8f7d08d (HEAD -> master) git: ignore
|
||||
ab86a14 code: add dif
|
||||
a762a91 code: add sum
|
||||
0cbc146 build: add project file
|
||||
07591a8 code: preparation of the program
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (master)
|
||||
$ git log --oneline --decorate --all --graph
|
||||
* 8f7d08d (HEAD -> master) git: ignore
|
||||
* ab86a14 code: add dif
|
||||
* a762a91 code: add sum
|
||||
* 0cbc146 build: add project file
|
||||
* 07591a8 code: preparation of the program
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (master)
|
||||
$ git log --grep "build:"
|
||||
commit 0cbc146f279243a1bcc680a21ff671811bb4abac
|
||||
Author: Alice(PokhilAA) <PokhilAA@mpei.ru>
|
||||
Date: Sun Mar 24 21:01:55 2024 +0300
|
||||
|
||||
build: add project file
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (master)
|
||||
$ git log -- project.cbp
|
||||
commit 0cbc146f279243a1bcc680a21ff671811bb4abac
|
||||
Author: Alice(PokhilAA) <PokhilAA@mpei.ru>
|
||||
Date: Sun Mar 24 21:01:55 2024 +0300
|
||||
|
||||
build: add project file
|
||||
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (master)
|
||||
$ git show HEAD~1
|
||||
commit ab86a14946d1550edb0760f3a846f2fa90a6679d
|
||||
Author: Alice(PokhilAA) <PokhilAA@mpei.ru>
|
||||
Date: Sun Mar 24 21:06:12 2024 +0300
|
||||
|
||||
code: add dif
|
||||
|
||||
diff --git a/main.cpp b/main.cpp
|
||||
index 03b22ce..c166ede 100644
|
||||
--- a/main.cpp
|
||||
+++ b/main.cpp
|
||||
@@ -7,5 +7,6 @@ int main()
|
||||
cout << "Enter A and B: ";
|
||||
int a, b;
|
||||
cin >> a >> b;
|
||||
+ cout << "A + B = " << a + b << '\n' << "A - B = " << a - b << '\n';
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (main)
|
||||
$ git show main~1
|
||||
commit ab86a14946d1550edb0760f3a846f2fa90a6679d
|
||||
Author: Alice(PokhilAA) <PokhilAA@mpei.ru>
|
||||
Date: Sun Mar 24 21:06:12 2024 +0300
|
||||
|
||||
code: add dif
|
||||
|
||||
diff --git a/main.cpp b/main.cpp
|
||||
index 03b22ce..c166ede 100644
|
||||
--- a/main.cpp
|
||||
+++ b/main.cpp
|
||||
@@ -7,5 +7,6 @@ int main()
|
||||
cout << "Enter A and B: ";
|
||||
int a, b;
|
||||
cin >> a >> b;
|
||||
+ cout << "A + B = " << a + b << '\n' << "A - B = " << a - b << '\n';
|
||||
return 0;
|
||||
}
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (main)
|
||||
$ git show ab86
|
||||
commit ab86a14946d1550edb0760f3a846f2fa90a6679d
|
||||
Author: Alice(PokhilAA) <PokhilAA@mpei.ru>
|
||||
Date: Sun Mar 24 21:06:12 2024 +0300
|
||||
|
||||
code: add dif
|
||||
|
||||
diff --git a/main.cpp b/main.cpp
|
||||
index 03b22ce..c166ede 100644
|
||||
--- a/main.cpp
|
||||
+++ b/main.cpp
|
||||
@@ -7,5 +7,6 @@ int main()
|
||||
cout << "Enter A and B: ";
|
||||
int a, b;
|
||||
cin >> a >> b;
|
||||
+ cout << "A + B = " << a + b << '\n' << "A - B = " << a - b << '\n';
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (main)
|
||||
$ git diff
|
||||
diff --git a/main.cpp b/main.cpp
|
||||
index c166ede..f9e7fe7 100644
|
||||
--- a/main.cpp
|
||||
+++ b/main.cpp
|
||||
@@ -7,6 +7,6 @@ int main()
|
||||
cout << "Enter A and B: ";
|
||||
int a, b;
|
||||
cin >> a >> b;
|
||||
- cout << "A + B = " << a + b << '\n' << "A - B = " << a - b << '\n';
|
||||
+ cout << "A + B = " << a + b << '\n' << "A - B = " << a - b << '\n' << a * b << '\n';
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (main)
|
||||
$ git diff 07591 8f7d0
|
||||
diff --git a/.gitignore b/.gitignore
|
||||
new file mode 100644
|
||||
index 0000000..a5aaaa5
|
||||
--- /dev/null
|
||||
+++ b/.gitignore
|
||||
@@ -0,0 +1,3 @@
|
||||
+/bin
|
||||
+/obj
|
||||
+/*layout
|
||||
diff --git a/main.cpp b/main.cpp
|
||||
index b4392ec..c166ede 100644
|
||||
--- a/main.cpp
|
||||
+++ b/main.cpp
|
||||
@@ -4,6 +4,9 @@ using namespace std;
|
||||
|
||||
int main()
|
||||
{
|
||||
- cout << "Hello world!" << endl;
|
||||
+ cout << "Enter A and B: ";
|
||||
+ int a, b;
|
||||
+ cin >> a >> b;
|
||||
+ cout << "A + B = " << a + b << '\n' << "A - B = " << a - b << '\n';
|
||||
return 0;
|
||||
}
|
||||
diff --git a/project.cbp b/project.cbp
|
||||
new file mode 100644
|
||||
index 0000000..99bb702
|
||||
--- /dev/null
|
||||
+++ b/project.cbp
|
||||
@@ -0,0 +1,40 @@
|
||||
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
+<CodeBlocks_project_file>
|
||||
+ <FileVersion major="1" minor="6" />
|
||||
+ <Project>
|
||||
+ <Option title="project" />
|
||||
+ <Option pch_mode="2" />
|
||||
+ <Option compiler="gcc" />
|
||||
+ <Build>
|
||||
+ <Target title="Debug">
|
||||
+ <Option output="bin/Debug/project" prefix_auto="1" extension_auto="1" />
|
||||
+ <Option object_output="obj/Debug/" />
|
||||
+ <Option type="1" />
|
||||
+ <Option compiler="gcc" />
|
||||
+ <Compiler>
|
||||
+ <Add option="-g" />
|
||||
+ </Compiler>
|
||||
+ </Target>
|
||||
+ <Target title="Release">
|
||||
+ <Option output="bin/Release/project" prefix_auto="1" extension_auto="1" />
|
||||
+ <Option object_output="obj/Release/" />
|
||||
+ <Option type="1" />
|
||||
+ <Option compiler="gcc" />
|
||||
+ <Compiler>
|
||||
+ <Add option="-O2" />
|
||||
+ </Compiler>
|
||||
+ <Linker>
|
||||
+ <Add option="-s" />
|
||||
+ </Linker>
|
||||
+ </Target>
|
||||
+ </Build>
|
||||
+ <Compiler>
|
||||
+ <Add option="-Wall" />
|
||||
+ <Add option="-fexceptions" />
|
||||
+ </Compiler>
|
||||
+ <Unit filename="main.cpp" />
|
||||
+ <Extensions>
|
||||
+ <lib_finder disable_auto="1" />
|
||||
+ </Extensions>
|
||||
+ </Project>
|
||||
+</CodeBlocks_project_file>
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (main)
|
||||
$ git add main.cpp
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (main)
|
||||
$ git commit -m 'code: add product'
|
||||
[main 86ac768] code: add product
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (main)
|
||||
$ git reset --hard HEAD~1
|
||||
HEAD is now at 8f7d08d git: ignore
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (main)
|
||||
$ git checkout HEAD -- main.cpp
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (main)
|
||||
$ ssh-keygen
|
||||
Generating public/private ed25519 key pair.
|
||||
Enter file in which to save the key (/c/Users/User/.ssh/id_ed25519):
|
||||
Created directory '/c/Users/User/.ssh'.
|
||||
Enter passphrase (empty for no passphrase):
|
||||
Enter same passphrase again:
|
||||
Your identification has been saved in /c/Users/User/.ssh/id_ed25519
|
||||
Your public key has been saved in /c/Users/User/.ssh/id_ed25519.pub
|
||||
The key fingerprint is:
|
||||
SHA256:iQDyxw87WI0qXhKAn9t6OgKgDVlPYOoJiSsikKIYlNc User@2048-T079
|
||||
The key's randomart image is:
|
||||
+--[ED25519 256]--+
|
||||
|+.=.. |
|
||||
|=O.+.E |
|
||||
|X=o+B . |
|
||||
|@o==.= . . |
|
||||
|@*o+o o S |
|
||||
|B.= .. |
|
||||
|.. . |
|
||||
|. o . |
|
||||
| ..+ |
|
||||
+----[SHA256]-----+
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (main)
|
||||
$ eval $(ssh-agent -s)
|
||||
Agent pid 413
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (main)
|
||||
$ ssh-add 3240528a
|
||||
3240528a: No such file or directory
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (main)
|
||||
$ ssh-add
|
||||
Enter passphrase for /c/Users/User/.ssh/id_ed25519:
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (main)
|
||||
$ cat ~/.ssh/id_ed25519.pub
|
||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIJT/nnuIZgEnFpr2xrsRKEUBrjnR0GGkcJglOgB4yaF User@2048-T079
|
||||
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (main)
|
||||
$ eval $(ssh-agent -s)
|
||||
Agent pid 560
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (main)
|
||||
$ ssh-add ~/.ssh/id_ed25519
|
||||
Enter passphrase for /c/Users/User/.ssh/id_ed25519:
|
||||
Identity added: /c/Users/User/.ssh/id_ed25519 (User@2048-T079)
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (main)
|
||||
$ ssh -T git@github.com
|
||||
The authenticity of host 'github.com (140.82.121.3)' can't be established.
|
||||
ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU.
|
||||
This key is not known by any other names.
|
||||
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
|
||||
Warning: Permanently added 'github.com' (ED25519) to the list of known hosts.git@github.com: Permission denied (publickey).
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (main)
|
||||
$ git remote set-url origin http://uit.mpei.ru/git/PokhilAA/cs-lab02.git
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (main)
|
||||
$ git push -u origin main
|
||||
warning: auto-detection of host provider took too long (>2000ms)
|
||||
warning: see https://aka.ms/gcm/autodetect for more information.
|
||||
Enumerating objects: 12, done.
|
||||
Counting objects: 100% (12/12), done.
|
||||
Delta compression using up to 4 threads
|
||||
Compressing objects: 100% (10/10), done.
|
||||
Writing objects: 100% (12/12), 1.60 KiB | 71.00 KiB/s, done.
|
||||
Total 12 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
|
||||
remote: . Processing 1 references
|
||||
remote: Processed 1 references in total
|
||||
To http://uit.mpei.ru/git/PokhilAA/cs-lab02.git
|
||||
* [new branch] main -> main
|
||||
branch 'main' set up to track 'origin/main'.
|
||||
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/bob
|
||||
$ git clone http://uit.mpei.ru/git/PokhilAA/cs-lab02.git project
|
||||
Cloning into 'project'...
|
||||
remote: Enumerating objects: 12, done.
|
||||
remote: Counting objects: 100% (12/12), done.
|
||||
remote: Compressing objects: 100% (10/10), done.
|
||||
remote: Total 12 (delta 0), reused 0 (delta 0), pack-reused 0
|
||||
Receiving objects: 100% (12/12), done.
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/bob
|
||||
$ cd project
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/bob/project (main)
|
||||
$ git config user.name 'Bob(PokhilAA)'
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/bob/project (main)
|
||||
$ git config user.email 'PokhilAA@mpei.ru'
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/bob/project (main)
|
||||
$ git add main.cpp
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/bob/project (main)
|
||||
$ git commit -m 'code: add product'
|
||||
[main 3f1263e] code: add product
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/bob/project (main)
|
||||
$ git show HEAD
|
||||
commit 3f1263edb1b77a68682228d6df1e9902bfa73efc (HEAD -> main)
|
||||
Author: Bob(PokhilAA) <POkhilAA@mpei.ru>
|
||||
Date: Sun Apr 7 16:27:47 2024 +0300
|
||||
|
||||
code: add product
|
||||
|
||||
diff --git a/main.cpp b/main.cpp
|
||||
index f9e7fe7..fbd9488 100644
|
||||
--- a/main.cpp
|
||||
+++ b/main.cpp
|
||||
@@ -7,6 +7,8 @@ int main()
|
||||
cout << "Enter A and B: ";
|
||||
int a, b;
|
||||
cin >> a >> b;
|
||||
- cout << "A + B = " << a + b << '\n' << "A - B = " << a - b << '\n' << a * b << '\n';
|
||||
+ cout << "A + B = " << a + b << '\n'
|
||||
+ << "A - B = " << a - b << '\n'
|
||||
+ << "A * B = " << a * b << '\n';
|
||||
return 0;
|
||||
}
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (main)
|
||||
$ git pull --ff-only
|
||||
Updating 55eed96..3f1263e
|
||||
Fast-forward
|
||||
main.cpp | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (main)
|
||||
$ git add main.cpp
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (main)
|
||||
$ git commit -m 'code: add division'
|
||||
[main f9b6a2a] code: add division
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (main)
|
||||
$ git show HEAD
|
||||
commit f9b6a2a38b7eaeeb1db2ad5bbd7c78a30508792f (HEAD -> main)
|
||||
Author: Alice(PokhilAA) <PokhilAA@mpei.ru>
|
||||
Date: Sun Apr 7 17:08:30 2024 +0300
|
||||
|
||||
code: add division
|
||||
|
||||
diff --git a/main.cpp b/main.cpp
|
||||
index fbd9488..862d630 100644
|
||||
--- a/main.cpp
|
||||
+++ b/main.cpp
|
||||
@@ -9,6 +9,7 @@ int main()
|
||||
cin >> a >> b;
|
||||
cout << "A + B = " << a + b << '\n'
|
||||
<< "A - B = " << a - b << '\n'
|
||||
- << "A * B = " << a * b << '\n';
|
||||
+ << "A * B = " << a * b << '\n'
|
||||
+ << "A / B = " << a / b << '\n';
|
||||
return 0;
|
||||
}
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (main)
|
||||
$ git push
|
||||
Enumerating objects: 5, done.
|
||||
Counting objects: 100% (5/5), done.
|
||||
Delta compression using up to 4 threads
|
||||
Compressing objects: 100% (3/3), done.
|
||||
Writing objects: 100% (3/3), 388 bytes | 77.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 http://uit.mpei.ru/git/PokhilAA/cs-lab02.git
|
||||
3f1263e..f9b6a2a main -> main
|
||||
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/bob/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), 368 bytes | 5.00 KiB/s, done.
|
||||
From http://uit.mpei.ru/git/PokhilAA/cs-lab02
|
||||
3f1263e..f9b6a2a main -> origin/main
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/bob/project (main)
|
||||
$ git log --oneline --decorate --all -graph
|
||||
fatal: unrecognized argument: -graph
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/bob/project (main)
|
||||
$ git log --oneline --decorate --all --graph
|
||||
* f9b6a2a (origin/main, origin/HEAD) code: add division
|
||||
* 3f1263e (HEAD -> main) code: add product
|
||||
* 55eed96 code: add dif
|
||||
* 2cfce15 git: ignore
|
||||
* 85956f5 code: add sum
|
||||
* 3f0cb33 build: add project file
|
||||
* 8e1c069 code: preperation of the program
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/bob/project (main)
|
||||
$ git pull --ff-only
|
||||
Updating 3f1263e..f9b6a2a
|
||||
Fast-forward
|
||||
main.cpp | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (main)
|
||||
$ git add main.cpp
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (main)
|
||||
$ git commit -m 'code: add search for the maximum'
|
||||
[main 9adbcf4] code: add search for the maximum
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (main)
|
||||
$ git push
|
||||
Enumerating objects: 5, done.
|
||||
Counting objects: 100% (5/5), done.
|
||||
Delta compression using up to 4 threads
|
||||
Compressing objects: 100% (3/3), done.
|
||||
Writing objects: 100% (3/3), 429 bytes | 107.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 http://uit.mpei.ru/git/PokhilAA/cs-lab02.git
|
||||
f9b6a2a..9adbcf4 main -> main
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/bob/project (main)
|
||||
$ git add main.cpp
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/bob/project (main)
|
||||
$ git commit -m 'code: search for the minimum'
|
||||
[main f8bb881] code: search for the minimum
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/bob/project (main)
|
||||
$ git push
|
||||
To http://uit.mpei.ru/git/PokhilAA/cs-lab02.git
|
||||
! [rejected] main -> main (fetch first)
|
||||
error: failed to push some refs to 'http://uit.mpei.ru/git/PokhilAA/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.
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/bob/project (main)
|
||||
$ git pull --ff-only
|
||||
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 | 4.00 KiB/s, done.
|
||||
From http://uit.mpei.ru/git/PokhilAA/cs-lab02
|
||||
f9b6a2a..9adbcf4 main -> origin/main
|
||||
hint: Diverging branches can't be fast-forwarded, you need to either:
|
||||
hint:
|
||||
hint: git merge --no-ff
|
||||
hint:
|
||||
hint: or:
|
||||
hint:
|
||||
hint: git rebase
|
||||
hint:
|
||||
hint: Disable this message with "git config advice.diverging false"
|
||||
fatal: Not possible to fast-forward, aborting.
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/bob/project (main)
|
||||
$ git log --oneline --decorate --all --graph
|
||||
* f8bb881 (HEAD -> main) code: search for the minimum
|
||||
| * 9adbcf4 (origin/main, origin/HEAD) code: add search for the maximum
|
||||
|/
|
||||
* f9b6a2a code: add division
|
||||
* 3f1263e code: add product
|
||||
* 55eed96 code: add dif
|
||||
* 2cfce15 git: ignore
|
||||
* 85956f5 code: add sum
|
||||
* 3f0cb33 build: add project file
|
||||
* 8e1c069 code: preperation of the program
|
||||
|
||||
User@2048-T079 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 f8bb881... code: search for the minimum
|
||||
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 f8bb881... code: search for the minimum
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/bob/project (main|REBASE 1/1)
|
||||
$ git status
|
||||
interactive rebase in progress; onto 9adbcf4
|
||||
Last command done (1 command done):
|
||||
pick f8bb881 code: search for the minimum
|
||||
No commands remaining.
|
||||
You are currently rebasing branch 'main' on '9adbcf4'.
|
||||
(fix conflicts and then run "git rebase --continue")
|
||||
(use "git rebase --skip" to skip this patch)
|
||||
(use "git rebase --abort" to check out the original branch)
|
||||
|
||||
Unmerged paths:
|
||||
(use "git restore --staged <file>..." to unstage)
|
||||
(use "git add <file>..." to mark resolution)
|
||||
both modified: main.cpp
|
||||
|
||||
no changes added to commit (use "git add" and/or "git commit -a")
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/bob/project (main|REBASE 1/1)
|
||||
$ git add main.cpp
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/bob/project (main|REBASE 1/1)
|
||||
$ git rebase --continue
|
||||
[detached HEAD 3ae6da3] code: search for the minimum
|
||||
1 file changed, 4 insertions(+)
|
||||
Successfully rebased and updated refs/heads/main.
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/bob/project (main)
|
||||
$ git status
|
||||
On branch main
|
||||
Your branch is ahead of 'origin/main' by 1 commit.
|
||||
(use "git push" to publish your local commits)
|
||||
|
||||
nothing to commit, working tree clean
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/bob/project (main)
|
||||
$ git push
|
||||
Enumerating objects: 5, done.
|
||||
Counting objects: 100% (5/5), done.
|
||||
Delta compression using up to 4 threads
|
||||
Compressing objects: 100% (3/3), done.
|
||||
Writing objects: 100% (3/3), 396 bytes | 79.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 http://uit.mpei.ru/git/PokhilAA/cs-lab02.git
|
||||
9adbcf4..3ae6da3 main -> main
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (main)
|
||||
$ git branch double
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (main)
|
||||
$ git checkout double
|
||||
Switched to branch 'double'
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (double)
|
||||
$ git add main.cpp
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (double)
|
||||
$ git commit -m 'code: type change'
|
||||
[double 0bede23] code: type change
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (double)
|
||||
$ git checkout main
|
||||
Switched to branch 'main'
|
||||
Your branch is up to date with 'origin/main'.
|
||||
|
||||
User@2048-T079 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), 376 bytes | 5.00 KiB/s, done.
|
||||
From http://uit.mpei.ru/git/PokhilAA/cs-lab02
|
||||
9adbcf4..3ae6da3 main -> origin/main
|
||||
Updating 9adbcf4..3ae6da3
|
||||
Fast-forward
|
||||
main.cpp | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (main)
|
||||
$ git merge double
|
||||
Auto-merging main.cpp
|
||||
hint: Waiting for your editor to close the file... 0 [sig] bash 1629! sigpacket::process: Suppressing signal 18 to win32 process (pid 17404)
|
||||
249739 [sig] bash 1629! sigpacket::process: Suppressing signal 18 to win32 process (pid 17404)
|
||||
1907490 [sig] bash 1629! sigpacket::process: Suppressing signal 18 to win32 process (pid 17404)
|
||||
19948368 [sig] bash 1629! sigpacket::process: Suppressing signal 18 to win32 process (pid 17404)
|
||||
Merge made by the 'ort' strategy.
|
||||
main.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (main)
|
||||
$ git push
|
||||
Enumerating objects: 10, done.
|
||||
Counting objects: 100% (10/10), done.
|
||||
Delta compression using up to 4 threads
|
||||
Compressing objects: 100% (6/6), done.
|
||||
Writing objects: 100% (6/6), 686 bytes | 36.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 http://uit.mpei.ru/git/PokhilAA/cs-lab02.git
|
||||
3ae6da3..0c4cf29 main -> main
|
||||
|
||||
|
||||
User@2048-T079 MINGW64 ~/Desktop/lab02/alice/project (main)
|
||||
$ git log
|
||||
commit 0c4cf293c5251ec4ed5e7155bc748b86d0e6f931 (HEAD -> main, origin/main)
|
||||
Merge: 3ae6da3 0bede23
|
||||
Author: Alice(PokhilAA) <PokhilAA@mpei.ru>
|
||||
Date: Sun Apr 7 17:40:56 2024 +0300
|
||||
|
||||
Merge branch 'double'
|
||||
|
||||
commit 0bede23e57cfe4e77cdfb09fb07b033bf37e7fac (double)
|
||||
Author: Alice(PokhilAA) <PokhilAA@mpei.ru>
|
||||
Date: Sun Apr 7 17:34:35 2024 +0300
|
||||
|
||||
code: type change
|
||||
|
||||
commit 3ae6da33401ec9f8176d410d8f267a567d8f5b46
|
||||
Author: Bob(PokhilAA) <POkhilAA@mpei.ru>
|
||||
Date: Sun Apr 7 17:18:35 2024 +0300
|
||||
|
||||
code: search for the minimum
|
||||
|
||||
commit 9adbcf46948e1a917fdde77f0aa12b8d1f2c6cf5
|
||||
Author: Alice(PokhilAA) <PokhilAA@mpei.ru>
|
||||
Date: Sun Apr 7 17:15:03 2024 +0300
|
||||
|
||||
code: add search for the maximum
|
||||
|
||||
commit f9b6a2a38b7eaeeb1db2ad5bbd7c78a30508792f
|
||||
Author: Alice(PokhilAA) <PokhilAA@mpei.ru>
|
||||
Date: Sun Apr 7 17:08:30 2024 +0300
|
||||
|
||||
code: add division
|
||||
|
||||
commit 3f1263edb1b77a68682228d6df1e9902bfa73efc
|
||||
Author: Bob(PokhilAA) <POkhilAA@mpei.ru>
|
||||
Date: Sun Apr 7 16:27:47 2024 +0300
|
||||
|
||||
code: add product
|
||||
|
||||
commit 55eed96353a004f3a082bf195bf7c48b1e16a468
|
||||
Author: Alice(PokhilAA) <PokhilAA@mpai.ru>
|
||||
Date: Mon Mar 25 00:26:02 2024 +0300
|
||||
|
||||
code: add dif
|
||||
|
||||
commit 2cfce152d7ee8a459d19492b1735fb13f304f2ed
|
||||
Author: Alice(PokhilAA) <PokhilAA@mpai.ru>
|
||||
Date: Sun Mar 24 23:44:43 2024 +0300
|
||||
|
||||
git: ignore
|
||||
|
||||
commit 85956f584ceffea6f898377f033762f165eff654
|
||||
Author: Alice(PokhilAA) <PokhilAA@mpai.ru>
|
||||
Date: Sun Mar 24 23:40:12 2024 +0300
|
||||
|
||||
code: add sum
|
||||
|
||||
commit 3f0cb3363058e3732dac589c7a008e13c8cb1368
|
||||
Author: Alice(PokhilAA) <PokhilAA@mpai.ru>
|
||||
Date: Sun Mar 24 23:37:14 2024 +0300
|
||||
|
||||
build: add project file
|
||||
|
||||
commit 8e1c06913a5f53af1230e3ebd06cb60283bd7179
|
||||
Author: Alice(PokhilAA) <PokhilAA@mpai.ru>
|
||||
Date: Sun Mar 24 23:36:35 2024 +0300
|
||||
|
||||
code: preperation of the program
|
||||
|
||||
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user