-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.quarto_ipynb
127 lines (127 loc) · 3.99 KB
/
index.quarto_ipynb
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
"title: \"Basic Version Control with `Git`\"\n",
"author: \"Ray Yang\"\n",
"format: revealjs\n",
"---\n",
"\n",
"\n",
"## What is version control\n",
"\n",
"Version control (also known as revision control, source control, and source code management) is the software engineering practice of controlling computer files and versions of files; primarily source code text files, but generally any type of file. ^[<https://en.wikipedia.org/wiki/Version_control>]\n",
"\n",
". . .\n",
"\n",
"- it's a concept, and `Git` is a software\n",
"- and [GitHub](https://github.com/) is a platform/host/server...\n",
"\n",
"## What is `Git`\n",
"\n",
"- it's a software\n",
"- it's free and open source\n",
"- it's the *de facto* standard version control system but there are many more (both open and proprietary)\n",
"- it's independent of network access or a central server\n",
"\n",
"\n",
"## What is [GitHub](https://github.com/)?\n",
"\n",
"- it's a platform/host/server...\n",
"- it's free but **NOT** open source\n",
"- it's owned by Microsoft since 2018\n",
"- there are many others, e.g., [Bitbucket](https://bitbucket.org/product), [GitLab](https://about.gitlab.com)\n",
"\n",
"## The components\n",
"\n",
"There are the local parts and the server part. Typically, \n",
"\n",
"::: {#fig-2}\n",
"\n",
"```{dots}\n",
"digraph {\n",
" rankdir=LR;\n",
" edge [ style=dashed ];\n",
"\n",
" // node [ fontname=\"Handlee\" ];\n",
" subgraph cluster_frontend {\n",
" label=\"Your Laptop\";\n",
" \"local files\" ->\"staging area\" -> \"local repo\";\n",
" }\n",
" \n",
" subgraph cluster_backend {\n",
" \n",
" label=\"The Internet (origin/remote)\";\n",
" \"online repo\";\n",
" }\n",
"\n",
" \"local repo\" -> \"online repo\";\n",
" \n",
"}\n",
"```\n",
"\n",
":::\n",
"\n",
"::: {#fig-simple}\n",
"\n",
"```{dot}\n",
"digraph {\n",
" rankdir=LR;\n",
" edge [ style=dashed ];\n",
"\n",
" // node [ fontname=\"Handlee\" ];\n",
" subgraph cluster_frontend {\n",
" label=\"Your Laptop\";\n",
" \"local files\" ->\"staging area\" -> \"local repo\";\n",
" }\n",
" \n",
" subgraph cluster_backend {\n",
" \n",
" label=\"The Internet (origin/remote)\";\n",
" \"online repo\";\n",
" }\n",
"\n",
" \"local repo\" -> \"online repo\";\n",
" \n",
"}\n",
"```\n",
"\n",
"\n",
":::\n",
"\n",
"## Some key commands\n",
"\n",
"- `git add`: to stage the changes\n",
"```bash\n",
"git add <file_name>\n",
"```\n",
"several options:\n",
"```bash\n",
"git add -A # stage all changes: new, modified and deleted files\n",
"git add . # stage new and modified files\n",
"git add -u # stage modified and deleted files\n",
"```\n",
"\n",
"## Some key commands\n",
"- `git commit`: to commit the changes staged with `git add`\n",
"```bash\n",
"git commit -m \"some text for the commit message\"\n",
"```"
],
"id": "8bd8a7d5"
}
],
"metadata": {
"kernelspec": {
"name": "python3",
"language": "python",
"display_name": "Python 3 (ipykernel)",
"path": "/Users/myang/miniforge3/share/jupyter/kernels/python3"
}
},
"nbformat": 4,
"nbformat_minor": 5
}