Splitting Big Fat Pr
<p>Today we will be discussing how we can split up a big pr into multiple smaller pr’s. Since smaller pr’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’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’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> </p>
<p>Photo by <a href="https://unsplash.com/@synkevych?utm_source=medium&utm_medium=referral" rel="noopener ugc nofollow" target="_blank">Roman Synkevych</a> on <a href="https://unsplash.com/?utm_source=medium&utm_medium=referral" rel="noopener ugc nofollow" target="_blank">Unsplash</a></p>
<p>Let’s take an example —</p>
<p>Suppose you have a Pr consists of 3 files , we will name this as <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’s the <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 <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> <a href="https://medium.com/@mdwarish56/splitting-big-fat-pr-5b09d848d2db">Read More</a></p>