Skip to content

Commit

Permalink
add git as a cli
Browse files Browse the repository at this point in the history
  • Loading branch information
ahasverus committed Apr 22, 2024
1 parent 207b781 commit 568c346
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 16 deletions.
Binary file added img/git-cli.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 12 additions & 8 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,14 @@ <h2>A word of warning</h2>
</blockquote>
</div>
</section>
<section id="git-as-a-cli" class="slide level2">
<h2>git as a CLI</h2>
<div class="quarto-figure quarto-figure-center">
<figure>
<p><img data-src="img/git-cli.png" class="quarto-figure quarto-figure-center" style="width:60.0%"></p>
</figure>
</div>
</section>
<section id="rstudio-and-git" class="slide level2">
<h2>RStudio and git</h2>
<div class="columns">
Expand Down Expand Up @@ -783,7 +791,6 @@ <h2>The <code>.gitignore</code></h2>
<ul>
<li>passwords, tokens and other secrets</li>
<li>temporary files</li>
<li>build files</li>
<li>large files</li>
</ul>
</div><div class="column" style="width:50%;">
Expand Down Expand Up @@ -858,10 +865,7 @@ <h2>Commits</h2>
</div><div class="column" style="width:50%;">
<p>A commit message has a title line, and an optional body</p>
<div class="sourceCode" id="cb12"><pre class="sourceCode numberSource bash number-lines code-with-copy"><code class="sourceCode bash"><span id="cb12-1"><a href=""></a><span class="co"># Commit message w/ title</span></span>
<span id="cb12-2"><a href=""></a><span class="fu">git</span> commit <span class="at">-m</span> <span class="st">"title"</span></span>
<span id="cb12-3"><a href=""></a></span>
<span id="cb12-4"><a href=""></a><span class="co"># Commit message w/ title and body (optional)</span></span>
<span id="cb12-5"><a href=""></a><span class="fu">git</span> commit <span class="at">-m</span> <span class="st">"title"</span> <span class="at">-m</span> <span class="st">"body"</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb12-2"><a href=""></a><span class="fu">git</span> commit <span class="at">-m</span> <span class="st">"title"</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<p><br></p>
<p><strong>What is a good commit message?</strong></p>
<p>A good commit title:</p>
Expand Down Expand Up @@ -895,9 +899,9 @@ <h2>When should you commit?</h2>
</div><div class="column" style="width:50%;">
<p><br></p>
<ul>
<li>Commit a new version when you reach a milestone</li>
<li>Create small and atomic commits</li>
<li>Commit a state that is actually working</li>
<li>Commit a new version when you reach a <strong>milestone</strong></li>
<li>Create <strong>small</strong> and atomic commits</li>
<li>Commit a state that is actually <strong>working</strong></li>
</ul>
</div>
</div>
Expand Down
5 changes: 5 additions & 0 deletions slides/introduction.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ In other words:
> You do not need `GitHub` to use `git` but you cannot use `GitHub` without using `git`

## git as a CLI

![](img/git-cli.png){fig-align="center" width=60%}



## RStudio and git

Expand Down
11 changes: 3 additions & 8 deletions slides/using-git.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ Which files? For instance:

- passwords, tokens and other secrets
- temporary files
- build files
- large files

:::
Expand Down Expand Up @@ -361,10 +360,6 @@ A commit message has a title line, and an optional body
```bash
# Commit message w/ title
git commit -m "title"

# Commit message w/ title and body (optional)
git commit -m "title" -m "body"

```


Expand Down Expand Up @@ -410,9 +405,9 @@ An **optional body** can be added to provide **detailed information** and to lin
:::{.column width=50%}
<br>

- Commit a new version when you reach a milestone
- Create small and atomic commits
- Commit a state that is actually working
- Commit a new version when you reach a **milestone**
- Create **small** and atomic commits
- Commit a state that is actually **working**
:::
::::

Expand Down

0 comments on commit 568c346

Please sign in to comment.