You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<h3><spanclass="header-section-number">9.3.1</span> Getting started<ahref="developing-en.html#getting-started" class="anchor-section" aria-label="Anchor link to header"></a></h3>
533
533
<p>The QCBS R Workshops presentations are written in <code>RMarkdown</code> using a template built on <ahref="https://bookdown.org/yihui/rmarkdown/xaringan.html">xaringan</a>. The first step is to install the <code>R</code> package <code>xaringan</code>.</p>
<p>Secondly, you need to create a local copy of the repository for the workshop you will be working on, found <ahref="https://github.com/QCBSRworkshops">here</a>. To do so, you can <ahref="https://help.github.com/articles/cloning-a-repository/">clone the GitHub repository</a> on your computer.</p>
537
537
<p>You can use the command line to do this (more details <ahref="https://docs.github.com/en/free-pro-team@latest/github/creating-cloning-and-archiving-repositories/cloning-a-repository#cloning-a-repository-using-the-command-line">here</a>):</p>
<spanid="cb23-2"><ahref="developing-en.html#cb23-2" aria-hidden="true" tabindex="-1"></a><spanclass="co"># change this link depending on the workshop you're working on!</span></span></code></pre></div>
<spanid="cb23-2"><ahref="developing-en.html#cb23-2" tabindex="-1"></a><spanclass="co"># change this link depending on the workshop you're working on!</span></span></code></pre></div>
540
540
<p>If you are not comfortable with the command line, you can clone this repository using <ahref="https://desktop.github.com/">GitHub Desktop</a>, following instructions <ahref="https://docs.github.com/en/free-pro-team@latest/github/creating-cloning-and-archiving-repositories/cloning-a-repository#cloning-a-repository-to-github-desktop">here</a>.</p>
541
541
<p>Once you have cloned the repository, you are ready to begin developing!</p>
<li><strong>Create and publish a new branch</strong>. Choose a name that is explicit about what you are adding, <em>e.g.</em><code>workshop1_intro</code> if you are working on the introduction of workshop 1.</li>
549
549
</ol>
550
550
<p>On the command line:</p>
551
-
<divclass="sourceCode" id="cb24"><preclass="sourceCode bash"><codeclass="sourceCode bash"><spanid="cb24-1"><ahref="developing-en.html#cb24-1" aria-hidden="true" tabindex="-1"></a><spanclass="fu">git</span> branch workshop1_intro <spanclass="co"># creates a new branch</span></span></code></pre></div>
551
+
<divclass="sourceCode" id="cb24"><preclass="sourceCode bash"><codeclass="sourceCode bash"><spanid="cb24-1"><ahref="developing-en.html#cb24-1" tabindex="-1"></a><spanclass="fu">git</span> branch workshop1_intro <spanclass="co"># creates a new branch</span></span></code></pre></div>
<spanid="cb25-3"><ahref="developing-en.html#cb25-3" aria-hidden="true" tabindex="-1"></a><spanclass="co"># Note that you can create and switch branch in a single line: </span></span>
<spanid="cb25-3"><ahref="developing-en.html#cb25-3" tabindex="-1"></a><spanclass="co"># Note that you can create and switch branch in a single line: </span></span>
<li><p><strong>Make your changes</strong>, following the <ahref="developing-en.html#guidelines">Guidelines</a> listed above.</p></li>
564
564
<li><p><strong>Add and commit your changes</strong>. Once you are finished making changes on your branch, add and commit them to record these changes. When you commit changes, it is essential to include a commit message that briefly summarizes what you’ve done. Keep it brief but informative!</p></li>
565
565
</ol>
566
566
<p>On the command line:</p>
567
-
<divclass="sourceCode" id="cb26"><preclass="sourceCode bash"><codeclass="sourceCode bash"><spanid="cb26-1"><ahref="developing-en.html#cb26-1" aria-hidden="true" tabindex="-1"></a><spanclass="fu">git</span> add <spanclass="at">-A</span><spanclass="co"># add all your changes</span></span>
568
-
<spanid="cb26-2"><ahref="developing-en.html#cb26-2" aria-hidden="true" tabindex="-1"></a><spanclass="fu">git</span> commit <spanclass="at">-m</span><spanclass="st">"fix code for plot in Challenge 1"</span><spanclass="co"># commit your changes with a message</span></span></code></pre></div>
567
+
<divclass="sourceCode" id="cb26"><preclass="sourceCode bash"><codeclass="sourceCode bash"><spanid="cb26-1"><ahref="developing-en.html#cb26-1" tabindex="-1"></a><spanclass="fu">git</span> add <spanclass="at">-A</span><spanclass="co"># add all your changes</span></span>
568
+
<spanid="cb26-2"><ahref="developing-en.html#cb26-2" tabindex="-1"></a><spanclass="fu">git</span> commit <spanclass="at">-m</span><spanclass="st">"fix code for plot in Challenge 1"</span><spanclass="co"># commit your changes with a message</span></span></code></pre></div>
569
569
<p>You can also use GitHub Desktop to add changes (<ahref="https://docs.github.com/en/free-pro-team@latest/desktop/contributing-and-collaborating-using-github-desktop/committing-and-reviewing-changes-to-your-project#2-selecting-changes-to-include-in-a-commit">instructions here</a>) and commit them (<ahref="https://docs.github.com/en/free-pro-team@latest/desktop/contributing-and-collaborating-using-github-desktop/committing-and-reviewing-changes-to-your-project#3-write-a-commit-message-and-push-your-changes">instructions here</a>).</p>
570
570
<olstart="5" style="list-style-type: decimal">
571
571
<li><strong>Sync your main branch with the remote repository</strong>. It’s important to make sure your main branch is up to date before changing it. Go to back to the main branch and pull changes that were made since you last copied the repository.</li>
572
572
</ol>
573
573
<p>Pull the <code>dev</code> on the command line:</p>
574
-
<divclass="sourceCode" id="cb27"><preclass="sourceCode bash"><codeclass="sourceCode bash"><spanid="cb27-1"><ahref="developing-en.html#cb27-1" aria-hidden="true" tabindex="-1"></a><spanclass="fu">git</span> checkout dev <spanclass="co"># switch back to the main branch</span></span>
<divclass="sourceCode" id="cb27"><preclass="sourceCode bash"><codeclass="sourceCode bash"><spanid="cb27-1"><ahref="developing-en.html#cb27-1" tabindex="-1"></a><spanclass="fu">git</span> checkout dev <spanclass="co"># switch back to the main branch</span></span>
<p>Pull the <code>master</code> branch on GitHub Desktop (<ahref="https://docs.github.com/en/free-pro-team@latest/desktop/contributing-and-collaborating-using-github-desktop/syncing-your-branch#pulling-to-your-local-branch-from-the-remote">instructions here</a>).</p>
577
577
<olstart="6" style="list-style-type: decimal">
578
578
<li><strong>Merge your branch with the main branch locally.</strong> Switch back to your branch (e.g. <code>workshop1_intro</code>) and merge it with your local main branch. If there are conflicts, please resolve them!</li>
579
579
</ol>
580
580
<p>You can merge your branch with the <code>dev</code> branch using the command line:</p>
581
-
<divclass="sourceCode" id="cb28"><preclass="sourceCode bash"><codeclass="sourceCode bash"><spanid="cb28-1"><ahref="developing-en.html#cb28-1" aria-hidden="true" tabindex="-1"></a><spanclass="fu">git</span> checkout workshop1_intro <spanclass="co"># switch back to your branch</span></span>
582
-
<spanid="cb28-2"><ahref="developing-en.html#cb28-2" aria-hidden="true" tabindex="-1"></a><spanclass="fu">git</span> merge dev <spanclass="co"># merge the main branch with your branch</span></span></code></pre></div>
581
+
<divclass="sourceCode" id="cb28"><preclass="sourceCode bash"><codeclass="sourceCode bash"><spanid="cb28-1"><ahref="developing-en.html#cb28-1" tabindex="-1"></a><spanclass="fu">git</span> checkout workshop1_intro <spanclass="co"># switch back to your branch</span></span>
582
+
<spanid="cb28-2"><ahref="developing-en.html#cb28-2" tabindex="-1"></a><spanclass="fu">git</span> merge dev <spanclass="co"># merge the main branch with your branch</span></span></code></pre></div>
583
583
<p>Merge your branch with the <code>master</code> branch in GitHub Desktop (<ahref="https://docs.github.com/en/free-pro-team@latest/desktop/contributing-and-collaborating-using-github-desktop/syncing-your-branch#merging-another-branch-into-your-project-branch">instructions here</a>).</p>
584
584
<olstart="7" style="list-style-type: decimal">
585
585
<li><strong>Push your locally merged branch</strong> to the remote GitHub repository.</li>
586
586
</ol>
587
587
<p>On the command line, you can push your locally merged branch (e.g. <code>workshop1_intro</code>) to the remote repository like this:</p>
588
-
<divclass="sourceCode" id="cb29"><preclass="sourceCode bash"><codeclass="sourceCode bash"><spanid="cb29-1"><ahref="developing-en.html#cb29-1" aria-hidden="true" tabindex="-1"></a><spanclass="fu">git</span> push <spanclass="at">--set-upstream</span> origin workshop1_intro <spanclass="co"># push to the remote!</span></span></code></pre></div>
588
+
<divclass="sourceCode" id="cb29"><preclass="sourceCode bash"><codeclass="sourceCode bash"><spanid="cb29-1"><ahref="developing-en.html#cb29-1" tabindex="-1"></a><spanclass="fu">git</span> push <spanclass="at">--set-upstream</span> origin workshop1_intro <spanclass="co"># push to the remote!</span></span></code></pre></div>
589
589
<p>Push your branch (e.g. <code>workshop1_intro</code>) to the remote repository in GitHub Desktop (<ahref="https://docs.github.com/en/free-pro-team@latest/desktop/contributing-and-collaborating-using-github-desktop/syncing-your-branch#merging-another-branch-into-your-project-branch">see step #4)</a>).</p>
590
590
<olstart="8" style="list-style-type: decimal">
591
591
<li><strong>Open a <ahref="https://help.github.com/articles/about-pull-requests/">Pull Request</a></strong>.</li>
0 commit comments