@mozzadrella, here’s my submission for “Module 2 Exercise 2”
Team-members adding features and merging into the final product. Thanks for all the work you do, @mozzadrella!
Hi @mozzadrella ,
I have done it like this, I post Assignment 1 and create a new branch for each of my 5 student to perform and then I can compare across branches.
Visualization shows using master branch as a template for future exercises and assignments and using other branches for class exercises done together and individual returned assignments.
Can I do it differently? I captured
git log --oneline --graph
(This one assignment covers one four-month semester)
* ae85776 Merge remote-tracking branch 'b/master' |\ | * 3b39918 Added templates for ex44 | * fc96d96 Added template for ex43 | * 5c4af5e ex41: typos | * 6dac284 ex41 : try except block | * 11426f6 ex41 : functions | * 0f3f802 ex40.py | * 7b6b793 ex40 : mystuff.py | * 73c1fda ex40 | * dffabd0 Merge remote-tracking branch 'a/master' | |\ | * \ d76bc45 Merge branch 'before_merge' | |\ \ | | * | 6cbf81e ex38 : "!=" ==> ">=" | * | | e50af62 typo * | | | 6e58c13 Your commit message here 여기에 commit 메시지 입력 | |_|/ |/| | * | | db883e0 Merge remote-tracking branch 'b/master' |\ \ \ | |/ / | * | 52796f0 Merge remote-tracking branch 'a/master' | |\ \ | | |/ | |/| | * | 1bc5d50 renamed ex41 folder | * | b28f8a6 renamed ex39 | * | ec49957 catching up ex39 | * | 6383fac added ex38 | * | 193642c ex35 : measure time | * | 67fa70d catching up ex35 | * | b482b64 started ex42 | * | dad385a removed conflict example | * | a84d0ce catching up factorial example | * | a957bd8 catching up ex34 | * | 6506a85 catching up ex33 | * | e795208 ex33 : while | * | d3f0fe8 catching up ex32 | * | ff05485 updated | * | 641781b string literals and operations | * | 1571eb8 ex29 : dogs += 5 | * | 7326d94 catching up ex31 | * | 0258418 catching up ex30 | * | b79ece7 catching up ex29 | * | 54bf072 catching up : ex28 | * | 619a266 ex27 : changed first and second rows as text | * | 8267d3f added 7th table | * | 1ae6a0c sixth table | * | c8b8cb4 ex27 : fifth table | * | d8bf219 ex27 : fourth table | * | d7424bc ex27 : third truth table | * | d84019f ex27 : second truth table | * | 4159194 ex27 : first truth table | * | 326e8ec started ex27 : truth table | * | 7a74810 typo | * | 71f9873 ignore __pycache__ | * | 5b033f0 indicated lines from text | * | b77f04f catching up ex25 | * | 9c425fe ignore *.pyc (ex25) | * | f19bd62 catching up ex25 : run_ex25 ~ 12 | * | daf779b catching up ex25 | * | a0caaa5 renamed ex14 folder | * | 4a7ad06 catching up ex24 | * | 99b6ede in the middle of catching up ex24 | * | f4972ac catching up ex21 | * | 385929f catching up ex20 | * | 6bfe654 catching up ex20 | * | 471cd8d catching up ex19 | * | e9bf57e catching up ex18 | * | 6a030e7 catching up acad script example for ex16.5 | * | ef11701 renamed ex16_... -> ex16_0_... | * | 73e156b catching up ex15 | * | 593886a catching up ex15 | * | a17e0bf catching up ex14 | * | d20b797 catching up ex12 | * | 997b320 catching up ex11 | * | e10d3d0 catching up ex10 | * | 69ab0b6 catching up ex09 | * | 408e5b6 ex26 file from https://learnpythonthehardway.org/book/exercise26.txt | * | 015d325 ex08 | * | 25ee5cd Merge branch 'master' of https://github.com/CPF18B/18pfb_lpthw-kangwon-naver | |\ \ | | * | ba87899 This is to show how conflict may happen | | * | c052894 add (partial) and commit | * | | fe313be This would be a conflict | * | | 687bae2 Not exactly a conflict | |/ / | * | 6e69530 ex17.py generated new_file.txt | * | dddf16a file for ex17.py (from book) | * | 66a3a0d ex17 (encoding='utf-8') | * | 5c14c5b ex12 | * | 1979edb ex13 | * | dd03a9b ex 07 | * | 3a5e3e0 연습 11 앞부분 | * | 3cb7fa0 연습 6 아래부분 | * | d5681cf 연습 6 중간 부분 | * | 019925f 연습 6 앞부분 | * | 5faf14f 마음은 대략 그런 듯 합니다 | * | 7235062 연습 5 내용 입력 | * | f5af11a 정수로 표시 // 운전자 수 변경 | * | 9173bbc 연습 4 내용 입력 | * | 63b5693 '/' 와 '//' 비교 | * | 63ce0a2 1 / 4 -> 1 // 4 | * | e1ffedf LPTHW ex 03 | * | 82876c7 LPTHW 연습 02 질문 02 입력 | * | 2fd5cd8 LPTHW 연습 02 입력 | * | 62ece91 LPTHW 연습 01 | * | e876cd4 pycharm 이 생성한 파일은 무시 | * | 9a48529 Revert "실수로 삭제" | * | 09e721e 실수로 삭제 * | | 163745e added turtle demo | |/ |/| * | 6062887 added C for loop example * | 5c9f2ff ex28 : more %r * | a588092 ex28 : added %r * | 02b8290 ex28 : typo * | fab7bfb for_example.py : indicate index * | ab2f1b9 added for_example.py * | c1e4c59 added ex42 * | 464aeca ex35 recursion example : time in micro-seconds * | 8b9fc03 Renamed a folder * | 6275137 ex39: delete items * | d895bf1 ex39 : integer keys * | 923deff ex39 : dictionary examples * | 9fc11e6 ex39 dict : first example with list * | ef27ab7 renamed path to ex39_dict * | 2f34d08 ex38 : list methods * | 0f6b687 ex38 : putting ten items in the ten_things * | 10b45d9 cthulhu_room() start() * | b599fac ex35 : added bear_room() * | bd85bcf ex35 : added gold_room() * | 8b3e45a ex35 : added function dead() * | cf5e86f recursion example : measure time in msec * | 89f652b added factorial_for_loop() * | 2817333 added comments * | bd485fb factorial_recursion() * | eb8e6e7 ex34 : added ordinals * | a82e574 ex34 : 5 ~ 8 * | b7c3cd7 ex34 : 1 ~ 4 * | 5ffcc75 ex33 * | 32f09e2 added sum_many.py * | ef8fba8 catchin up ex33 * | 8cddc4c ex32 : making a list * | 18adb82 ex32 : second and third for loops * | 3702ee4 ex32 : first for loop * | a140006 ex31 : else (door) * | 57ae13a ex31 : 2 == door * | 9a4d8e4 ex31 : 1 == door * | be5b90c ex30 * | 2e43807 ex29 after dogs += 5 * | 36dc9a0 ex29 : first block * | a64e682 ex28 : extra four lines * | 989dddf ex28 : fourth five lines * | 2fd6a38 ex28: added sep variable to reuse literal * | c2312b6 ex28 : third five lines * | 7592cc1 second five lines * | 17be012 changed = to :\t * | f2b5c68 ex28 first five lines * | e32ff28 ignore __pycache__/ for ex25 * | 373ffe6 ignore *.pyc for ex25 * | 50fcd93 catching up ex25 * | bbfbbc2 ex27 : last two tables * | 9861cc3 ex27 : fourth and fifth tables * | 1ff57a6 ex27 first three truth tables * | b8f3c53 added ex27 guide * | 8c292db Added ex26.txt from https://learnpythonthehardway.org/book/exercise26.txt * | 37b9940 catching up ex24 * | 2a83b27 renamed ex16 -> ex16_0 * | aca8baf ex24 : before the function * | 25f1511 ex24 first lines (text includes typo) * | cf4ffa1 ex21 (catching up) extra credit * | 7b630c4 ex21 (catching up) calling functions * | 7844d34 ex21 functions (catching up) * | 9b0ac6c ex20 calls (catching up) * | f5eac05 ex20 test.txt (catching up) * | b0edd09 ex20 functions * | a89a02c ex19 last call (still catching up) * | 5c3ab2d ex19 third call * | ff9c520 ex19 first two calls * | 4362b99 ex13 : added comment on printing repr(argv) * | a561226 ex16 : added comment on encoding * | 529c011 ex15 : added comment on encoding * | 40bec46 ex15 : encoding = utf-8 * | 6f408e1 added ex03 comments * | 5660998 ex18 * | ad76566 ex16.5 * | 2e382c1 ex15 * | fbd0688 ex15 * | e38dfd4 ex14 * | 9f2c090 ex12 * | 11f9326 ex11 * | b2cd7f8 Merge branch 'master' of https://github.com/CPF18A/18pfa_lpthw-kangwon-naver |\ \ | * | 497a51d Conflict Example * | | 7e264de Conflict 발생 예상 * | | 7e2cd0a 다른 부분 수정 |/ / * | 4d24f90 if commandline argument available, use the address * | c5384dd obtained html source code from a website using request * | 66fe50c ex17.py generated this file * | ab3b205 entered for ex17 * | fa83917 ex17 : indicated encoding = utf8 * | fbd65fa ex17.py : until the end * | 975946a ex17 until input() * | d9eee9a ex16.py generated this file * | 2531c2c added encoding=utf8 * | 226e8ce ex16 * | 8dcc6db ex 13 * | bfadd96 ex 10 * | e2af838 ex 09 * | 7559c24 ex 08 * | f436eea 연습 7 입력 * | 7cded5e 연습 6 입력 * | 2fead0e 연습 5 입력 * | f9883ec 연습 4 입력 * | d54c87e 연습 3 입력 * | e050cec PyCharm 생성 파일 무시 Ignore files generated by PyCharm * | e247ecf LPTHW 연습 02 입력 * | cc0e901 LPTHW 연습 01 내용 입력 |/ * bd88b0b initial commit
Module Branches Creating Workflow.
I believe I have created simplest to understand workflow. Please have a look.
This is officially my favorite tool to play with. It provides visual insights to know where the issues are
Thanks, @mozzadrella, for pointing out to this nice visualisation tool. Here’s my graph:
I created some branches out of
master and merged them back into
master after a few commits.
I have two similar workflows, one using merge and one using rebase.
There’s always at least 2 branches and these:
- master: latest working version of the product (should always work!)
- acceptance: final testing for the client
- development: although not included in the screenshots, this could be a valuable branch where developers can test their code together
- feature branches: these branches are named after their feature and are branches private to the teams working on a feature.
When done with the feature this branch will merge in a target branch (development or acceptance), fix eventual merge conflicts and test. Then after checking out the target branch we’ll merge in this feature. During this merge period, the target branch should not be touched and should be protected by whoever has the Git Master role.
I’d love some feedback @mozzadrella!
Our workflow for individual (solo) assignments is pretty linear.
I encourage branching for features of the assignments and rapid merging (two stages, as a students can get feedback from peers, TA or Instructor). As they test or demo their work (prior to the deadline) they might need to fix an issue, in which case the create a fix branch, which they merge once the issue is fixed.
They work on multiple features in the assignment, when the last one is finished and merged in dev without issues, then they merge to master.
Nice tool! Thanks for sharing.
The purpose of this module thus far seems to be to indicate to new faculty that GitHub Classroom often fails to create new repos and import starter code. Unfortunately, this tends to happen at the worst time, such as a live coding lab. I’ll try again some other day.