× {{alert.msg}} Never ask again
Get notified about new tutorials RECEIVE NEW TUTORIALS

Quick switch between Git branches

Inanc Gumus
Dec 21, 2016
<p><strong>For example:</strong></p> <ul> <li>You have 2 branches</li> <li><em>master</em> and <em>development</em></li> </ul> <p><strong>When on master, t<span style="color:rgb(95, 99, 102)">o switch to </span><em>development</em><span style="color:rgb(95, 99, 102)"> branch, you type</span>:</strong></p> <div style="background:#eee; border:1px solid #ccc; padding:5px 10px"><span class="marker">git checkout development</span></div> <p><br> <strong><span style="background-color:#FFFF00">HERE IS THE TIP! To switch back to master, just type:</span></strong></p> <div style="background:#eee; border:1px solid #ccc; padding:5px 10px">git checkout -</div> <p><br> <strong>And, to go back to <em>development</em> branch <em>again</em>, just type:</strong></p> <div style="background:rgb(238, 238, 238); border:1px solid rgb(204, 204, 204); padding:5px 10px">git checkout -</div> <p><br> You can repeat this infinitely.</p>

Get New Tutorials Delivered to Your Inbox

New tutorials will be sent to your Inbox once a week.

comments powered by Disqus