Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

1020 строки
65 KiB
Plaintext


u113-07@PROG-27 MINGW32 ~/Desktop/lab-02
$ mkdir alice
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02
$ mkdir bob
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02
$ cd alice
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice
$ mkdir project
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice
$ cd project
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project
$ cd ..
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice
$ cd project
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project
$ git init
Initialized empty Git repository in C:/Users/u113-07/Desktop/lab-02/alice/project/.git/
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (master)
$ git branch -m main
error: refname refs/heads/master not found
fatal: Branch rename failed
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (master)
$ git config user.name 'Alice (GoloshchapovDY)'
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (master)
$ git config user.email 'GoloshchapovDY@mpei.ru'
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (master)
$ git add main.cpp
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (master)
$ git commit -m 'code: çàãîòîâêà ïðîãðàììû'
[master (root-commit) 1796bad] code: çàãîòîâêà ïðîãðàììû
1 file changed, 9 insertions(+)
create mode 100644 main.cpp
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (master)
$ git branch -m main
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git status
On branch main
Untracked files:
(use "git add <file>..." to include in what will be committed)
bin/
obj/
project.cbp
nothing added to commit but untracked files present (use "git add" to track)
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git add project.cbp
warning: LF will be replaced by CRLF in project.cbp.
The file will have its original line endings in your working directory
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git commit -m 'build:äîáàâëåí ôàéë ïðîåêòà'
[main 3cea021] build:äîáàâëåí ôàéë ïðîåêòà
1 file changed, 40 insertions(+)
create mode 100644 project.cbp
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/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 checkout -- <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")
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git add main.cpp
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git commit -m "code: ââîä 2 ÷èñåë"
[main 1d6e2c6] code: ââîä 2 ÷èñåë
1 file changed, 3 insertions(+), 1 deletion(-)
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git add main.cpp
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git commit -m "code: âûâîä ñóììû è ðàçíîñòè"
[main dc052d2] code: âûâîä ñóììû è ðàçíîñòè
1 file changed, 1 insertion(+)
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git status
On branch main
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)
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git add .gitignore
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git commit -m "git: èãíîðèðîâàíèå bin,obj,layout"
[main 09d09c6] git: èãíîðèðîâàíèå bin,obj,layout
1 file changed, 3 insertions(+)
create mode 100644 .gitignore
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git log --stat
commit 09d09c678d43085beed96dd185a6a55fdedb34d3 (HEAD -> main)
Author: Alice (GoloshchapovDY) <GoloshchapovDY@mpei.ru>
Date: Wed Mar 27 14:12:22 2024 +0300
git: èãíîðèðîâàíèå bin,obj,layout
.gitignore | 3 +++
1 file changed, 3 insertions(+)
commit dc052d2ca40a059242c83dbb2c0f3c56a3af5160
Author: Alice (GoloshchapovDY) <GoloshchapovDY@mpei.ru>
Date: Wed Mar 27 14:11:26 2024 +0300
code: âûâîä ñóììû è ðàçíîñòè
main.cpp | 1 +
1 file changed, 1 insertion(+)
commit 1d6e2c6d0771a01a0e4be10a95429259b79d0013
Author: Alice (GoloshchapovDY) <GoloshchapovDY@mpei.ru>
Date: Wed Mar 27 14:04:50 2024 +0300
code: ââîä 2 ÷èñåë
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git log --oneline --decorate
09d09c6 (HEAD -> main) git: èãíîðèðîâàíèå bin,obj,layout
dc052d2 code: âûâîä ñóììû è ðàçíîñòè
1d6e2c6 code: ââîä 2 ÷èñåë
3cea021 build:äîáàâëåí ôàéë ïðîåêòà
1796bad code: çàãîòîâêà ïðîãðàììû
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git log --oneline --decorate --all --graph
* 09d09c6 (HEAD -> main) git: èãíîðèðîâàíèå bin,obj,layout
* dc052d2 code: âûâîä ñóììû è ðàçíîñòè
* 1d6e2c6 code: ââîä 2 ÷èñåë
* 3cea021 build:äîáàâëåí ôàéë ïðîåêòà
* 1796bad code: çàãîòîâêà ïðîãðàììû
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git log -- project.cbp
commit 3cea021ccb615bd9d108014b956211e02188f146
Author: Alice (GoloshchapovDY) <GoloshchapovDY@mpei.ru>
Date: Wed Mar 27 13:59:18 2024 +0300
build:äîáàâëåí ôàéë ïðîåêòà
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git log --grep "build:"
commit 3cea021ccb615bd9d108014b956211e02188f146
Author: Alice (GoloshchapovDY) <GoloshchapovDY@mpei.ru>
Date: Wed Mar 27 13:59:18 2024 +0300
build:äîáàâëåí ôàéë ïðîåêòà
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git show HEAD
commit 09d09c678d43085beed96dd185a6a55fdedb34d3 (HEAD -> main)
Author: Alice (GoloshchapovDY) <GoloshchapovDY@mpei.ru>
Date: Wed Mar 27 14:12:22 2024 +0300
git: èãíîðèðîâàíèå bin,obj,layout
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..4d72a82
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+/bin
+/obj
+/project.layout
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git show main
commit 09d09c678d43085beed96dd185a6a55fdedb34d3 (HEAD -> main)
Author: Alice (GoloshchapovDY) <GoloshchapovDY@mpei.ru>
Date: Wed Mar 27 14:12:22 2024 +0300
git: èãíîðèðîâàíèå bin,obj,layout
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..4d72a82
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+/bin
+/obj
+/project.layout
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git show 09d09c678d43085beed96dd185a6a55fdedb34d3
commit 09d09c678d43085beed96dd185a6a55fdedb34d3 (HEAD -> main)
Author: Alice (GoloshchapovDY) <GoloshchapovDY@mpei.ru>
Date: Wed Mar 27 14:12:22 2024 +0300
git: èãíîðèðîâàíèå bin,obj,layout
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..4d72a82
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+/bin
+/obj
+/project.layout
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git show HEAD~1
commit dc052d2ca40a059242c83dbb2c0f3c56a3af5160
Author: Alice (GoloshchapovDY) <GoloshchapovDY@mpei.ru>
Date: Wed Mar 27 14:11:26 2024 +0300
code: âûâîä ñóììû è ðàçíîñòè
diff --git a/main.cpp b/main.cpp
index 0b72a92..d3bcbf9 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;
}
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git show main~1
commit dc052d2ca40a059242c83dbb2c0f3c56a3af5160
Author: Alice (GoloshchapovDY) <GoloshchapovDY@mpei.ru>
Date: Wed Mar 27 14:11:26 2024 +0300
code: âûâîä ñóììû è ðàçíîñòè
diff --git a/main.cpp b/main.cpp
index 0b72a92..d3bcbf9 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;
}
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git show ^C
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git show dc052d2ca40a059242c83dbb2c0f3c56a3af5160
commit dc052d2ca40a059242c83dbb2c0f3c56a3af5160
Author: Alice (GoloshchapovDY) <GoloshchapovDY@mpei.ru>
Date: Wed Mar 27 14:11:26 2024 +0300
code: âûâîä ñóììû è ðàçíîñòè
diff --git a/main.cpp b/main.cpp
index 0b72a92..d3bcbf9 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;
}
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git diff
diff --git a/main.cpp b/main.cpp
index d3bcbf9..0f7729c 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 "<<a*b<<'\n';
return 0;
}
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git diff HEAD~2
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..4d72a82
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+/bin
+/obj
+/project.layout
diff --git a/main.cpp b/main.cpp
index 0b72a92..0f7729c 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'<<"A*B "<<a*b<<'\n';
return 0;
}
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git diff HEAD~2 HEAD
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..4d72a82
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+/bin
+/obj
+/project.layout
diff --git a/main.cpp b/main.cpp
index 0b72a92..d3bcbf9 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;
}
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git diff HEAD~2 1796bad
diff --git a/main.cpp b/main.cpp
index 0b72a92..b4392ec 100644
--- a/main.cpp
+++ b/main.cpp
@@ -4,8 +4,6 @@ using namespace std;
int main()
{
- cout<<"Enter A and B: ";
- int a,b;
- cin>>a>>b;
+ cout << "Hello world!" << endl;
return 0;
}
diff --git a/project.cbp b/project.cbp
deleted file mode 100644
index 99bb702..0000000
--- a/project.cbp
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-<CodeBlocks_project_file>
- <FileVersion major="1" minor="6" />
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git diff dc052d2 1796bad
diff --git a/main.cpp b/main.cpp
index d3bcbf9..b4392ec 100644
--- a/main.cpp
+++ b/main.cpp
@@ -4,9 +4,6 @@ using namespace std;
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 << "Hello world!" << endl;
return 0;
}
diff --git a/project.cbp b/project.cbp
deleted file mode 100644
index 99bb702..0000000
--- a/project.cbp
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-<CodeBlocks_project_file>
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git add main.cpp
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git commit -m 'code:âûâîä ïðîèçâåäåíèÿ'
[main eec04d6] code:âûâîä ïðîèçâåäåíèÿ
1 file changed, 1 insertion(+), 1 deletion(-)
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git reset --hard HEAD~1
HEAD is now at 09d09c6 git: èãíîðèðîâàíèå bin,obj,layout
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git checkout HEAD -- main.cpp
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/u113-07/.ssh/id_rsa):
Created directory '/c/Users/u113-07/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/u113-07/.ssh/id_rsa.
Your public key has been saved in /c/Users/u113-07/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:r00RRv0IgWUgVIbc/ByeRGG5UqUlNwL5ov6DRrvhr8k u113-07@PROG-27
The key's randomart image is:
+---[RSA 2048]----+
| oo==B@*= |
| oo=+**.. |
| B+= o |
| o.B.. . |
| .So. |
| o . . |
| o.o o |
| o=o.+ |
| .E=+.. |
+----[SHA256]-----+
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ eval $(ssh-agent -s)
Agent pid 1316
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ cat ~/.ssh/id_ed25519.pub
cat: /c/Users/u113-07/.ssh/id_ed25519.pub: No such file or directory
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ cat ~/.ssh/id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDbKPjtiHTjtcUmD5+koFXDrTq4ID3RgtAb/PDpX0+/W2YasXLyEBGKztO1HCQQ6VyuCNhSB6fE0NbmJLrTQHyUDAWdtXVbQbs6KJnO0ZHkzrl9oWm88imFl76LVJvYqxLWyLPFTexZRUPrUmTjV5A457lSlIXEPCtDthF6is8wIvK1eJkISRA1h50ww9odYBHkDntOdvrueVuvvn0lrz4OpP9bisg39rLptowM6y8GwNnonZdPNgfYYUfvXHSX3vxhFbN/AV9v+4pLtXnV6xJHaQBzuh7e7WaIVuHarbO9qOX9kXTGDrSWNbixIKl17WOWFsGz4VCdHpDFssHdThkH u113-07@PROG-27
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ touch README.md
git checkout -b main
git add README.md
git commit -m "first commit"
git remote add origin git@uit.mpei.ru:GoloshchapovDY/cs-lab022.git
git push -u origin main
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git init
Reinitialized existing Git repository in C:/Users/u113-07/Desktop/lab-02/alice/project/.git/
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git checkout -b main
fatal: A branch named 'main' already exists.
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git add README.md
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git commit -m "first commit"
[main 921023e] first commit
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 README.md
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git remote add origin git@uit.mpei.ru:GoloshchapovDY/cs-lab022.git
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git push -u origin main
The authenticity of host 'uit.mpei.ru (10.1.6.13)' can't be established.
ECDSA key fingerprint is SHA256:+MRh1ssS2MjYzxp1zO+xbhzkFjtvbXFwcP0Nuzb7bD8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'uit.mpei.ru,10.1.6.13' (ECDSA) to the list of known hosts.
Enumerating objects: 18, done.
Counting objects: 100% (18/18), done.
Compressing objects: 100% (15/15), done.
Writing objects: 100% (18/18), 2.28 KiB | 233.00 KiB/s, done.
Total 18 (delta 2), reused 0 (delta 0)
remote: . Processing 1 references
remote: Processed 1 references in total
To uit.mpei.ru:GoloshchapovDY/cs-lab022.git
* [new branch] main -> main
Branch 'main' set up to track remote branch 'main' from 'origin'.
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/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 2), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), done.
From uit.mpei.ru:GoloshchapovDY/cs-lab022
921023e..21eb83a main -> origin/main
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git log --oneline --decorate --all --graph
* 21eb83a (origin/main) code:âûâîä ïðîèçâåäåíèÿ
* 921023e (HEAD -> main) first commit
* 09d09c6 git: èãíîðèðîâàíèå bin,obj,layout
* dc052d2 code: âûâîä ñóììû è ðàçíîñòè
* 1d6e2c6 code: ââîä 2 ÷èñåë
* 3cea021 build:äîáàâëåí ôàéë ïðîåêòà
* 1796bad code: çàãîòîâêà ïðîãðàììû
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git pull --ff-only
Updating 921023e..21eb83a
Fast-forward
main.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git add main.cpp
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git commit -m 'code:âûâîä ÷àñòíîãî'
[main 156fdc8] code:âûâîä ÷àñòíîãî
1 file changed, 1 insertion(+), 1 deletion(-)
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git push
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 339 bytes | 339.00 KiB/s, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: . Processing 1 references
remote: Processed 1 references in total
To uit.mpei.ru:GoloshchapovDY/cs-lab022.git
21eb83a..156fdc8 main -> main
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git add main.cpp
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git commit -m 'code:âûâîä ìàêñèìóìà'
[main bc26e46] code:âûâîä ìàêñèìóìà
1 file changed, 8 insertions(+), 1 deletion(-)
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git push
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 475 bytes | 475.00 KiB/s, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: . Processing 1 references
remote: Processed 1 references in total
To uit.mpei.ru:GoloshchapovDY/cs-lab022.git
156fdc8..bc26e46 main -> main
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git branch double
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git checkout double
Switched to branch 'double'
M project.cbp
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (double)
$ git add main.cpp
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (double)
$ git commit -m 'code: double'
[double e869ca0] code: double
1 file changed, 1 insertion(+), 1 deletion(-)
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (double)
$ git checkout main
Switched to branch 'main'
M project.cbp
Your branch is up to date with 'origin/main'.
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git push
To uit.mpei.ru:GoloshchapovDY/cs-lab022.git
! [rejected] main -> main (fetch first)
error: failed to push some refs to 'git@uit.mpei.ru:GoloshchapovDY/cs-lab022.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.
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git checkout double
Switched to branch 'double'
M project.cbp
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (double)
$ git add main.cpp
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (double)
$ git commit -m 'code: double'
On branch double
Changes not staged for commit:
modified: project.cbp
Untracked files:
main.exe
project.depend
no changes added to commit
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (double)
$ git checkout main
Switched to branch 'main'
M project.cbp
Your branch is up to date with 'origin/main'.
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git checkout double
Switched to branch 'double'
M project.cbp
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (double)
$ git commit -m 'code: double'
On branch double
Changes not staged for commit:
modified: project.cbp
Untracked files:
main.exe
project.depend
no changes added to commit
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (double)
$ git commit -a -m 'code: double'
warning: LF will be replaced by CRLF in project.cbp.
The file will have its original line endings in your working directory
[double 5e01991] code: double
1 file changed, 1 insertion(+)
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (double)
$ git checkout main
Switched to branch 'main'
Your branch is up to date with 'origin/main'.
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/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 2), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), done.
From uit.mpei.ru:GoloshchapovDY/cs-lab022
bc26e46..dabdbe4 main -> origin/main
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git pull
Updating bc26e46..dabdbe4
Fast-forward
main.cpp | 4 ++++
1 file changed, 4 insertions(+)
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git log --oneline --decorate --all --graph
* 5e01991 (double) code: double
* e869ca0 code: double
| * dabdbe4 (HEAD -> main, origin/main) code: âûâîä ìèíèìóìà
|/
* bc26e46 code:âûâîä ìàêñèìóìà
* 156fdc8 code:âûâîä ÷àñòíîãî
* 21eb83a code:âûâîä ïðîèçâåäåíèÿ
* 921023e first commit
* 09d09c6 git: èãíîðèðîâàíèå bin,obj,layout
* dc052d2 code: âûâîä ñóììû è ðàçíîñòè
* 1d6e2c6 code: ââîä 2 ÷èñåë
* 3cea021 build:äîáàâëåí ôàéë ïðîåêòà
* 1796bad code: çàãîòîâêà ïðîãðàììû
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git merge double
Auto-merging main.cpp
Merge made by the 'recursive' strategy.
main.cpp | 2 +-
project.cbp | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git push
Enumerating objects: 15, done.
Counting objects: 100% (14/14), done.
Compressing objects: 100% (9/9), done.
Writing objects: 100% (9/9), 929 bytes | 232.00 KiB/s, done.
Total 9 (delta 5), reused 0 (delta 0)
remote: . Processing 1 references
remote: Processed 1 references in total
To uit.mpei.ru:GoloshchapovDY/cs-lab022.git
dabdbe4..a8a23d7 main -> main
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$ git log --oneline --decorate --all --graph
* a8a23d7 (HEAD -> main, origin/main) Merge branch 'double' into main
|\
| * 5e01991 (double) code: double
| * e869ca0 code: double
* | dabdbe4 code: âûâîä ìèíèìóìà
|/
* bc26e46 code:âûâîä ìàêñèìóìà
* 156fdc8 code:âûâîä ÷àñòíîãî
* 21eb83a code:âûâîä ïðîèçâåäåíèÿ
* 921023e first commit
* 09d09c6 git: èãíîðèðîâàíèå bin,obj,layout
* dc052d2 code: âûâîä ñóììû è ðàçíîñòè
* 1d6e2c6 code: ââîä 2 ÷èñåë
* 3cea021 build:äîáàâëåí ôàéë ïðîåêòà
* 1796bad code: çàãîòîâêà ïðîãðàììû
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/alice/project (main)
$
BOB
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/bob
$ git clone git@uit.mpei.ru:GoloshchapovDY/cs-lab022.git project
Cloning into 'project'...
remote: Enumerating objects: 18, done.
remote: Counting objects: 100% (18/18), done.
remote: Compressing objects: 100% (15/15), done.
remote: Total 18 (delta 2), reused 0 (delta 0), pack-reused 0
Receiving objects: 100% (18/18), done.
Resolving deltas: 100% (2/2), done.
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/bob
$ ^C
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/bob
$ cd project
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/bob/project (main)
$ git config user.name 'Bob (GoloshchapovDY)'
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/bob/project (main)
$ git config user.email 'GoloshchapovDY@mpei.ru'
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/bob/project (main)
$ git add main.cpp
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/bob/project (main)
$ git commit -m 'code:вывод произведения'
[main 21eb83a] code:вывод произведения
1 file changed, 1 insertion(+), 1 deletion(-)
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/bob/project (main)
$ git push
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 364 bytes | 364.00 KiB/s, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: . Processing 1 references
remote: Processed 1 references in total
To uit.mpei.ru:GoloshchapovDY/cs-lab022.git
921023e..21eb83a main -> main
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/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 2), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), done.
From uit.mpei.ru:GoloshchapovDY/cs-lab022
21eb83a..156fdc8 main -> origin/main
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/bob/project (main)
$ git log --oneline --decorate --all --graph
* 156fdc8 (origin/main, origin/HEAD) code:вывод частного
* 21eb83a (HEAD -> main) code:вывод произведения
* 921023e first commit
* 09d09c6 git: игнорирование bin,obj,layout
* dc052d2 code: вывод суммы и разности
* 1d6e2c6 code: ввод 2 чисел
* 3cea021 build:добавлен файл проекта
* 1796bad code: заготовка программы
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/bob/project (main)
$ git pull --ff-only
Updating 21eb83a..156fdc8
Fast-forward
main.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/bob/project (main)
$ git add main.cpp
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/bob/project (main)
$ git commit -m 'code: вывод минимума'
[main c987066] code: вывод минимума
1 file changed, 8 insertions(+), 1 deletion(-)
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/bob/project (main)
$ git push
To uit.mpei.ru:GoloshchapovDY/cs-lab022.git
! [rejected] main -> main (fetch first)
error: failed to push some refs to 'git@uit.mpei.ru:GoloshchapovDY/cs-lab022.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.
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/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), done.
From uit.mpei.ru:GoloshchapovDY/cs-lab022
156fdc8..bc26e46 main -> origin/main
Auto-merging main.cpp
CONFLICT (content): Merge conflict in main.cpp
Automatic merge failed; fix conflicts and then commit the result.
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/bob/project (main|MERGING)
$ git log --oneline --decorate --all --graph
* c987066 (HEAD -> main) code: вывод минимума
| * bc26e46 (origin/main, origin/HEAD) code:вывод максимума
|/
* 156fdc8 code:вывод частного
* 21eb83a code:вывод произведения
* 921023e first commit
* 09d09c6 git: игнорирование bin,obj,layout
* dc052d2 code: вывод суммы и разности
* 1d6e2c6 code: ввод 2 чисел
* 3cea021 build:добавлен файл проекта
* 1796bad code: заготовка программы
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/bob/project (main|MERGING)
$ git rebase origin/main
main.cpp: needs merge
error: cannot rebase: You have unstaged changes.
error: additionally, your index contains uncommitted changes.
error: Please commit or stash them.
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/bob/project (main|MERGING)
$ git status
On branch main
Your branch and 'origin/main' have diverged,
and have 1 and 1 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
You have unmerged paths.
(fix conflicts and run "git commit")
(use "git merge --abort" to abort the merge)
Unmerged paths:
(use "git add <file>..." to mark resolution)
both modified: main.cpp
Untracked files:
(use "git add <file>..." to include in what will be committed)
main.exe
main.o
no changes added to commit (use "git add" and/or "git commit -a")
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/bob/project (main|MERGING)
$ git add main.cpp
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/bob/project (main|MERGING)
$ git rebase --continue
fatal: No rebase in progress?
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/bob/project (main|MERGING)
$ git rebase origin/main
error: cannot rebase: Your index contains uncommitted changes.
error: Please commit or stash them.
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/bob/project (main|MERGING)
$ git status
On branch main
Your branch and 'origin/main' have diverged,
and have 1 and 1 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
All conflicts fixed but you are still merging.
(use "git commit" to conclude merge)
Changes to be committed:
modified: main.cpp
Untracked files:
(use "git add <file>..." to include in what will be committed)
main.exe
main.o
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/bob/project (main|MERGING)
$ git add main.cpp
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/bob/project (main|MERGING)
$ git rebase --continue
fatal: No rebase in progress?
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/bob/project (main|MERGING)
$ git add main.cpp
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/bob/project (main|MERGING)
$ git rebase origin/main
error: cannot rebase: Your index contains uncommitted changes.
error: Please commit or stash them.
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/bob/project (main|MERGING)
$ git add main.cpp
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/bob/project (main|MERGING)
$ git commit -m 'code: âûâîä ìèíèìóìà'
[main 17d5f95] code: âûâîä ìèíèìóìà
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/bob/project (main)
$ git commit --amend -m'code: исправлен'
[main 7a7a138] code: исправлен
Date: Wed Mar 27 15:29:12 2024 +0300
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/bob/project (main)
$ git add main.cpp
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/bob/project (main)
$ git rebase --continue
fatal: No rebase in progress?
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/bob/project (main)
$ git add main.cpp
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/bob/project (main)
$ git rebase origin/main
First, rewinding head to replay your work on top of it...
Applying: code: вывод минимума
Using index info to reconstruct a base tree...
M main.cpp
Falling back to patching base and 3-way merge...
Auto-merging main.cpp
CONFLICT (content): Merge conflict in main.cpp
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 code: вывод минимума
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/bob/project (main|REBASE 1/1)
$ git add main.cpp
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/bob/project (main|REBASE 1/1)
$ git rebase origin/main
fatal: It seems that there is already a rebase-apply directory, and
I wonder if you are in the middle of another rebase. If that is the
case, please try
git rebase (--continue | --abort | --skip)
If that is not the case, please
rm -fr ".git/rebase-apply"
and run me again. I am stopping in case you still have something
valuable there.
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/bob/project (main|REBASE 1/1)
$ git rebase --continue
Applying: code: вывод минимума
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/bob/project (main)
$ git log --oneline --decorate --all --graph
* dabdbe4 (HEAD -> main) code: вывод минимума
* bc26e46 (origin/main, origin/HEAD) code:вывод максимума
* 156fdc8 code:вывод частного
* 21eb83a code:вывод произведения
* 921023e first commit
* 09d09c6 git: игнорирование bin,obj,layout
* dc052d2 code: вывод суммы и разности
* 1d6e2c6 code: ввод 2 чисел
* 3cea021 build:добавлен файл проекта
* 1796bad code: заготовка программы
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/bob/project (main)
$ git push
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 390 bytes | 390.00 KiB/s, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: . Processing 1 references
remote: Processed 1 references in total
To uit.mpei.ru:GoloshchapovDY/cs-lab022.git
bc26e46..dabdbe4 main -> main
u113-07@PROG-27 MINGW32 ~/Desktop/lab-02/bob/project (main)
$