Skip to content

Commit 532a672

Browse files
Merge pull request #59 from kir-rescomp/dev
fix typo on mkdir as directory name was wrong
2 parents bf8451f + 0ca3b42 commit 532a672

File tree

2 files changed

+104
-64
lines changed

2 files changed

+104
-64
lines changed

docs/4.git_model_commands.md

Lines changed: 53 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ They begin their project as they would a new experiment — setting up a clean w
2222
!!! terminal ""
2323

2424
```bash
25-
mkdir CellCulsterFlow
25+
mkdir CellClusterFlow
2626
cd CellClusterFlow
2727
```
2828

@@ -58,13 +58,14 @@ The `git init` command created a hidden `.git` directory — the heart of your r
5858
.git/
5959
├── HEAD # Points to current branch
6060
├── config # Repository settings
61-
├── description # Repository description
61+
├── description # Repository description (rarely used)
62+
├── branches/ # (deprecated, legacy Git)
6263
├── hooks/ # Scripts triggered by Git events
64+
├── info/ # Additional repository information (excludes, attributes)
6365
├── objects/ # Database of all file versions (commits, trees, blobs)
64-
├── refs/ # Pointers to commits (branches, tags)
65-
│ ├── heads/ # Local branches
66-
│ └── tags/ # Version tags
67-
└── index # Staging area (will be created on first 'git add')
66+
└── refs/ # Pointers to commits (branches, tags)
67+
├── heads/ # Local branches
68+
└── tags/ # Version tags
6869
```
6970

7071
!!! warning "Never delete `.git`!"
@@ -132,9 +133,27 @@ Just like checking which samples are unprocessed, they inspects their project’
132133
```bash
133134
git status
134135
```
136+
137+
??? success "Output"
138+
139+
```bash
140+
On branch main
141+
142+
No commits yet
135143

144+
Untracked files:
145+
(use "git add <file>..." to include in what will be committed)
146+
LICENSE
147+
README.md
148+
clustering.R
149+
data_preprocessing.py
150+
qc_filtering.py
151+
visualization.ipynb
152+
153+
nothing added to commit but untracked files present (use "git add" to track)
154+
```
136155
Git reports untracked files — nothing is committed yet.
137-
This command becomes a habit; they run it before almost every operation.
156+
This command should become a habit; they run it before almost every operation.
138157

139158
```mermaid
140159
flowchart LR
@@ -165,27 +184,41 @@ Only staged files will be committed.
165184

166185
They capture their first snapshot.
167186

168-
```bash
169-
git commit -m "Initial commit: basic pipeline structure"
170-
```
187+
!!! terminal ""
188+
```bash
189+
git commit -m "Initial commit: basic pipeline structure"
190+
```
171191

172-
This is their first “frozen sample” — They can always revert to it later.
192+
??? success "Output"
173193

174-
<center>
175-
```mermaid
176-
%%{init: {'theme':'base'}}%%
177-
gitGraph
178-
commit id: "Initial commit"
179-
```
180-
</center>
194+
```bash
195+
[main (root-commit) 40eb049] Initial commit: basic pipeline structure
196+
6 files changed, 0 insertions(+), 0 deletions(-)
197+
create mode 100644 LICENSE
198+
create mode 100644 README.md
199+
create mode 100644 clustering.R
200+
create mode 100644 data_preprocessing.py
201+
create mode 100644 qc_filtering.py
202+
create mode 100644 visualization.ipynb
203+
```
204+
205+
This is their first “frozen sample” — They can always revert to it later.
206+
207+
<center>
208+
```mermaid
209+
%%{init: {'theme':'base'}}%%
210+
gitGraph
211+
commit id: "Initial commit"
212+
```
213+
</center>
181214

182215
### 5. `git branch` — Designing new experiments
183216

184217
To test a new normalization method, they create a new branch — a safe environment to experiment without contaminating their main results.
185218

186219
```bash
187-
git branch normalization
188-
git checkout normalization
220+
git branch normalisation
221+
git checkout normalisation
189222
```
190223

191224
Branches in Git are like running parallel experiments in separate tubes.
@@ -244,50 +277,7 @@ gitGraph
244277
```
245278
</center>
246279

247-
### 8. `git fetch` — Getting updates from collaborators
248-
249-
Their collaborator Dr. Y pushes changes to **qc_filtering.py** on the shared repository.
250-
Before pulling them in, they fetches to see what’s changed.
251-
252-
```bash
253-
git fetch origin
254-
```
255-
256-
257-
Fetching updates to their remote tracking branches (like checking a shared Google Sheet without overwriting your own copy).
258-
259-
<center>
260-
```mermaid
261-
%%{init: {'theme': 'base'}}%%
262-
gitGraph
263-
commit id: "A"
264-
commit id: "B" tag: "origin/main"
265-
```
266-
</center>
267-
268-
### 9. `git pull` — Syncing the latest version
269-
270-
Now they merge Dr.Y's updates into their local repository.
271280

272-
```bash
273-
git pull origin main
274-
```
275-
276-
This performs a `fetch` + `merge`.
277-
Their local branch is now aligned with the shared main.
278-
279-
<center>
280-
```mermaid
281-
%%{init: {'theme': 'base'}}%%
282-
gitGraph
283-
commit id: "A"
284-
commit id: "B"
285-
branch feature
286-
commit id: "C"
287-
checkout main
288-
merge feature
289-
```
290-
</center>
291281

292282
### 10. `git checkout` — Switching branches
293283

docs/5.from_git_to_github.md

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,4 +336,54 @@ Now that Dr. X's pipeline is on GitHub:
336336
---
337337

338338
!!! quote "Remember"
339-
"Science is not a solo sport. Git tracks your journey; GitHub shares it with the world." 🚀
339+
"Science is not a solo sport. Git tracks your journey; GitHub shares it with the world." 🚀
340+
341+
342+
343+
344+
## Draft material
345+
346+
### 8. `git fetch` — Getting updates from collaborators
347+
348+
Their collaborator Dr. Y pushes changes to **qc_filtering.py** on the shared repository.
349+
Before pulling them in, they fetches to see what’s changed.
350+
351+
```bash
352+
git fetch origin
353+
```
354+
355+
356+
Fetching updates to their remote tracking branches (like checking a shared Google Sheet without overwriting your own copy).
357+
358+
<center>
359+
```mermaid
360+
%%{init: {'theme': 'base'}}%%
361+
gitGraph
362+
commit id: "A"
363+
commit id: "B" tag: "origin/main"
364+
```
365+
</center>
366+
367+
### 9. `git pull` — Syncing the latest version
368+
369+
Now they merge Dr.Y's updates into their local repository.
370+
371+
```bash
372+
git pull origin main
373+
```
374+
375+
This performs a `fetch` + `merge`.
376+
Their local branch is now aligned with the shared main.
377+
378+
<center>
379+
```mermaid
380+
%%{init: {'theme': 'base'}}%%
381+
gitGraph
382+
commit id: "A"
383+
commit id: "B"
384+
branch feature
385+
commit id: "C"
386+
checkout main
387+
merge feature
388+
```
389+
</center>

0 commit comments

Comments
 (0)