Created
September 26, 2018 20:53
-
-
Save klimach/b1f8254c591e0a726c0c91553d8cec9c to your computer and use it in GitHub Desktop.
Homework GIT (week1/lesson3)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Task 1 | |
alexandr@klimach:~$ mkdir GitTask | |
alexandr@klimach:~$ cd GitTask | |
alexandr@klimach:~/GitTask$ git init | |
Инициализирован пустой репозиторий Git в /home/alexandr/GitTask/.git/ | |
alexandr@klimach:~/GitTask$ subl file_1.txt | |
alexandr@klimach:~/GitTask$ git add file_1.txt | |
alexandr@klimach:~/GitTask$ git commit -m "Create new file with some content" | |
[master (корневой коммит) 9c062d8] Create new file with some content | |
1 file changed, 1 insertion(+) | |
create mode 100644 file_1.txt | |
alexandr@klimach:~/GitTask$ git branch feature/work_with_file | |
alexandr@klimach:~/GitTask$ git checkout feature/work_with_file | |
Переключено на ветку «feature/work_with_file» | |
alexandr@klimach:~/GitTask$ subl code.py | |
alexandr@klimach:~/GitTask$ git add code.py | |
alexandr@klimach:~/GitTask$ git commit -m "Create file in new branch" | |
[feature/work_with_file bd093bd] Create file in new branch | |
1 file changed, 1 insertion(+) | |
create mode 100644 code.py | |
alexandr@klimach:~/GitTask$ git remote add origin https://github.com/klimach/EducationRepository_vol2.git | |
alexandr@klimach:~/GitTask$ git push origin master feature/work_with_file | |
Username for 'https://github.com': klimach | |
Password for 'https://[email protected]': | |
Перечисление объектов: 6, готово. | |
Подсчет объектов: 100% (6/6), готово. | |
При сжатии изменений используется до 4 потоков | |
Сжатие объектов: 100% (3/3), готово. | |
Запись объектов: 100% (6/6), 498 bytes | 498.00 KiB/s, готово. | |
Всего 6 (изменения 0), повторно использовано 0 (изменения 0) | |
To https://github.com/klimach/EducationRepository_vol2.git | |
* [new branch] master -> master | |
* [new branch] feature/work_with_file -> feature/work_with_file | |
alexandr@klimach:~/GitTask$ | |
Task 2 | |
alexandr@klimach:~/GitTask$ git branch task2/merge | |
alexandr@klimach:~/GitTask$ git checkout task2/merge | |
Переключено на ветку «task2/merge» | |
alexandr@klimach:~/GitTask$ subl code.py | |
alexandr@klimach:~/GitTask$ git add code.py | |
alexandr@klimach:~/GitTask$ git commit -m "The file code.py is chenged" | |
[task2/merge 33ceb88] The file code.py is chenged | |
1 file changed, 1 insertion(+), 1 deletion(-) | |
alexandr@klimach:~/GitTask$ git checkout feature/work_with_file | |
Переключено на ветку «feature/work_with_file» | |
alexandr@klimach:~/GitTask$ git merge task2/merge | |
Обновление bd093bd..33ceb88 | |
Fast-forward | |
code.py | 2 +- | |
1 file changed, 1 insertion(+), 1 deletion(-) | |
alexandr@klimach:~/GitTask$ git push origin feature/work_with_file | |
Username for 'https://github.com': klimach | |
Password for 'https://[email protected]': | |
Перечисление объектов: 5, готово. | |
Подсчет объектов: 100% (5/5), готово. | |
При сжатии изменений используется до 4 потоков | |
Сжатие объектов: 100% (2/2), готово. | |
Запись объектов: 100% (3/3), 290 bytes | 290.00 KiB/s, готово. | |
Всего 3 (изменения 0), повторно использовано 0 (изменения 0) | |
To https://github.com/klimach/EducationRepository_vol2.git | |
bd093bd..33ceb88 feature/work_with_file -> feature/work_with_file | |
alexandr@klimach:~/GitTask$ | |
Task 3 | |
alexandr@klimach:~/GitTask$ subl code.py | |
alexandr@klimach:~/GitTask$ git add code.py | |
alexandr@klimach:~/GitTask$ git commit -m "Fix merge conflict" | |
[feature/work_with_file 68b213f] Fix merge conflict | |
1 file changed, 4 insertions(+), 1 deletion(-) | |
alexandr@klimach:~/GitTask$ git branch | |
* feature/work_with_file | |
master | |
task2/merge | |
alexandr@klimach:~/GitTask$ git pull origin feature/work_with_file | |
Из https://github.com/klimach/EducationRepository_vol2 | |
* branch feature/work_with_file -> FETCH_HEAD | |
Автослияние code.py | |
КОНФЛИКТ (содержимое): Конфликт слияния в code.py | |
Не удалось провести автоматическое слияние; исправьте конфликты и сделайте коммит результата. | |
alexandr@klimach:~/GitTask$ subl code.py | |
alexandr@klimach:~/GitTask$ git add code.py | |
alexandr@klimach:~/GitTask$ git commit -m "Fix merge conflict" | |
[feature/work_with_file c329c5b] Fix merge conflict | |
alexandr@klimach:~/GitTask$ git push origin feature/work_with_file | |
Username for 'https://github.com': klimach | |
Password for 'https://[email protected]': | |
Перечисление объектов: 8, готово. | |
Подсчет объектов: 100% (8/8), готово. | |
При сжатии изменений используется до 4 потоков | |
Сжатие объектов: 100% (3/3), готово. | |
Запись объектов: 100% (4/4), 437 bytes | 437.00 KiB/s, готово. | |
Всего 4 (изменения 1), повторно использовано 0 (изменения 0) | |
remote: Resolving deltas: 100% (1/1), done. | |
To https://github.com/klimach/EducationRepository_vol2.git | |
8405c17..c329c5b feature/work_with_file -> feature/work_with_file | |
alexandr@klimach:~/GitTask$ | |
Task 4* | |
alexandr@klimach:~$ mkdir CloneRep | |
alexandr@klimach:~$ cd CloneRep | |
alexandr@klimach:~/CloneRep$ git clone https://github.com/cursor-education/Git-lesson.git | |
Клонирование в «Git-lesson»… | |
remote: Enumerating objects: 6, done. | |
remote: Counting objects: 100% (6/6), done. | |
remote: Compressing objects: 100% (4/4), done. | |
remote: Total 6 (delta 1), reused 2 (delta 0), pack-reused 0 | |
Распаковка объектов: 100% (6/6), готово. | |
alexandr@klimach:~/CloneRep$ ls | |
Git-lesson | |
alexandr@klimach:~/CloneRep$ cd Git-lesson | |
alexandr@klimach:~/CloneRep/Git-lesson$ git branch | |
* master | |
alexandr@klimach:~/CloneRep/Git-lesson$ git branch bugfix/klimach | |
alexandr@klimach:~/CloneRep/Git-lesson$ git checkout bugfix/klimach | |
Переключено на ветку «bugfix/klimach» | |
alexandr@klimach:~/CloneRep/Git-lesson$ ls | |
gcd.py | |
alexandr@klimach:~/CloneRep/Git-lesson$ subl gcd.py | |
alexandr@klimach:~/CloneRep/Git-lesson$ git remote -v | |
origin https://github.com/cursor-education/Git-lesson.git (fetch) | |
origin https://github.com/cursor-education/Git-lesson.git (push) | |
alexandr@klimach:~/CloneRep/Git-lesson$ git add gcd.py | |
alexandr@klimach:~/CloneRep/Git-lesson$ git commit -m "Bug fix" | |
[bugfix/klimach 1173c7d] Bug fix | |
1 file changed, 4 insertions(+), 4 deletions(-) | |
alexandr@klimach:~/CloneRep/Git-lesson$ git push origin bugfix/klimach | |
Username for 'https://github.com': klimach | |
Password for 'https://[email protected]': | |
Перечисление объектов: 5, готово. | |
Подсчет объектов: 100% (5/5), готово. | |
При сжатии изменений используется до 4 потоков | |
Сжатие объектов: 100% (2/2), готово. | |
Запись объектов: 100% (3/3), 292 bytes | 292.00 KiB/s, готово. | |
Всего 3 (изменения 1), повторно использовано 0 (изменения 0) | |
remote: Resolving deltas: 100% (1/1), completed with 1 local object. | |
remote: | |
remote: Create a pull request for 'bugfix/klimach' on GitHub by visiting: | |
remote: https://github.com/cursor-education/Git-lesson/pull/new/bugfix/klimach | |
remote: | |
To https://github.com/cursor-education/Git-lesson.git | |
* [new branch] bugfix/klimach -> bugfix/klimach | |
alexandr@klimach:~/CloneRep/Git-lesson$ | |
https://github.com/cursor-education/Git-lesson/pull/1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment