{"id":16694756,"url":"https://github.com/spenserblack/git-bisect-tutorial","last_synced_at":"2025-06-17T23:06:11.459Z","repository":{"id":222853037,"uuid":"758542562","full_name":"spenserblack/git-bisect-tutorial","owner":"spenserblack","description":"A small repository to help beginners learn git bisect","archived":false,"fork":false,"pushed_at":"2024-06-12T18:59:45.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-17T23:06:04.604Z","etag":null,"topics":["git","git-bisect","learning","learning-by-doing","tutorial"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/spenserblack.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,"zenodo":null}},"created_at":"2024-02-16T14:47:09.000Z","updated_at":"2024-06-12T18:59:48.000Z","dependencies_parsed_at":"2024-02-16T16:31:16.935Z","dependency_job_id":"cc85eccd-606f-4974-bef6-6813c85da6c3","html_url":"https://github.com/spenserblack/git-bisect-tutorial","commit_stats":null,"previous_names":["spenserblack/git-bisect-tutorial"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/spenserblack/git-bisect-tutorial","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spenserblack%2Fgit-bisect-tutorial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spenserblack%2Fgit-bisect-tutorial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spenserblack%2Fgit-bisect-tutorial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spenserblack%2Fgit-bisect-tutorial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spenserblack","download_url":"https://codeload.github.com/spenserblack/git-bisect-tutorial/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spenserblack%2Fgit-bisect-tutorial/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260453742,"owners_count":23011575,"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":["git","git-bisect","learning","learning-by-doing","tutorial"],"created_at":"2024-10-12T16:48:09.773Z","updated_at":"2025-06-17T23:06:06.445Z","avatar_url":"https://github.com/spenserblack.png","language":"Shell","readme":"# Git Bisect Tutorial\n\nThis is a repository to teach the basics of `git bisect`. It simulates finding\na bug in a file and discovering when that bug was introduced. The file was\nintentionally written to make it difficult to use `git blame` for the same task.\n\n## Challenge\n\n### Introduction\n\nWe have a _very_ important file, called [`file.txt`][buggy-file]. We want to be absolutely\nsure that it doesn't contain any bugs (🐛). But if you\n[open the file...][buggy-file]\n\nOh no! There's a bug!\n\n🤔 But when did we introduce the bug?\n\n### Task\n\nFirst, [clone this repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository).\n\nTo get you started, let's assume that we already know that our file was good at version 1.0.0 (tagged `v1.0.0`). But it's bad now! So let's start\nour bisect:\n\n```shell\ngit bisect start\ngit bisect bad\ngit bisect good v1.0.0\n```\n\nNow, the bisect should have checked out a halfway point between our known\ngood commit and bad commit. Open up `file.txt`. Is the bug\nstill there? If there is a bug, call `git bisect bad` again. If we don't\nhave a bug, call `git bisect good`. Once again, git will jump to\na new halfway point. Look at `file.txt` again. Again, call either\n`git bisect good` or `git bisect bad`. Continue this a few times, and\nyou will eventually find the first bad commit that introduced the bug!\n\n### Wrap up\n\nDid you find the first commit that introduced the bug? Now that you're\nfinished bisecting, call `git bisect reset` to return things to how\nthey were.\n\nWhile this challenge was a silly example to get you used to `git bisect`,\nnote that this command can be very helpful for finding when *real* bugs\nwere introduced into a project. When you can see what change *added* a\nbug, it can become easier to understand what you need to do to fix the\nbug.\n\n\n## More things to consider\n\nTo make `git bisect` as useful as possible, how should you write your\ncommits? If you occasionally make really big commits that change a\nbunch of things at once, would a bisect be useful? Or would it be\nbetter to make several smaller commits that each change one thing?\n\n[buggy-file]: ./file.txt\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspenserblack%2Fgit-bisect-tutorial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspenserblack%2Fgit-bisect-tutorial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspenserblack%2Fgit-bisect-tutorial/lists"}