Skip to content

Commit 6b23bd8

Browse files
committed
Update Git manual rendered version
1 parent e7ae202 commit 6b23bd8

2 files changed

Lines changed: 15 additions & 34 deletions

File tree

docs/manual-git.html

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ <h3 id="clone-a-repo-to-work-locally-command-line">Clone a repo to work locally:
512512
<li>Follow <a href="https://help.github.com/articles/cloning-a-repository/">this tutorial</a> to clone your repo</li>
513513
</ol>
514514
<p><strong>Tip</strong>: <a href="https://git-scm.com/docs/git-config.html#git-config-coreeditor">adapt git configuration</a> to use your favourite editor</p>
515-
<pre><code>git config --global core.editor vim</code></pre>
515+
<pre><code>git config --global core.editor gedit</code></pre>
516516
</section>
517517
<section class="slide level2">
518518

@@ -553,7 +553,7 @@ <h3 id="push-your-changes-to-backup-your-work">Push your changes to backup your
553553
</section>
554554
<section class="slide level2">
555555

556-
<h4 id="go-to-your-repo-on-github-to-verify">Go to your repo on GitHub to verify</h4>
556+
<h3 id="go-to-your-repo-on-github-to-verify">Go to your repo on GitHub to verify</h3>
557557
<p><img src="manual-git/local-commit-on-github.png" alt="Verify your commits on GitHub" /></p>
558558
</section>
559559
<section class="slide level2">
@@ -611,13 +611,10 @@ <h3 id="keep-calm-and-resolve-conflict">Keep calm and resolve conflict</h3>
611611
&gt;&gt;&gt;&gt;&gt;&gt;&gt; origin/master</code></pre></li>
612612
<li><p>Choose what you want to keep:</p>
613613
<pre><code>A simple analysis to discover my favourite fruit colour.</code></pre></li>
614-
<li>Commit and push
615-
<ul>
616-
<li><p>in command line:</p>
614+
<li><p>Commit and push</p>
617615
<pre><code>git add &lt;fixed files&gt;
618616
git commit
619617
git push origin master</code></pre></li>
620-
</ul></li>
621618
</ol>
622619
</section>
623620
<section class="slide level2">
@@ -630,7 +627,7 @@ <h3 id="resolve-conflict-command-line">Resolve conflict: command line</h3>
630627
<h3 id="add-a-file">Add a file</h3>
631628
<ol type="1">
632629
<li>Add a <code>fruits.csv</code> file in a <code>/data</code> directory</li>
633-
<li>Link to this file the <code>README.md</code></li>
630+
<li>Link to this file in the <code>README.md</code></li>
634631
</ol>
635632
</section>
636633
<section class="slide level2">
@@ -641,7 +638,7 @@ <h3 id="add-a-file-github-desktop">Add a file: GitHub Desktop</h3>
641638
<section class="slide level2">
642639

643640
<h3 id="add-a-file-command-line">Add a file: command line</h3>
644-
<p><code>git commit -am &quot;Mymessage&quot;</code> <br/> takes all changes in a single commit</p>
641+
<p><code>git commit -am &quot;My message&quot;</code> <br/> takes all changes in a single commit</p>
645642
<pre><code>git add data/fruits.csv
646643
git commit -am &quot;Add data file&quot;
647644
git push origin master</code></pre>
@@ -674,8 +671,6 @@ <h3 id="view-history-command-line">View history: command line</h3>
674671
<li>Check the local directory and files on your computer</li>
675672
<li><code>git checkout master</code></li>
676673
</ol>
677-
<p><strong>Tip for Linux users:</strong> Add an alias to your <code>.bash_aliases</code>:</p>
678-
<pre><code>alias glog=&quot;git log --graph --pretty=format:&#39;%C(bold)%h%Creset%C(magenta)%d%Creset %s %C(yellow)&lt;%an&gt; %C(cyan)(%cr)%Creset&#39; --abbrev-commit --date=relative&quot;</code></pre>
679674
</section>
680675
<section class="slide level2">
681676

@@ -725,12 +720,12 @@ <h3 id="create-a-pull-request-to-include-your-work-command-line">Create a pull r
725720
</section>
726721
<section class="slide level2">
727722

