Вы не можете выбрать более 25 тем
Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
832 строки
26 KiB
Markdown
832 строки
26 KiB
Markdown
Microsoft Windows [Version 10.0.22621.1413]
|
|
(c) Корпорация Майкрософт (Microsoft Corporation). Все права защищены.
|
|
|
|
C:\Users\Acer>mkdir cs-lab02
|
|
|
|
C:\Users\Acer>cd cs-lab02
|
|
|
|
C:\Users\Acer\cs-lab02>mkdir Alice
|
|
|
|
C:\Users\Acer\cs-lab02>mkdir Bob
|
|
|
|
C:\Users\Acer\cs-lab02>cd Alice
|
|
|
|
C:\Users\Acer\cs-lab02\Alice>mkdir project
|
|
|
|
C:\Users\Acer\cs-lab02\Alice>cd project
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git init
|
|
Initialized empty Git repository in C:/Users/Acer/cs-lab02/Alice/project/.git/
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git config user.name 'Alice (SekirinAA)'
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git config user.email 'yesartem7@gmail.com'
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>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)
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git add main.cpp
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git commit -m "code: заготовка программы"
|
|
[master (root-commit) 65e82c5] code: заготовка программы
|
|
1 file changed, 0 insertions(+), 0 deletions(-)
|
|
create mode 100644 main.cpp
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git status **### Изменение статуса файла main.cpp, теперь в staging area только project.cbp**
|
|
On branch master
|
|
Untracked files:
|
|
(use "git add <file>..." to include in what will be committed)
|
|
project.cbp
|
|
|
|
nothing added to commit but untracked files present (use "git add" to track)
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git add project.cbp
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git status
|
|
On branch master
|
|
Changes to be committed:
|
|
(use "git restore --staged <file>..." to unstage)
|
|
new file: project.cbp
|
|
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git commit -m "build: update CMake version"
|
|
[master 9fa39a8] build: update CMake version
|
|
1 file changed, 0 insertions(+), 0 deletions(-)
|
|
create mode 100644 project.cbp
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git status **### Теперь все файлы попали в комит**
|
|
|
|
On branch master
|
|
nothing to commit, working tree clean
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>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
|
|
|
|
no changes added to commit (use "git add" and/or "git commit -a")
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git add main.cpp
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git commit -m "Input commit"
|
|
[master 6496448] Input commit
|
|
1 file changed, 3 insertions(+)
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git add main.cpp
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git commit -m "Sum commit"
|
|
[master 2693db2] Sum commit
|
|
1 file changed, 1 insertion(+)
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git add main.cpp
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git status
|
|
On branch master
|
|
Changes to be committed:
|
|
(use "git restore --staged <file>..." to unstage)
|
|
modified: main.cpp
|
|
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git commit -m "Substract commit"
|
|
[master ce5ac27] Substract commit
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git log --stat **### Последние несколь комитов были основаны на доработке main. Снизу показано эти изменения с количеством внесенных доработок**
|
|
|
|
commit ce5ac27337bb354a33f6ca9ffc23126f3981ae7f (HEAD -> master)
|
|
Author: Alice <yesartem7@gmail.com>
|
|
Date: Sun Mar 19 14:43:59 2023 +0300
|
|
|
|
Substract commit
|
|
|
|
main.cpp | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
commit 2693db260fca121e26d51465c78245a5ecef02d6
|
|
Author: Alice <yesartem7@gmail.com>
|
|
Date: Sun Mar 19 14:42:51 2023 +0300
|
|
|
|
Sum commit
|
|
|
|
main.cpp | 1 +
|
|
1 file changed, 1 insertion(+)
|
|
|
|
commit 649644893fa6796ff806f905ed0645f23ddfbcec
|
|
Author: Alice <yesartem7@gmail.com>
|
|
Date: Sun Mar 19 14:42:12 2023 +0300
|
|
|
|
Input commit
|
|
|
|
main.cpp | 3 +++
|
|
1 file changed, 3 insertions(+)
|
|
|
|
commit 9fa39a877a5752838e54b8686121b026bef3efa2
|
|
Author: Alice <yesartem7@gmail.com>
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git log --oneline --decorate
|
|
ce5ac27 (HEAD -> master) Substract commit
|
|
2693db2 Sum commit
|
|
6496448 Input commit
|
|
9fa39a8 build: update CMake version
|
|
65e82c5 code: заготовка программы
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git log --oneline --decorate --all --graph
|
|
* ce5ac27 (HEAD -> master) Substract commit
|
|
* 2693db2 Sum commit
|
|
* 6496448 Input commit
|
|
* 9fa39a8 build: update CMake version
|
|
* 65e82c5 code: заготовка программы
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git log -- main.cpp
|
|
commit ce5ac27337bb354a33f6ca9ffc23126f3981ae7f (HEAD -> master)
|
|
Author: Alice <yesartem7@gmail.com>
|
|
Date: Sun Mar 19 14:43:59 2023 +0300
|
|
|
|
Substract commit
|
|
|
|
commit 2693db260fca121e26d51465c78245a5ecef02d6
|
|
Author: Alice <yesartem7@gmail.com>
|
|
Date: Sun Mar 19 14:42:51 2023 +0300
|
|
|
|
Sum commit
|
|
|
|
commit 649644893fa6796ff806f905ed0645f23ddfbcec
|
|
Author: Alice <yesartem7@gmail.com>
|
|
Date: Sun Mar 19 14:42:12 2023 +0300
|
|
|
|
Input commit
|
|
|
|
commit 65e82c581f4e90fb8404e87809e3d449694a17b5
|
|
Author: Alice <yesartem7@gmail.com>
|
|
Date: Sun Mar 19 14:39:56 2023 +0300
|
|
|
|
code: заготовка программы
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git log -- project.cbp
|
|
commit 9fa39a877a5752838e54b8686121b026bef3efa2
|
|
Author: Alice <yesartem7@gmail.com>
|
|
Date: Sun Mar 19 14:40:41 2023 +0300
|
|
|
|
build: update CMake version
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git log --grep "code:"
|
|
commit 65e82c581f4e90fb8404e87809e3d449694a17b5
|
|
Author: Alice <yesartem7@gmail.com>
|
|
Date: Sun Mar 19 14:39:56 2023 +0300
|
|
|
|
code: заготовка программы
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git log --grep "build:"
|
|
commit 9fa39a877a5752838e54b8686121b026bef3efa2
|
|
Author: Alice <yesartem7@gmail.com>
|
|
Date: Sun Mar 19 14:40:41 2023 +0300
|
|
|
|
build: update CMake version
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git show HEAD
|
|
commit ce5ac27337bb354a33f6ca9ffc23126f3981ae7f (HEAD -> master)
|
|
Author: Alice <yesartem7@gmail.com>
|
|
Date: Sun Mar 19 14:43:59 2023 +0300
|
|
|
|
Substract commit
|
|
|
|
diff --git a/main.cpp b/main.cpp
|
|
index 3f82240..7e94306 100644
|
|
--- a/main.cpp
|
|
+++ b/main.cpp
|
|
@@ -1,4 +1,5 @@
|
|
cout << "Enter A and B: ";
|
|
int a, b;
|
|
cin >> a >> b;
|
|
-cout << "A + B = " << a + b << '\n';
|
|
\ No newline at end of file
|
|
+cout << "A + B = " << a + b << '\n'
|
|
+<< "A - B = " << a - b << '\n';
|
|
\ No newline at end of file
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git show master
|
|
commit ce5ac27337bb354a33f6ca9ffc23126f3981ae7f (HEAD -> master)
|
|
Author: Alice <yesartem7@gmail.com>
|
|
Date: Sun Mar 19 14:43:59 2023 +0300
|
|
|
|
Substract commit
|
|
|
|
diff --git a/main.cpp b/main.cpp
|
|
index 3f82240..7e94306 100644
|
|
--- a/main.cpp
|
|
+++ b/main.cpp
|
|
@@ -1,4 +1,5 @@
|
|
cout << "Enter A and B: ";
|
|
int a, b;
|
|
cin >> a >> b;
|
|
-cout << "A + B = " << a + b << '\n';
|
|
\ No newline at end of file
|
|
+cout << "A + B = " << a + b << '\n'
|
|
+<< "A - B = " << a - b << '\n';
|
|
\ No newline at end of file
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git show ce5ac27
|
|
commit ce5ac27337bb354a33f6ca9ffc23126f3981ae7f (HEAD -> master)
|
|
Author: Alice <yesartem7@gmail.com>
|
|
Date: Sun Mar 19 14:43:59 2023 +0300
|
|
|
|
Substract commit
|
|
|
|
diff --git a/main.cpp b/main.cpp
|
|
index 3f82240..7e94306 100644
|
|
--- a/main.cpp
|
|
+++ b/main.cpp
|
|
@@ -1,4 +1,5 @@
|
|
cout << "Enter A and B: ";
|
|
int a, b;
|
|
cin >> a >> b;
|
|
-cout << "A + B = " << a + b << '\n';
|
|
\ No newline at end of file
|
|
+cout << "A + B = " << a + b << '\n'
|
|
+<< "A - B = " << a - b << '\n';
|
|
\ No newline at end of file
|
|
|
|
### Просмотр предпоследнего комита
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git show HEAD~1
|
|
commit 2693db260fca121e26d51465c78245a5ecef02d6
|
|
Author: Alice <yesartem7@gmail.com>
|
|
Date: Sun Mar 19 14:42:51 2023 +0300
|
|
|
|
Sum commit
|
|
|
|
diff --git a/main.cpp b/main.cpp
|
|
index 8bec571..3f82240 100644
|
|
--- a/main.cpp
|
|
+++ b/main.cpp
|
|
@@ -1,3 +1,4 @@
|
|
cout << "Enter A and B: ";
|
|
int a, b;
|
|
cin >> a >> b;
|
|
+cout << "A + B = " << a + b << '\n';
|
|
\ No newline at end of file
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git show master~1
|
|
commit 2693db260fca121e26d51465c78245a5ecef02d6
|
|
Author: Alice <yesartem7@gmail.com>
|
|
Date: Sun Mar 19 14:42:51 2023 +0300
|
|
|
|
Sum commit
|
|
|
|
diff --git a/main.cpp b/main.cpp
|
|
index 8bec571..3f82240 100644
|
|
--- a/main.cpp
|
|
+++ b/main.cpp
|
|
@@ -1,3 +1,4 @@
|
|
cout << "Enter A and B: ";
|
|
int a, b;
|
|
cin >> a >> b;
|
|
+cout << "A + B = " << a + b << '\n';
|
|
\ No newline at end of file
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git show 2693db260
|
|
commit 2693db260fca121e26d51465c78245a5ecef02d6
|
|
Author: Alice <yesartem7@gmail.com>
|
|
Date: Sun Mar 19 14:42:51 2023 +0300
|
|
|
|
Sum commit
|
|
|
|
diff --git a/main.cpp b/main.cpp
|
|
index 8bec571..3f82240 100644
|
|
--- a/main.cpp
|
|
+++ b/main.cpp
|
|
@@ -1,3 +1,4 @@
|
|
cout << "Enter A and B: ";
|
|
int a, b;
|
|
cin >> a >> b;
|
|
+cout << "A + B = " << a + b << '\n';
|
|
\ No newline at end of file
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git diff **### Показывает новую строку с выводом умножением и исправление предыдущей, поэтому внизу указано две строки как новые, но на самом деле в строке вывода разности изменился только последний символ ' ; '**
|
|
diff --git a/main.cpp b/main.cpp
|
|
index 7e94306..08ab8a5 100644
|
|
--- a/main.cpp
|
|
+++ b/main.cpp
|
|
@@ -2,4 +2,5 @@ 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
|
|
+<< "A - B = " << a - b << '\n'
|
|
+<< "A * B = " << a * b << '\n';
|
|
\ No newline at end of file
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git diff HEAD~2
|
|
diff --git a/main.cpp b/main.cpp
|
|
index 8bec571..08ab8a5 100644
|
|
--- a/main.cpp
|
|
+++ b/main.cpp
|
|
@@ -1,3 +1,6 @@
|
|
cout << "Enter A and B: ";
|
|
int a, b;
|
|
cin >> a >> b;
|
|
+cout << "A + B = " << a + b << '\n'
|
|
+<< "A - B = " << a - b << '\n'
|
|
+<< "A * B = " << a * b << '\n';
|
|
\ No newline at end of file
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git diff HEAD~2 HEAD
|
|
diff --git a/main.cpp b/main.cpp
|
|
index 8bec571..7e94306 100644
|
|
--- a/main.cpp
|
|
+++ b/main.cpp
|
|
@@ -1,3 +1,5 @@
|
|
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
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git diff ce5ac273 65e82c581f4
|
|
diff --git a/main.cpp b/main.cpp
|
|
index 7e94306..e69de29 100644
|
|
--- a/main.cpp
|
|
+++ b/main.cpp
|
|
@@ -1,5 +0,0 @@
|
|
-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.cbp b/project.cbp
|
|
deleted file mode 100644
|
|
index e69de29..0000000
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>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
|
|
|
|
no changes added to commit (use "git add" and/or "git commit -a")
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git add main.cpp
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git commit -m "Mult commit"
|
|
[master 9d3aae8] Mult commit
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git reset --hard ce5ac273
|
|
HEAD is now at ce5ac27 Substract commit
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git add main.cpp
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git commit -m "Comment"
|
|
[master 3a839b5] Comment
|
|
1 file changed, 1 insertion(+)
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git checkout ce5ac273 -- main.cpp
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git status
|
|
On branch master
|
|
Changes to be committed:
|
|
(use "git restore --staged <file>..." to unstage)
|
|
modified: main.cpp
|
|
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git diff
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git add .
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git commit -m "Substract commit'
|
|
[master 33678e1] Substract commit'
|
|
1 file changed, 1 deletion(-)
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>ssh-keygen
|
|
Generating public/private rsa key pair.
|
|
Enter file in which to save the key (C:\Users\Acer/.ssh/id_rsa):
|
|
C:\Users\Acer/.ssh/id_rsa already exists.
|
|
Overwrite (y/n)? y
|
|
Enter passphrase (empty for no passphrase):
|
|
Enter same passphrase again:
|
|
Your identification has been saved in C:\Users\Acer/.ssh/id_rsa
|
|
Your public key has been saved in C:\Users\Acer/.ssh/id_rsa.pub
|
|
The key fingerprint is:
|
|
SHA256:P0ehxo59Ed+yyCt1SSePalsygtjoxD3MFeZI8nJmWiw acer@LAPTOP-K0BR1KHH
|
|
The key's randomart image is:
|
|
+---[RSA 3072]----+
|
|
| |
|
|
| |
|
|
| . . o o |
|
|
| = = o +o..|
|
|
| E S * o.o*.|
|
|
| . / O o.o+o.|
|
|
| * O *.Boo |
|
|
| o ..=o= |
|
|
| . oo. |
|
|
+----[SHA256]-----+
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git remote add origin http://uit.mpei.ru/git/SekirinAA/cs-lab02.git
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git push -u origin main
|
|
error: src refspec main does not match any
|
|
error: failed to push some refs to 'http://uit.mpei.ru/git/SekirinAA/cs-lab02.git'
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git push -u origin master
|
|
Enumerating objects: 18, done.
|
|
Counting objects: 100% (18/18), done.
|
|
Delta compression using up to 8 threads
|
|
Compressing objects: 100% (16/16), done.
|
|
Writing objects: 100% (18/18), 1.62 KiB | 554.00 KiB/s, done.
|
|
Total 18 (delta 4), reused 0 (delta 0), pack-reused 0
|
|
remote: . Processing 1 references
|
|
remote: Processed 1 references in total
|
|
To http://uit.mpei.ru/git/SekirinAA/cs-lab02.git
|
|
* [new branch] master -> master
|
|
branch 'master' set up to track 'origin/master'.
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>cd ..
|
|
|
|
C:\Users\Acer\cs-lab02\Alice>cd ..
|
|
|
|
C:\Users\Acer\cs-lab02>cd Bob
|
|
|
|
C:\Users\Acer\cs-lab02\Bob>git clone http://uit.mpei.ru/git/SekirinAA/cs-lab02.git project
|
|
Cloning into 'project'...
|
|
remote: Enumerating objects: 18, done.
|
|
remote: Counting objects: 100% (18/18), done.
|
|
remote: Compressing objects: 100% (16/16), done.
|
|
remote: Total 18 (delta 4), reused 0 (delta 0), pack-reused 0
|
|
Receiving objects: 100% (18/18), done.
|
|
Resolving deltas: 100% (4/4), done.
|
|
|
|
C:\Users\Acer\cs-lab02\Bob>cd project
|
|
|
|
C:\Users\Acer\cs-lab02\Bob\project>git config user.name 'Bob (SekirinAA)'
|
|
|
|
C:\Users\Acer\cs-lab02\Bob\project>git config user.email 'yesartem7@gmail.com'
|
|
|
|
C:\Users\Acer\cs-lab02\Bob\project>git status
|
|
On branch master
|
|
Your branch is up to date with 'origin/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
|
|
|
|
no changes added to commit (use "git add" and/or "git commit -a")
|
|
|
|
C:\Users\Acer\cs-lab02\Bob\project>git add main.cpp
|
|
|
|
C:\Users\Acer\cs-lab02\Bob\project>git commit -m "Mult commit by Bob"
|
|
[master 526a809] Mult commit by Bob
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
C:\Users\Acer\cs-lab02\Bob\project>git push
|
|
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), 331 bytes | 331.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 http://uit.mpei.ru/git/SekirinAA/cs-lab02.git
|
|
33678e1..526a809 master -> master
|
|
|
|
C:\Users\Acer\cs-lab02\Bob\project>cd ..
|
|
|
|
C:\Users\Acer\cs-lab02\Bob>cd ..
|
|
|
|
C:\Users\Acer\cs-lab02>cd Alice
|
|
|
|
C:\Users\Acer\cs-lab02\Alice>cd project
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>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), 311 bytes | 0 bytes/s, done.
|
|
From http://uit.mpei.ru/git/SekirinAA/cs-lab02
|
|
33678e1..526a809 master -> origin/master
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git log --oneline --decorate --all --graph
|
|
* 526a809 (origin/master) Mult commit by Bob
|
|
* 33678e1 (HEAD -> master) Substract commit'
|
|
* 3a839b5 Comment
|
|
* ce5ac27 Substract commit
|
|
* 2693db2 Sum commit
|
|
* 6496448 Input commit
|
|
* 9fa39a8 build: update CMake version
|
|
* 65e82c5 code: заготовка программы
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git pull --ff-only
|
|
Updating 33678e1..526a809
|
|
Fast-forward
|
|
main.cpp | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git add main.cpp
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git commit -m "Dividing by Alice"
|
|
[master 0f6b392] Dividing by Alice
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git push
|
|
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), 332 bytes | 332.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 http://uit.mpei.ru/git/SekirinAA/cs-lab02.git
|
|
526a809..0f6b392 master -> master
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>cd ..
|
|
|
|
C:\Users\Acer\cs-lab02\Alice>cd ..
|
|
|
|
C:\Users\Acer\cs-lab02>cd Bob
|
|
|
|
C:\Users\Acer\cs-lab02\Bob>cd project
|
|
|
|
C:\Users\Acer\cs-lab02\Bob\project>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), 312 bytes | 2.00 KiB/s, done.
|
|
From http://uit.mpei.ru/git/SekirinAA/cs-lab02
|
|
526a809..0f6b392 master -> origin/master
|
|
|
|
C:\Users\Acer\cs-lab02\Bob\project>git log --oneline --decorate --all --graph
|
|
* 0f6b392 (origin/master, origin/HEAD) Dividing by Alice
|
|
* 526a809 (HEAD -> master) Mult commit by Bob
|
|
* 33678e1 Substract commit'
|
|
* 3a839b5 Comment
|
|
* ce5ac27 Substract commit
|
|
* 2693db2 Sum commit
|
|
* 6496448 Input commit
|
|
* 9fa39a8 build: update CMake version
|
|
* 65e82c5 code: заготовка программы
|
|
|
|
C:\Users\Acer\cs-lab02\Bob\project>git pull --ff-only
|
|
Updating 526a809..0f6b392
|
|
Fast-forward
|
|
main.cpp | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
C:\Users\Acer\cs-lab02\Bob\project>cd ..
|
|
|
|
C:\Users\Acer\cs-lab02\Bob>cd ..
|
|
|
|
C:\Users\Acer\cs-lab02>cd Alice
|
|
|
|
C:\Users\Acer\cs-lab02\Alice>cd project
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git add main.cpp
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git commit -m "Max by Alice"
|
|
[master da310d9] Max by Alice
|
|
1 file changed, 7 insertions(+), 1 deletion(-)
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git push
|
|
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), 350 bytes | 350.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 http://uit.mpei.ru/git/SekirinAA/cs-lab02.git
|
|
0f6b392..da310d9 master -> master
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>cd ..
|
|
|
|
C:\Users\Acer\cs-lab02\Alice>cd ..
|
|
|
|
C:\Users\Acer\cs-lab02>cd Bob
|
|
|
|
C:\Users\Acer\cs-lab02\Bob>cd project
|
|
|
|
C:\Users\Acer\cs-lab02\Bob\project>git add main.cpp
|
|
|
|
C:\Users\Acer\cs-lab02\Bob\project>git commit -m "Min by Bob"
|
|
[master dbc922e] Min by Bob
|
|
1 file changed, 7 insertions(+), 1 deletion(-)
|
|
|
|
C:\Users\Acer\cs-lab02\Bob\project>git push
|
|
To http://uit.mpei.ru/git/SekirinAA/cs-lab02.git
|
|
! [rejected] master -> master (fetch first)
|
|
error: failed to push some refs to 'http://uit.mpei.ru/git/SekirinAA/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\Acer\cs-lab02\Bob\project>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), 330 bytes | 1024 bytes/s, done.
|
|
From http://uit.mpei.ru/git/SekirinAA/cs-lab02
|
|
0f6b392..da310d9 master -> origin/master
|
|
|
|
C:\Users\Acer\cs-lab02\Bob\project>git pull --ff-only
|
|
fatal: Not possible to fast-forward, aborting.
|
|
|
|
C:\Users\Acer\cs-lab02\Bob\project>git log --oneline --decorate --all --graph
|
|
* dbc922e (HEAD -> master) Min by Bob
|
|
| * da310d9 (origin/master, origin/HEAD) Max by Alice
|
|
|/
|
|
* 0f6b392 Dividing by Alice
|
|
* 526a809 Mult commit by Bob
|
|
* 33678e1 Substract commit'
|
|
* 3a839b5 Comment
|
|
* ce5ac27 Substract commit
|
|
* 2693db2 Sum commit
|
|
* 6496448 Input commit
|
|
* 9fa39a8 build: update CMake version
|
|
* 65e82c5 code: заготовка программы
|
|
|
|
C:\Users\Acer\cs-lab02\Bob\project>git pull --ff-only
|
|
fatal: Not possible to fast-forward, aborting.
|
|
|
|
C:\Users\Acer\cs-lab02\Bob\project>git rebase origin/master
|
|
Auto-merging main.cpp
|
|
CONFLICT (content): Merge conflict in main.cpp
|
|
error: could not apply dbc922e... Min by Bob
|
|
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 dbc922e... Min by Bob
|
|
|
|
C:\Users\Acer\cs-lab02\Bob\project>
|
|
C:\Users\Acer\cs-lab02\Bob\project>git add main.cpp
|
|
|
|
C:\Users\Acer\cs-lab02\Bob\project>git commit -m "Mergingtwo versions"
|
|
[detached HEAD 86774f4] Mergingtwo versions
|
|
1 file changed, 6 insertions(+)
|
|
|
|
C:\Users\Acer\cs-lab02\Bob\project>git rebase --continue
|
|
Successfully rebased and updated refs/heads/master.
|
|
|
|
C:\Users\Acer\cs-lab02\Bob\project>git log --oneline --decorate --all --graph
|
|
* 86774f4 (HEAD -> master) Mergingtwo versions
|
|
* da310d9 (origin/master, origin/HEAD) Max by Alice
|
|
* 0f6b392 Dividing by Alice
|
|
* 526a809 Mult commit by Bob
|
|
* 33678e1 Substract commit'
|
|
* 3a839b5 Comment
|
|
* ce5ac27 Substract commit
|
|
* 2693db2 Sum commit
|
|
* 6496448 Input commit
|
|
* 9fa39a8 build: update CMake version
|
|
* 65e82c5 code: заготовка программы
|
|
|
|
C:\Users\Acer\cs-lab02\Bob\project>cd ..
|
|
|
|
C:\Users\Acer\cs-lab02\Bob>cd ..
|
|
|
|
C:\Users\Acer\cs-lab02>cd Alice
|
|
|
|
C:\Users\Acer\cs-lab02\Alice>cd project
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git branch double
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git checkout double
|
|
Switched to branch 'double'
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git add main.cpp
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git commit -m "Changing type of variables"
|
|
[double 412d79f] Changing type of variables
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git checkout master
|
|
Switched to branch 'master'
|
|
Your branch is up to date with 'origin/master'.
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>cd ..
|
|
|
|
C:\Users\Acer\cs-lab02\Alice>cd ..
|
|
|
|
C:\Users\Acer\cs-lab02>cd Bob
|
|
|
|
C:\Users\Acer\cs-lab02\Bob>cd project
|
|
|
|
C:\Users\Acer\cs-lab02\Bob\project>git push
|
|
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), 351 bytes | 351.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 http://uit.mpei.ru/git/SekirinAA/cs-lab02.git
|
|
da310d9..86774f4 master -> master
|
|
|
|
C:\Users\Acer\cs-lab02\Bob\project>cd ..
|
|
|
|
C:\Users\Acer\cs-lab02\Bob>cd ..
|
|
|
|
C:\Users\Acer\cs-lab02>cd Alice
|
|
|
|
C:\Users\Acer\cs-lab02\Alice>cd project
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git brancg
|
|
git: 'brancg' is not a git command. See 'git --help'.
|
|
|
|
The most similar command is
|
|
branch
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git branch
|
|
double
|
|
* master
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>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), 331 bytes | 2.00 KiB/s, done.
|
|
From http://uit.mpei.ru/git/SekirinAA/cs-lab02
|
|
da310d9..86774f4 master -> origin/master
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git pull --ff-only
|
|
Updating da310d9..86774f4
|
|
Fast-forward
|
|
main.cpp | 6 ++++++
|
|
1 file changed, 6 insertions(+)
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git log --oneline --decorate --all --graph
|
|
* 412d79f (double) Changing type of variables
|
|
| * 86774f4 (HEAD -> master, origin/master) Mergingtwo versions
|
|
|/
|
|
* da310d9 Max by Alice
|
|
* 0f6b392 Dividing by Alice
|
|
* 526a809 Mult commit by Bob
|
|
* 33678e1 Substract commit'
|
|
* 3a839b5 Comment
|
|
* ce5ac27 Substract commit
|
|
* 2693db2 Sum commit
|
|
* 6496448 Input commit
|
|
* 9fa39a8 build: update CMake version
|
|
* 65e82c5 code: заготовка программы
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git merge double
|
|
Auto-merging main.cpp
|
|
Merge made by the 'ort' strategy.
|
|
main.cpp | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git push
|
|
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), 642 bytes | 642.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 http://uit.mpei.ru/git/SekirinAA/cs-lab02.git
|
|
86774f4..22b97fb master -> master
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>git log --oneline --decorate --all --graph
|
|
* 22b97fb (HEAD -> master, origin/master) Merge branch 'double'
|
|
|\
|
|
| * 412d79f (double) Changing type of variables
|
|
* | 86774f4 Mergingtwo versions
|
|
|/
|
|
* da310d9 Max by Alice
|
|
* 0f6b392 Dividing by Alice
|
|
* 526a809 Mult commit by Bob
|
|
* 33678e1 Substract commit'
|
|
* 3a839b5 Comment
|
|
* ce5ac27 Substract commit
|
|
* 2693db2 Sum commit
|
|
* 6496448 Input commit
|
|
* 9fa39a8 build: update CMake version
|
|
* 65e82c5 code: заготовка программы
|
|
|
|
C:\Users\Acer\cs-lab02\Alice\project>
|