u111-09@PROG-29 MINGW32 ~/Desktop/lab02 $ ls u111-09@PROG-29 MINGW32 ~/Desktop/lab02 $ mkdir alice u111-09@PROG-29 MINGW32 ~/Desktop/lab02 $ mkdir bob u111-09@PROG-29 MINGW32 ~/Desktop/lab02 $ cd alice u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice $ cd alice bash: cd: alice: No such file or directory u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice $ cd .. u111-09@PROG-29 MINGW32 ~/Desktop/lab02 $ cd .. u111-09@PROG-29 MINGW32 ~/Desktop $ cd project bash: cd: project: No such file or directory u111-09@PROG-29 MINGW32 ~/Desktop $ cd alice bash: cd: alice: No such file or directory u111-09@PROG-29 MINGW32 ~/Desktop $ cd lab02 u111-09@PROG-29 MINGW32 ~/Desktop/lab02 $ cd alice u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice $ cd project u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project $ cd .. u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice $ cd project u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project $ git init Initialized empty Git repository in C:/Users/u111-09/Desktop/lab02/alice/project/.git/ u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) $ git branch -m main error: refname refs/heads/master not found fatal: Branch rename failed u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) $ ls -A .git/ u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) $ git config user.name 'Alice (KonovalovaAA)' u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) $ git config user.email 'KonovalovaAlA@mpei.ru' u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) $ git status On branch master No commits yet ----- еще нет коммитов Untracked files: (use "git add ..." to include in what will be committed) main.cpp project.cbp nothing added to commit but untracked files present (use "git add" to track) ----- ничего не закоммичено, но присутствуют неотслеживаемые файлы u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) $ git add main.cpp u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) $ git status On branch master No commits yet Changes to be committed: (use "git rm --cached ..." to unstage) new file: main.cpp ---- файл внесен в git, отслеживается гитом Untracked files: (use "git add ..." to include in what will be committed) project.cbp u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) $ git commit -m 'code: заготовка программы' [master (root-commit) 375569d] code: caaioiaea i?ia?aiiu 1 file changed, 9 insertions(+) create mode 100644 main.cpp u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) $ 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 u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) $ git commit -m 'build: add project file' [master 1b4a85a] build: add project file 1 file changed, 40 insertions(+) create mode 100644 project.cbp u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) $ git status On branch master nothing to commit, working tree clean u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) $ git status On branch master Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git checkout -- ..." to discard changes in working directory) modified: main.cpp -----файл изменен, но изменение не закоммичены no changes added to commit (use "git add" and/or "git commit -a") u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) $ git add main.cpp u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) $ git commit -m 'code: вывод суммы' [master f02e566] code: вывод суммы 1 file changed, 4 insertions(+), 1 deletion(-) u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) $ git add -u u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) $ git add -u u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) $ git commit -m 'code: вывод разности' [master ea9094f] code: вывод разности 1 file changed, 2 insertions(+), 1 deletion(-) u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) $ git status On branch master Untracked files: (use "git add ..." to include in what will be committed) .gitignore nothing added to commit but untracked files present (use "git add" to track) u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) $ git status On branch master Untracked files: (use "git add ..." to include in what will be committed) .gitignore obj/ nothing added to commit but untracked files present (use "git add" to track) u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) $ git status On branch master Untracked files: (use "git add ..." to include in what will be committed) .gitignore nothing added to commit but untracked files present (use "git add" to track) u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) $ git status On branch master Untracked files: (use "git add ..." to include in what will be committed) .gitignore nothing added to commit but untracked files present (use "git add" to track) u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) $ git add .gitignore u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) $ git commit -m 'git: ..' [master 92be9fc] git: .. 1 file changed, 2 insertions(+) create mode 100644 .gitignore u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) $ git log --stat commit 92be9fc8d2f44f0be31ea0795c9ba7aa0c28bc1d (HEAD -> master) Author: Alice (KonovalovaAA) Date: Mon Mar 13 15:06:51 2023 +0300 git: .. .gitignore | 2 ++ 1 file changed, 2 insertions(+) ----- 1 файл изменен, добавлены 2 вставки commit ea9094fd2f1ced3bbce27b5e15ad28d4b8b3d34c Author: Alice (KonovalovaAA) Date: Mon Mar 13 14:38:38 2023 +0300 code: вывод разности main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f02e56655a5149c1d19cfafe2e8014b19127461e Author: Alice (KonovalovaAA) Date: Mon Mar 13 14:34:56 2023 +0300 code: вывод суммы u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) $ git log --oneline --decorate 92be9fc (HEAD -> master) git: .. ea9094f code: вывод разности f02e566 code: вывод суммы 1b4a85a build: add project file 375569d code: заготовка программы u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) $ git log --decorate commit 92be9fc8d2f44f0be31ea0795c9ba7aa0c28bc1d (HEAD -> master) Author: Alice (KonovalovaAA) Date: Mon Mar 13 15:06:51 2023 +0300 git: .. commit ea9094fd2f1ced3bbce27b5e15ad28d4b8b3d34c Author: Alice (KonovalovaAA) Date: Mon Mar 13 14:38:38 2023 +0300 code: вывод разности commit f02e56655a5149c1d19cfafe2e8014b19127461e Author: Alice (KonovalovaAA) Date: Mon Mar 13 14:34:56 2023 +0300 code: вывод суммы commit 1b4a85a93e714b9992e12a78bee0d6993febb6f6 Author: Alice (KonovalovaAA) Date: Mon Mar 13 14:22:51 2023 +0300 build: add project file u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) $ git log --oneline --decorate --all --graph * 92be9fc (HEAD -> master) git: .. * ea9094f code: вывод разности * f02e566 code: вывод суммы * 1b4a85a build: add project file * 375569d code: заготовка программы u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) $ git log -- project.cbp commit 1b4a85a93e714b9992e12a78bee0d6993febb6f6 Author: Alice (KonovalovaAA) Date: Mon Mar 13 14:22:51 2023 +0300 build: add project file u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) $ git log --grep "build:" commit 1b4a85a93e714b9992e12a78bee0d6993febb6f6 Author: Alice (KonovalovaAA) Date: Mon Mar 13 14:22:51 2023 +0300 build: add project file u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) $ git show HEAD commit 92be9fc8d2f44f0be31ea0795c9ba7aa0c28bc1d (HEAD -> master) Author: Alice (KonovalovaAA) Date: Mon Mar 13 15:06:51 2023 +0300 git: .. diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4c7473d --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/bin +/obj u111-09@PROG-29 MINGW32 ~/Desktop/lab02/alice/project (master) $ git show 1b4a85a93e714b9992e12a78bee0d6993febb6f6 commit 1b4a85a93e714b9992e12a78bee0d6993febb6f6 Author: Alice (KonovalovaAA) Date: Mon Mar 13 14:22:51 2023 +0300 build: add project file diff --git a/project.cbp b/project.cbp new file mode 100644 index 0000000..99bb702 --- /dev/null +++ b/project.cbp @@ -0,0 +1,40 @@ + + + + +