<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://training-course-material.com/index.php?action=history&amp;feed=atom&amp;title=Git_-_Bisect</id>
	<title>Git - Bisect - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://training-course-material.com/index.php?action=history&amp;feed=atom&amp;title=Git_-_Bisect"/>
	<link rel="alternate" type="text/html" href="https://training-course-material.com/index.php?title=Git_-_Bisect&amp;action=history"/>
	<updated>2026-05-13T06:46:02Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://training-course-material.com/index.php?title=Git_-_Bisect&amp;diff=8484&amp;oldid=prev</id>
		<title>Bernard Szlachta at 10:04, 4 December 2012</title>
		<link rel="alternate" type="text/html" href="https://training-course-material.com/index.php?title=Git_-_Bisect&amp;diff=8484&amp;oldid=prev"/>
		<updated>2012-12-04T10:04:48Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Cat|Git}}&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 # Initiallize repo&lt;br /&gt;
 cd /g&lt;br /&gt;
 mkdir /g/tmp&lt;br /&gt;
 cd tmp&lt;br /&gt;
 mkdir repo&lt;br /&gt;
 cd repo/&lt;br /&gt;
 git init  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  echo &amp;quot;exit 0&amp;quot; &amp;gt; code.sh&lt;br /&gt;
  git add code.sh; &lt;br /&gt;
  git commit -a -m &amp;quot;c0&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  # Genereate 10 revision which do not spoil the script&lt;br /&gt;
  for i in $(seq 10) ; do   echo &amp;quot;# round 1 $i&amp;quot; &amp;gt;&amp;gt; code.sh ; git commit -a -m &amp;quot;c$i&amp;quot; ; done&lt;br /&gt;
  &lt;br /&gt;
  # Spoil the script&lt;br /&gt;
  echo &amp;quot;exit 1&amp;quot; &amp;gt; code.sh&lt;br /&gt;
  git commit -a -m &amp;quot;bug revision&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
  # generate 20 revisions which do not spoil already spoiled script&lt;br /&gt;
  for i in $(seq 20) ; do   echo &amp;quot;# round 2 $i&amp;quot; &amp;gt;&amp;gt; code.sh ; git commit -a -m &amp;quot;c$i&amp;quot; ; done&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 git bisect start&lt;br /&gt;
 git bisect bad&lt;br /&gt;
 # mark first revision as good&lt;br /&gt;
 git bisect good  6d34b &lt;br /&gt;
&lt;br /&gt;
 git bisect run bash code.sh&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 running bash code.sh&lt;br /&gt;
 Bisecting: 7 revisions left to test after this (roughly 3 steps)&lt;br /&gt;
 [65e896df0fb1a865e8678bc2145f1621b802acfd] c7&lt;br /&gt;
 running bash code.sh&lt;br /&gt;
 Bisecting: 3 revisions left to test after this (roughly 2 steps)&lt;br /&gt;
 [480515f739bf6dd9a2a6ab47d8626aea805d4880] bug revision&lt;br /&gt;
 running bash code.sh&lt;br /&gt;
 Bisecting: 1 revision left to test after this (roughly 1 step)&lt;br /&gt;
 [52de39416f0f93a1b95f744de05699baa85ab224] c9&lt;br /&gt;
 running bash code.sh&lt;br /&gt;
 Bisecting: 0 revisions left to test after this (roughly 0 steps)&lt;br /&gt;
 [22ef2aaf18c69aa420534303ceeec2078154357c] c10&lt;br /&gt;
 running bash code.sh&lt;br /&gt;
 480515f739bf6dd9a2a6ab47d8626aea805d4880 is the first bad commit&lt;br /&gt;
 commit 480515f739bf6dd9a2a6ab47d8626aea805d4880&lt;br /&gt;
 Author: Your Name &amp;lt;you@example.com&amp;gt;&lt;br /&gt;
 Date:   Tue Dec 4 00:02:09 2012 +0000&lt;br /&gt;
 &lt;br /&gt;
     bug revision&lt;br /&gt;
 &lt;br /&gt;
 :100644 100644 68d815b9ee3a9b590f2be9db2adfe37d715f964f 379a4c986e3265e08e9da42c56ec747619c56a33 M	code.sh&lt;br /&gt;
 bisect run success&lt;/div&gt;</summary>
		<author><name>Bernard Szlachta</name></author>
	</entry>
</feed>