u111-13@PROG-25 MINGW32 ~/Desktop/lab02/bob (master) $ git clone git@uit.mpei.ru:DenisovPS/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 2), reused 0 (delta 0), pack-reused 0 Receiving objects: 100% (18/18), 2.32 KiB | 237.00 KiB/s, done. Resolving deltas: 100% (2/2), done. u111-13@PROG-25 MINGW32 ~/Desktop/lab02/bob (master) $ cd project u111-13@PROG-25 MINGW32 ~/Desktop/lab02/bob/project (main) $ git init Reinitialized existing Git repository in C:/Users/u111-13/Desktop/lab02/bob/project/.git/ u111-13@PROG-25 MINGW32 ~/Desktop/lab02/bob/project (main) $ git config user.name 'Bob (DenisovPS)' u111-13@PROG-25 MINGW32 ~/Desktop/lab02/bob/project (main) $ git config user.email 'Bob@mpei.ru' u111-13@PROG-25 MINGW32 ~/Desktop/lab02/bob/project (main) $ git add main.cpp u111-13@PROG-25 MINGW32 ~/Desktop/lab02/bob/project (main) $ git commit -m "code: auaia i?iecaaaaiey" [main 673e788] code: auaia i?iecaaaaiey 1 file changed, 2 insertions(+), 1 deletion(-) u111-13@PROG-25 MINGW32 ~/Desktop/lab02/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), 406 bytes | 203.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:DenisovPS/cs-lab02.git 152446e..673e788 main -> main u111-13@PROG-25 MINGW32 ~/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), done. From uit.mpei.ru:DenisovPS/cs-lab02 673e788..576a93d main -> origin/main u111-13@PROG-25 MINGW32 ~/Desktop/lab02/bob/project (main) $ git pull --ff-only Updating 673e788..576a93d Fast-forward main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) u111-13@PROG-25 MINGW32 ~/Desktop/lab02/bob/project (main) $ git add main.cpp u111-13@PROG-25 MINGW32 ~/Desktop/lab02/bob/project (main) $ git commit -m "code: auaia ieieioia" [main 8425f5a] code: auaia ieieioia 1 file changed, 2 insertions(+), 1 deletion(-) u111-13@PROG-25 MINGW32 ~/Desktop/lab02/bob/project (main) $ git psuh git: 'psuh' is not a git command. See 'git --help'. The most similar command is push u111-13@PROG-25 MINGW32 ~/Desktop/lab02/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), 403 bytes | 201.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:DenisovPS/cs-lab02.git 576a93d..8425f5a main -> main u111-13@PROG-25 MINGW32 ~/Desktop/lab02/bob/project (main) $ git branch double u111-13@PROG-25 MINGW32 ~/Desktop/lab02/bob/project (main) $ git checkout double Switched to branch 'double' u111-13@PROG-25 MINGW32 ~/Desktop/lab02/bob/project (double) $ git add main.cpp u111-13@PROG-25 MINGW32 ~/Desktop/lab02/bob/project (double) $ git commit -m "code: eciaiee oei ia aaae" [double d78ac14] code: eciaiee oei ia aaae 1 file changed, 1 insertion(+), 1 deletion(-) u111-13@PROG-25 MINGW32 ~/Desktop/lab02/bob/project (double) $ git checkout main Switched to branch 'main' Your branch is up to date with 'origin/main'. u111-13@PROG-25 MINGW32 ~/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), done. From uit.mpei.ru:DenisovPS/cs-lab02 8425f5a..e912d34 main -> origin/main u111-13@PROG-25 MINGW32 ~/Desktop/lab02/bob/project (main) $ git double git: 'double' is not a git command. See 'git --help'. u111-13@PROG-25 MINGW32 ~/Desktop/lab02/bob/project (main) $ git merge double Updating 8425f5a..d78ac14 Fast-forward main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) u111-13@PROG-25 MINGW32 ~/Desktop/lab02/bob/project (main) (failed reverse-i-search)`log': git c^Cne git@uit.mpei.ru:DenisovPS/cs-lab02.git project u111-13@PROG-25 MINGW32 ~/Desktop/lab02/bob/project (main) $ git log --oneline --decorate --all --graph * d78ac14 (HEAD -> main, double) code: eciaiee oei ia aaae | * e912d34 (origin/main, origin/HEAD) code: auaia iaeneioia |/ * 8425f5a code: auaia ieieioia * 576a93d code: auaia aaeaeaiey * 673e788 code: auaia i?iecaaaaiey * 152446e build: eaii?e?iaaiea oaeeia * dc9a83f code: auaia ?aciinoe * 78a56e6 code: auaia noiiu * e50f914 code: aaia ?enae * fee1a91 build: aiaaaeai oaee i?iaeoa * b272f36 code: caaioiaea i?ia?aiiu u111-13@PROG-25 MINGW32 ~/Desktop/lab02/bob/project (main) $ git reset origin/main Unstaged changes after reset: M main.cpp u111-13@PROG-25 MINGW32 ~/Desktop/lab02/bob/project (main) $ git diff diff --git a/main.cpp b/main.cpp index 2a210f0..c7d7345 100644 --- a/main.cpp +++ b/main.cpp @@ -5,13 +5,12 @@ using namespace std; int main() { cout << "Enter A and B: "; - int a, b; + double a, b; cin >> a >> b; cout << "A + B = " << a + b << '\n' << "A - B = " << a - b << '\n' << "A * B = " << a * b << '\n' << "A / B = " << a / b << '\n' - << " A B = " << min(a,b) << '\n' - << "max A B = " << max(a,b) << '\n'; + << " A B = " << min(a,b) << '\n'; return 0; } u111-13@PROG-25 MINGW32 ~/Desktop/lab02/bob/project (main) $ git reset --hard HEAD is now at e912d34 code: auaia iaeneioia u111-13@PROG-25 MINGW32 ~/Desktop/lab02/bob/project (main) $ git reset origin/main u111-13@PROG-25 MINGW32 ~/Desktop/lab02/bob/project (main) $ git reset origin/main --hard HEAD is now at e912d34 code: auaia iaeneioia u111-13@PROG-25 MINGW32 ~/Desktop/lab02/bob/project (main) $ git log --oneline --decorate --all --graph * d78ac14 (double) code: eciaiee oei ia aaae | * e912d34 (HEAD -> main, origin/main, origin/HEAD) code: auaia iaeneioia |/ * 8425f5a code: auaia ieieioia * 576a93d code: auaia aaeaeaiey * 673e788 code: auaia i?iecaaaaiey * 152446e build: eaii?e?iaaiea oaeeia * dc9a83f code: auaia ?aciinoe * 78a56e6 code: auaia noiiu * e50f914 code: aaia ?enae * fee1a91 build: aiaaaeai oaee i?iaeoa * b272f36 code: caaioiaea i?ia?aiiu u111-13@PROG-25 MINGW32 ~/Desktop/lab02/bob/project (main) $ git show double commit d78ac14b61f596191b3e6cf20bc082b4d752c2fa (double) Author: Bob (DenisovPS) Date: Mon Apr 17 15:55:12 2023 +0300 code: eciaiee oei ia aaae diff --git a/main.cpp b/main.cpp index 880f357..c7d7345 100644 --- a/main.cpp +++ b/main.cpp @@ -5,7 +5,7 @@ using namespace std; int main() { cout << "Enter A and B: "; - int a, b; + double a, b; cin >> a >> b; cout << "A + B = " << a + b << '\n' << "A - B = " << a - b << '\n' u111-13@PROG-25 MINGW32 ~/Desktop/lab02/bob/project (main) $ git merge double Auto-merging main.cpp Merge made by the 'recursive' strategy. main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) u111-13@PROG-25 MINGW32 ~/Desktop/lab02/bob/project (main) $ git reset --hard origin/main HEAD is now at e912d34 code: auaia iaeneioia u111-13@PROG-25 MINGW32 ~/Desktop/lab02/bob/project (main) $ git log --oneline --decorate --all --graph * d78ac14 (double) code: eciaiee oei ia aaae | * e912d34 (HEAD -> main, origin/main, origin/HEAD) code: auaia iaeneioia |/ * 8425f5a code: auaia ieieioia * 576a93d code: auaia aaeaeaiey * 673e788 code: auaia i?iecaaaaiey * 152446e build: eaii?e?iaaiea oaeeia * dc9a83f code: auaia ?aciinoe * 78a56e6 code: auaia noiiu * e50f914 code: aaia ?enae * fee1a91 build: aiaaaeai oaee i?iaeoa * b272f36 code: caaioiaea i?ia?aiiu u111-13@PROG-25 MINGW32 ~/Desktop/lab02/bob/project (main) $ gitk u111-13@PROG-25 MINGW32 ~/Desktop/lab02/bob/project (main) $ git reset --hard 8425f5a HEAD is now at 8425f5a code: auaia ieieioia u111-13@PROG-25 MINGW32 ~/Desktop/lab02/bob/project (main) $ git log --oneline --decorate --all --graph * d78ac14 (double) code: eciaiee oei ia aaae | * e912d34 (origin/main, origin/HEAD) code: auaia iaeneioia |/ * 8425f5a (HEAD -> main) code: auaia ieieioia * 576a93d code: auaia aaeaeaiey * 673e788 code: auaia i?iecaaaaiey * 152446e build: eaii?e?iaaiea oaeeia * dc9a83f code: auaia ?aciinoe * 78a56e6 code: auaia noiiu * e50f914 code: aaia ?enae * fee1a91 build: aiaaaeai oaee i?iaeoa * b272f36 code: caaioiaea i?ia?aiiu u111-13@PROG-25 MINGW32 ~/Desktop/lab02/bob/project (main) $ git pull Updating 8425f5a..e912d34 Fast-forward main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) u111-13@PROG-25 MINGW32 ~/Desktop/lab02/bob/project (main) $ git log --oneline --decorate --all --graph * d78ac14 (double) code: eciaiee oei ia aaae | * e912d34 (HEAD -> main, origin/main, origin/HEAD) code: auaia iaeneioia |/ * 8425f5a code: auaia ieieioia * 576a93d code: auaia aaeaeaiey * 673e788 code: auaia i?iecaaaaiey * 152446e build: eaii?e?iaaiea oaeeia * dc9a83f code: auaia ?aciinoe * 78a56e6 code: auaia noiiu * e50f914 code: aaia ?enae * fee1a91 build: aiaaaeai oaee i?iaeoa * b272f36 code: caaioiaea i?ia?aiiu u111-13@PROG-25 MINGW32 ~/Desktop/lab02/bob/project (main) $ git merge Already up to date. u111-13@PROG-25 MINGW32 ~/Desktop/lab02/bob/project (main) $ git merge double Auto-merging main.cpp Merge made by the 'recursive' strategy. main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) u111-13@PROG-25 MINGW32 ~/Desktop/lab02/bob/project (main) $ git log --oneline --decorate --all --graph * a3ab083 (HEAD -> main) Merge branch 'double' into main |\ | * d78ac14 (double) code: eciaiee oei ia aaae * | e912d34 (origin/main, origin/HEAD) code: auaia iaeneioia |/ * 8425f5a code: auaia ieieioia * 576a93d code: auaia aaeaeaiey * 673e788 code: auaia i?iecaaaaiey * 152446e build: eaii?e?iaaiea oaeeia * dc9a83f code: auaia ?aciinoe * 78a56e6 code: auaia noiiu * e50f914 code: aaia ?enae * fee1a91 build: aiaaaeai oaee i?iaeoa * b272f36 code: caaioiaea i?ia?aiiu u111-13@PROG-25 MINGW32 ~/Desktop/lab02/bob/project (main) $ git push Enumerating objects: 10, done. Counting objects: 100% (10/10), done. Compressing objects: 100% (6/6), done. Writing objects: 100% (6/6), 729 bytes | 243.00 KiB/s, done. Total 6 (delta 2), reused 0 (delta 0) remote: . Processing 1 references remote: Processed 1 references in total To uit.mpei.ru:DenisovPS/cs-lab02.git e912d34..a3ab083 main -> main u111-13@PROG-25 MINGW32 ~/Desktop/lab02/bob/project (main) $