Splitting Big Fat Pr

<p>Today we will be discussing how we can split up a big pr into multiple smaller pr&rsquo;s. Since smaller pr&rsquo;s has its own advantage like -</p> <ol> <li>Easy to review</li> <li>Easy to test</li> <li>Easy to understand the core concept of the pr</li> </ol> <p>Big fat Pr&rsquo;s can be avoided if the task is planned well, so that from the initial phase onwards all the tasks were broken down into smaller Pr&rsquo;s.</p> <p>but what if you missed the opportunity to plan your tasks well and created a big fat pr.</p> <p><img alt="" src="https://miro.medium.com/v2/resize:fit:700/0*yv0EQkgOXSmTt2hC" style="height:467px; width:700px" /></p> <h1><strong>Do not worry,</strong></h1> <p>github is there for the rescue.</p> <p>&nbsp;</p> <p>Photo by&nbsp;<a href="https://unsplash.com/@synkevych?utm_source=medium&amp;utm_medium=referral" rel="noopener ugc nofollow" target="_blank">Roman Synkevych</a>&nbsp;on&nbsp;<a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral" rel="noopener ugc nofollow" target="_blank">Unsplash</a></p> <p>Let&rsquo;s take an example &mdash;</p> <p>Suppose you have a Pr consists of 3 files , we will name this as&nbsp;<strong>main pr</strong></p> <pre> 1. mainScript.js --- +29 // lines of change 2. logger.js ---- +500 // lines of change 3. background.js --- +130 // lines of change </pre> <p><img alt="" src="https://miro.medium.com/v2/resize:fit:700/1*pPyLc7gtNA6FVauVhFRJdg.png" style="height:320px; width:700px" /></p> <p>Now, the first task would be to identify the independent changes which we can separate out in a different Pr, in our case it&rsquo;s the&nbsp;<strong>logger.js .</strong></p> <p>So how can we separate out the logger.js from the main pr?</p> <ol> <li>create a child branch from the main pr, we will name this as&nbsp;<strong>logger pr</strong><br /> Since this is a child branch of the main pr it will contains all the changes of its parent.</li> </ol> <p>&nbsp;<a href="https://medium.com/@mdwarish56/splitting-big-fat-pr-5b09d848d2db">Read More</a></p>