Skip to content

Commit ce07424

Browse files
committed
add files in a directory and amend previous commit
1 parent 8ff9e93 commit ce07424

8 files changed

Lines changed: 27 additions & 10 deletions

docs/manual-git-rstudio.html

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -688,16 +688,26 @@ <h3 id="add-a-file">Add a file</h3>
688688
<li>Add a <code>fruits.csv</code> file in a <code>/data</code> directory</li>
689689
<li>Link to this file in the <code>README.md</code></li>
690690
</ol>
691+
<p><img src="manual-git/add-file-rstudio1.png" alt="Add a file" /></p>
691692
</section>
692693
<section class="slide level2">
693694

694-
<h3 id="add-a-file-1">Add a file</h3>
695-
<p>TODO-Thierry: update fig to rstudio <img src="manual-git/add-file.png" alt="Add a file" /></p>
695+
<h3 id="add-a-file-within-a-directory">Add a file within a directory</h3>
696+
<ul>
697+
<li>Staging a new directory will stage all files in the directory</li>
698+
<li>You can’t stage empty directories</li>
699+
</ul>
700+
<p><img src="manual-git/add-file-rstudio2.png" alt="Add a file" /></p>
696701
</section>
697702
<section class="slide level2">
698703

699-
<h3 id="undo-or-adapt-last-commit">Undo or adapt last commit</h3>
700-
<p>TODO-Thierry: update fig to rstudio (or cmd-version?) <img src="manual-git/undo.png" alt="Undo" /></p>
704+
<h3 id="adapt-last-commit">Adapt last commit</h3>
705+
<ul>
706+
<li><strong>Warning:</strong> don’t do this on commits that have been pushed. That would result in conflicts.</li>
707+
<li>Make a change in <code>fruits.csv</code></li>
708+
<li><code>Commit</code> as usual but <strong>check</strong> <code>amend previous commit</code> under the commit message box</li>
709+
</ul>
710+
<p><img src="manual-git/amend-commit-rstudio.png" alt="Add a file" style="width:60.0%" /></p>
701711
</section>
702712
<section class="slide level2">
703713

19.2 KB
Loading
19.5 KB
Loading
70.2 KB
Loading

source/manual-git-rstudio.Rmd

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -257,19 +257,26 @@ Try to push (click `push`) your local changes
257257
1. Add a `fruits.csv` file in a `/data` directory
258258
2. Link to this file in the `README.md`
259259

260+
![Add a file](manual-git/add-file-rstudio1.png)
261+
260262
---
261263

262-
### Add a file
264+
### Add a file within a directory
263265

264-
TODO-Thierry: update fig to rstudio
265-
![Add a file](manual-git/add-file.png)
266+
- Staging a new directory will stage all files in the directory
267+
- You can't stage empty directories
268+
269+
![Add a file](manual-git/add-file-rstudio2.png)
266270

267271
---
268272

269-
### Undo or adapt last commit
273+
### Adapt last commit
274+
275+
- **Warning:** don't do this on commits that have been pushed. That would result in conflicts.
276+
- Make a change in `fruits.csv`
277+
- `Commit` as usual but **check** `amend previous commit` under the commit message box
270278

271-
TODO-Thierry: update fig to rstudio (or cmd-version?)
272-
![Undo](manual-git/undo.png)
279+
![Add a file](manual-git/amend-commit-rstudio.png){width=60%}
273280

274281
---
275282

19.2 KB
Loading
19.5 KB
Loading
70.2 KB
Loading

0 commit comments

Comments
 (0)