{"id":16318137,"url":"https://github.com/scorphus/git-workshop","last_synced_at":"2025-07-25T23:38:02.716Z","repository":{"id":148200661,"uuid":"102669126","full_name":"scorphus/git-workshop","owner":"scorphus","description":"Repository to use as demo on Git Workshops","archived":false,"fork":false,"pushed_at":"2018-03-07T17:44:58.000Z","size":204,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-13T17:16:48.298Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scorphus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-06T23:47:58.000Z","updated_at":"2017-09-06T23:49:07.000Z","dependencies_parsed_at":"2023-05-19T10:15:24.996Z","dependency_job_id":null,"html_url":"https://github.com/scorphus/git-workshop","commit_stats":{"total_commits":711,"total_committers":1,"mean_commits":711.0,"dds":0.0,"last_synced_commit":"55a23c6075ccd76003d86713b083e1f3a75871ec"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/scorphus/git-workshop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scorphus%2Fgit-workshop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scorphus%2Fgit-workshop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scorphus%2Fgit-workshop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scorphus%2Fgit-workshop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scorphus","download_url":"https://codeload.github.com/scorphus/git-workshop/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scorphus%2Fgit-workshop/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260321849,"owners_count":22991712,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T22:10:03.729Z","updated_at":"2025-06-17T08:32:48.352Z","avatar_url":"https://github.com/scorphus.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Git Workshop\n\nRepository used for my Git workshops/talks\n\n## Presentation\n\nMail me for the Keynote/PDF :wink:\n\n## Bisecting\n\nBisect helps you identify a commit that introduced a bug or a new functionality.\n\n### Bisect manually and identify a commit that introduced a bug\n\nThe bug we have is the misspelled `eightty`. Let's find it:\n\n```\ngit bisect start buggy working\n./spell-number.py 88\ngit bisect good/bad  # good or bad depending on output\n./spell-number.py 88\ngit bisect good/bad  # good or bad depending on output\n# ... repeat until you get the commit that introduces the bug\n```\n\n### Automate it with a script:\n\nThis can be automated with a simple Bash script:\n\n```\ngit bisect start buggy working\ngit bisect run ./script_spelling.sh\n```\n\n#### `script_spelling.sh`\n```bash\n#!/bin/sh\n\n# Delete Python bytecodes\nfind . -name \"*.pyc\" -delete\n\nword=$(./spell-number.py 88 | tr /A-Z/ /a-z/)\n\nif [[ \"$word\" == \"eightty eight\" ]]; then\n    exit 1\nfi\n```\n\n### Bisect manually and identify a commit that introduced an unexpected feature\n\nThe unexpected feature we have is capitalization. For cases like this – when you\nneed to find a *good* commit – it's better to use old/new terms. Let's do it:\n\n```\ngit bisect start --term-bad=new --term-good=old master working\n./spell-number.py 359\ngit bisect old/new  # old or new depending on output\n./spell-number.py 359\ngit bisect old/new  # old or new depending on output\n# ... repeat until you get the commit that introduces the feature\n```\n\n### Automate it with a script\n```\ngit bisect start master working\ngit bisect run ./script_capital.sh\n```\n\n#### `script_capital.sh`\n```bash\n#!/bin/sh\n\n# Delete Python bytecodes\nfind . -name \"*.pyc\" -delete\n\nword=$(./spell-number.py 359)\n\nif [[ \"$word\" == \"Three Hundred and Fifty Nine\" ]]; then\n    exit 1\nfi\n```\n\n## License\n\n[MIT](http://opensource.org/licenses/MIT) © [scorphus](https://github.com/scorphus)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscorphus%2Fgit-workshop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscorphus%2Fgit-workshop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscorphus%2Fgit-workshop/lists"}