# start new repo and set remotegit initgit remote add origin <url># or copy an existing remotegit clone <url>
Git – Local and Remote
mermaid`%%{init: {'theme': 'base', 'themeVariables': {'fontFamily': 'Century Gothic', 'fontSize': '15px', 'clusterBkg': 'transparent', 'clusterBorder': '#000000'}, 'flowchart': {'nodeSpacing': 30, 'rankSpacing': 45, 'padding': 20, 'diagramPadding': 30}}}%%flowchart LR subgraph Local["Your Machine"] A["Working<br>Directory"] B[["Staging<br>Area"]] C[("Local<br>Repository")] end subgraph Colleague["Colleague's Machine"] E[("Local<br>Repository")] end subgraph Remote["Hosted Platform"] D[("Remote<br>Repository")] end A -->|"📝<br>git add"| B B -->|"📦<br>git commit"| C C <-->|"🚀 git push<br>⬇️ git pull"| D E <-->|"🚀 git push<br>⬇️ git pull"| D style Local fill:#e52320,color:#fff style Colleague fill:#2d8659,color:#fff style Remote fill:#9C6B91,color:#fff style A fill:#f5f5f5,stroke:#000,color:#000 style B fill:#f5f5f5,stroke:#000,color:#000 style C fill:#f5f5f5,stroke:#000,color:#000 style D fill:#f5f5f5,stroke:#000,color:#000 style E fill:#f5f5f5,stroke:#000,color:#000`
Stage and commit locally, push to remote
Every repo holds the full history
Pull before you start working, push when you are done
.gitignore keeps credentials and large data out
# stage and commit your changesgit add .git commit -m"describe changes here"# send them off, and get the latestgit pushgit pull
*italic text* and **bold text**[Link to WU](https://www.wu.ac.at){.example-link}`inline code` and code blocks{width=60 fig-align="left"}
The data has ˋr nrow(plot_data)ˋ rows and ˋr ncol(plot_data)ˋ columns. The total number of cases is ˋr sum(plot_data$cases)ˋ cm.
The data has 280 rows and 4 columns. The total number of cases is 1177 cases.
Same with OJS code
The data has ˋ{ojs} plot_data.lengthˋ rows and ˋ{ojs} Object.keys(plot_data[0]).lengthˋ columns.The total number of cases is ˋ{ojs} plot_data.reduce((sum, d) => sum + d.cases, 0)ˋ cases.
The data has rows and columns. The total number of cases is cases.
Interactivity II
It gets funkier with the Quarto and the Observable runtime and standard library
viewof text = Inputs.text({label:"Special information: ",placeholder:"Type in info!" })viewof color = Inputs.radio( ["#336699","#e52320","#9C6B91"], {label:"Color"} )htl.html`<p> Here is some special information: <span style="color:${color}">${text} </span></p>`
viewof text = Inputs.text({label:"Special information: ",placeholder:"Type in info!" })viewof color = Inputs.radio( ["#336699","#e52320","#9C6B91"], {label:"Color"} )htl.html`<p> Here is some special information: <span style="color:${color}">${text} </span></p>`
Interactivity III
It gets even funkier with Observable and some data viz
# installed into _extensions/ of the projectquarto add qmd-lab/closereadquarto add r-wasm/quarto-live# these slides use one alreadyquarto add shafayetShafee/reveal-header