-
Notifications
You must be signed in to change notification settings - Fork 26
/
commit.qmd
27 lines (14 loc) · 886 Bytes
/
commit.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
---
title: "Committing our change"
format: html
---
**All files need to be saved before being 'committable'**.
Now, click on the **git** tab in RStudio. You'll notice that there are two files listed -- our script, which has been modified, and our script too, which was added. Click on the staged box to stage the change to the first script.
![](./assets/git_changed.png)
Now click on **Diff** to give a summary of what's changed. Lines that have been added are green. Lines that have been removed are red. From git's point of view, a modification to a line is actually two operations: the removal of the original line followed by the creation of the new line.
![](./assets/git_diff.png)
Add a commit message and click on commit
![](./assets/git_commit_message2.png)
Now stage the second script, and commit it with a new message.
![](./assets/git_commit_message3.png)
***