728-
<h3 id="review-a-your-pull-request">Review a (your) pull request</h3>
723+
<h3 id="review-your-pull-request">Review your pull request</h3>
729724
<p><img src="manual-git/pr.png" alt="See pull request" /></p>
730725
</section>
731726
<section class="slide level2">
732727

733-
<h3 id="review-a-pull-request">Review a pull request</h3>
728+
<h3 id="review-your-pull-request-1">Review your pull request</h3>
734729
<ol type="1">
735730
<li>Review</li>
736731
<li>If OK, merge pull request</li>
@@ -744,8 +739,6 @@ <h3 id="update-local-master-after-remote-merge-command-line">Update local master
744739
git checkout master
745740
git merge --ff-only origin/master
746741
git branch -d analysis-script</code></pre>
747-
<p><strong>Tip for Linux users:</strong> Add an alias to your <code>.bash_aliases</code>:</p>
748-
<pre><code> alias gplfm=&quot;git fetch origin; git checkout master; git merge --ff-only origin/master&quot;&quot;</code></pre>
749742
<p><strong>Cfr. local merge</strong>: <code>git checkout master</code> and <code>git merge analysis-script</code></p>
750743
</section>
751744
<section class="slide level2">
@@ -808,17 +801,17 @@ <h3 id="invite-collaborators-1">Invite collaborators</h3>
808801

809802
<h3 id="collaboration-issues">Collaboration: issues</h3>
810803
<ul>
811-
<li>Raise an <code>issue</code> online</li>
804+
<li>Raise an <strong>issue</strong> online</li>
812805
<li>Provide issues with an appropriate label</li>
813-
<li>Assign your colleague to the <code>issue</code></li>
806+
<li>Assign your colleague to the issue</li>
814807
</ul>
815808
</section>
816809
<section class="slide level2">
817810

818811
<h3 id="collaboration-online-adaptations">Collaboration: online adaptations</h3>
819812
<ul>
820813
<li>Make an adaptation to an online file</li>
821-
<li>Propose a <code>pull request</code> and assign your collaborator</li>
814+
<li>Propose a <strong>pull request</strong> and assign your collaborator</li>
822815
<li>Merge the adaptation to the <code>master</code> branch</li>
823816
</ul>
824817
</section>
@@ -842,13 +835,13 @@ <h3 id="collaboration-local-adaptations">Collaboration: local adaptations</h3>
842835
<section class="slide level2">
843836

844837
<h3 id="release">Release</h3>
845-
<p>We are satisfied about outcome analysis. A release can be useful…</p>
838+
<p>Once you are satisfied with the status of your analysis, it makes sense to create a release:</p>
846839
<ul>
847-
<li>…for publications (DOI)</li>
848-
<li>…for code/software development</li>
849-
<li>…for course notes</li>
840+
<li>For publications (DOI)</li>
841+
<li>For code/software development versions</li>
842+
<li>For course notes</li>
850843
</ul>
851-
<p><a href="https://help.github.com/articles/creating-releases/">This tutorial</a> explains how to create a release.</p>
844+
<p>Follow <a href="https://help.github.com/articles/creating-releases/">this tutorial</a> to create a release.</p>
852845
</section>
853846
<section class="slide level2">
854847

source/manual-git.Rmd

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -273,12 +273,6 @@ git revert HEAD
273273
4. Check the local directory and files on your computer
274274
5. `git checkout master`
275275
276-
**Tip for Linux users:** Add an alias to your `.bash_aliases`:
277-
278-
```
279-
alias glog="git log --graph --pretty=format:'%C(bold)%h%Creset%C(magenta)%d%Creset %s %C(yellow)<%an> %C(cyan)(%cr)%Creset' --abbrev-commit --date=relative"
280-
```
281-
282276
---
283277
284278
### Create a branch to experiment
@@ -361,12 +355,6 @@ git merge --ff-only origin/master
361355
git branch -d analysis-script
362356
```
363357
364-
**Tip for Linux users:** Add an alias to your `.bash_aliases`:
365-
366-
```
367-
alias gplfm="git fetch origin; git checkout master; git merge --ff-only origin/master""
368-
```
369-
370358
**Cfr. local merge**: `git checkout master` and `git merge analysis-script`
371359
372360
---

0 commit comments

Comments
 (0)