Skip to content

Commit 327db15

Browse files
committed
create logical commits
1 parent 90af6ae commit 327db15

4 files changed

Lines changed: 35 additions & 6 deletions

File tree

docs/manual-git-rstudio.html

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -620,12 +620,31 @@ <h3 id="create-logical-commits">Create logical commits</h3>
620620
<section class="slide level2">
621621

622622
<h3 id="create-logical-commits-1">Create logical commits</h3>
623-
<p>TODO-Thierry: update fig to rstudio <img src="manual-git/logical-commit-1.png" alt="Logical commit 1" /></p>
623+
<ol type="1">
624+
<li>Click <code>Commit</code> in the <code>git</code> pane</li>
625+
<li>Select the changes you can to commit and click <code>stage selection</code></li>
626+
<li>Add a <code>commit message</code> and click <code>Commit</code></li>
627+
</ol>
628+
<p><img src="manual-git/logical-commit-rstudio.png" alt="Logical commit 1" style="width:80.0%" /></p>
624629
</section>
625630
<section class="slide level2">
626631

627632
<h3 id="create-logical-commits-2">Create logical commits</h3>
628-
<p>TODO-Thierry: update fig to rstudio <img src="manual-git/logical-commit-2.png" alt="Logical commit 2" /></p>
633+
<ul>
634+
<li><code>stage xyz</code>: add the xyz from the commit</li>
635+
<li><code>unstage xyz</code>: remove the xyz from the commit</li>
636+
<li><code>discard xyz</code>: revert the changes in the xyz (can’t be undone!!!)</li>
637+
<li><code>xyz</code> can be
638+
<ul>
639+
<li>a single <code>line</code></li>
640+
<li>a <code>selection</code> of lines</li>
641+
<li>a <code>chunk</code>
642+
<ul>
643+
<li>RStudio will automatically split the changes in chunks</li>
644+
<li>chunks are defined by 10 unchanged lines between changes</li>
645+
</ul></li>
646+
</ul></li>
647+
</ul>
629648
</section>
630649
<section class="slide level2">
631650

66.5 KB
Loading

source/manual-git-rstudio.Rmd

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,15 +187,25 @@ _TODO Stijn: how to set username and email?_
187187

188188
### Create logical commits
189189

190-
TODO-Thierry: update fig to rstudio
191-
![Logical commit 1](manual-git/logical-commit-1.png)
190+
1. Click `Commit` in the `git` pane
191+
1. Select the changes you can to commit and click `stage selection`
192+
1. Add a `commit message` and click `Commit`
193+
194+
![Logical commit 1](manual-git/logical-commit-rstudio.png){width=80%}
192195

193196
---
194197

195198
### Create logical commits
196199

197-
TODO-Thierry: update fig to rstudio
198-
![Logical commit 2](manual-git/logical-commit-2.png)
200+
- `stage xyz`: add the xyz from the commit
201+
- `unstage xyz`: remove the xyz from the commit
202+
- `discard xyz`: revert the changes in the xyz (can't be undone!!!)
203+
- `xyz` can be
204+
- a single `line`
205+
- a `selection` of lines
206+
- a `chunk`
207+
- RStudio will automatically split the changes in chunks
208+
- chunks are defined by 10 unchanged lines between changes
199209

200210
---
201211

66.5 KB
Loading

0 commit comments

Comments
 (0)