Skip to content

Commit ef17f79

Browse files
committed
link windows page and add crlf to notes
1 parent ca92907 commit ef17f79

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

_toc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ parts:
4545
- file: resources/gettinghelp
4646
- file: resources/organization
4747
- file: resources/more_info_on_cpus
48+
- file: resources/windows
4849
- url: https://introcompsys.github.io/spring2022/resources/testimonials.html
4950
title: Advice from Spring 2022 Students
5051
# - file: letters/index

notes/2023-02-16.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ git status
112112
fatal: not a git repository (or any of the parent directories): .git
113113
```
114114

115+
## Why Documentation
115116

116117
Today we will talk about documentation, there are several reasons this is important:
117118
- **using** official documentation is the best way to get better at the tools
@@ -188,7 +189,7 @@ Your book template can be found at
188189
189190
```
190191

191-
192+
You can make it with any name:
192193
```
193194
jupyter-book create example
194195
```
@@ -209,7 +210,7 @@ Your book template can be found at
209210
```
210211
ls
211212
```
212-
213+
Each one makes a directory
213214
```
214215
example tiny-book
215216
github-in-class-brownsarahm-1
@@ -322,6 +323,27 @@ git commit -m 'init jupyterbook'
322323
create mode 100644 requirements.txt
323324
```
324325

326+
````{margin}
327+
```{note} CRLF Warning
328+
329+
This is GitBash telling you that git is helping. Windows uses two characters for a new line `CR` (cariage return) and `LF` (line feed).
330+
Classic Mac Operating system used the `CR` character. Unix-like systems (including MacOS X) use only the `LF` character.
331+
If you try to open a file on Windows that has only `LF` characters, Windows will think it's all one line. To help you,
332+
since git knows people collaborate across file systems, when you check out files from the git database (`.git/` directory)
333+
git replaces `LF` characters with `CRLF` before updating your working directory.
334+
335+
When working on Windows, when you make a file locally, each new line will have `CRLF` in it. If your collaborator
336+
(or server, eg GitHub) runs not a unix or linux based operating system (it almost certainly does) these extra
337+
characters will make a mess and make the system interpret your code wrong. To help you out,
338+
git will automatically, for Windows users, convert `CRLF` to `LF` when it adds
339+
your work to the index (staging area). Then when you push, it's the compatible version.
340+
341+
[git documentation of the feature](https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration#Formatting-and-Whitespace)
342+
this is added to a [new Windows page under resources](../resources/windows.md)
343+
```
344+
````
345+
346+
325347

326348
```
327349
git commit --help

0 commit comments

Comments
 (0)