Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<blockquote> <p>Should you create a new branch for every set of changes or is okay to work on the master branch?</p> </blockquote> <p>It's a matter of taste. You should create a branch for every major feature you implement ("topic branches"), thus beeing able to do bugfixes on the original master branch. For small projects, it is OK to work on the master branch.</p> <p>For example, if you plan to do a major redesign, spanning multiple files or working on it over a longer period of time, you should definitely create a topic branch for it. Especially if you plan to use "unstable" commit in between, which is encouraged.</p> <p>That said, it might be reasonable to work on a different branch most of the time since it might be hard to know in advance how much work a topic will need.</p> <blockquote> <p>Should you create a new clone for every branch?</p> </blockquote> <p>No. Why should you? Just create a new branch and use <code>git checkout &lt;branchname&gt;</code> to switch branches.</p> <p>Hint: Learn about <code>git stash</code> to temporarily "stash away" all local modifications, it is extremely handy when working with branches.</p> <blockquote> <p>When do you merge your local branches with your local master?</p> </blockquote> <p>Once the "topic" is finished you should merge it with the master. After that, you may delete the topic branch.</p> <blockquote> <p>When (and how) do you create a remote branch?</p> </blockquote> <p>You can specify which local branch to synchronize with which remote branch using <code>git pull</code>, <code>git push</code> or by defining the corresponding <code>ref</code>s in the <code>.git/config</code> file.</p> <p>You need remote branches when you want to share a branch over multiple machines or users.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload