9 March 2026
Required
Files can be in one of four states:
Files can be in one of four states:
Files can be in one of four states:
Files can be in one of four states:
This is a once off action (per machine)
Or within R (via the usethis package)
OR via the gert package
Create a file (text, code etc)
Otherwise, create any kind of file (in the folder we just created)
Stage the changes (add)
For example:
Examples
.RData all files ending in .RData.pdf all files ending in .pdfdata/ the entire folder called data[main (root-commit) 689983b] Initial commit
1 file changed, 3 insertions(+)
create mode 100644 analysis.R
fatal: detected dubious ownership in repository at '/home/runner/work/SUYRs_documents/SUYRs_documents'
To add an exception for this directory, call:
git config --global --add safe.directory /home/runner/work/SUYRs_documents/SUYRs_documents
[main d217057] Added summary for x
1 file changed, 1 insertion(+)
analysis.R
summary.R
[main e923daa] Added summaries for x and y
2 files changed, 5 insertions(+), 4 deletions(-)
create mode 100644 summary.R
* e923daa (HEAD -> main) Added summaries for x and y
* d217057 Added summary for x
* 689983b Initial commit
commit author
1 e923daa3012f1bdd4799f3d549760bf12eea5198 pcinereus <i.obesulus@gmdail.com>
2 d2170577259652a51f225653b82643a85f7606c4 pcinereus <i.obesulus@gmdail.com>
3 689983b97b161ea6c7f11efa56b71e95fab92630 pcinereus <i.obesulus@gmdail.com>
time files merge message
1 2026-03-09 10:24:27 2 FALSE Added summaries for x and y\n
2 2026-03-09 10:24:27 1 FALSE Added summary for x\n
3 2026-03-09 10:24:26 1 FALSE Initial commit\n
A listing (data.frame) of tracked files
For example:
checkout
reset
revert
# is a commit or tag name
Restore the HEAD to the tip of main
R/Rstudio
# is a commit or tag name
Restore HEAD to the tag V.1
[main a324db0] Revert "Added summaries for x and y"
Date: Mon Mar 9 10:24:33 2026 +0000
2 files changed, 4 insertions(+), 5 deletions(-)
delete mode 100644 summary.R
For example
We are on the new branch
Otherwise, create any kind of file (in the folder we just created)
For example:
We are on the main branch
Otherwise, create any kind of file
For example:
diff --git a/analysis.R b/analysis.R
index 2318425..668a9b6 100644
--- a/analysis.R
+++ b/analysis.R
@@ -2,3 +2,4 @@ x=seq(1, 10, len = 1)
y=40 * 2 + rnorm(10, 0, 5)
plot(x, y)
summary(x)
+mean(x)
diff --git a/test.R b/test.R
deleted file mode 100644
index 0242716..0000000
--- a/test.R
+++ /dev/null
@@ -1 +0,0 @@
-mean(c(1,2,3))
For example:
Merge made by the 'ort' strategy.
analysis.R | 1 +
1 file changed, 1 insertion(+)
From exising git and Rstudio project
If not using use_github()…
If not using use_github()…
Lets make a small change to one of the files..
Otherwise, create any kind of file
Before making any changes that you intend to push, it is advisable that you pull to get the latest from the remote
https://pcinereus.github.io/SUYRs_documents/003_data_wrangling.qmd