-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7f38539
commit 120dd5a
Showing
69 changed files
with
1,472 additions
and
211 deletions.
There are no files selected for viewing
Binary file removed
BIN
-41.2 KB
_images/505dc3439ff23a82f7ca000c460a65da01c4d149b6b21d62759028ed97c62221.png
Binary file not shown.
Binary file added
BIN
+41.4 KB
_images/b71d534b68a82b6420374202c9ba0c416262361c88bff9184242a1fcc658d9b5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,272 @@ | ||
--- | ||
file_format: mystnb | ||
kernelspec: | ||
name: python3 | ||
--- | ||
|
||
+++{"lesson_part": "main"} | ||
|
||
# Wrap up | ||
|
||
+++{"lesson_part": "main"} | ||
|
||
## Announcements | ||
|
||
- there is a free practice badge available for April 11 | ||
- if you already have the grade you aimed to get, you will get an issue from me to get lab credit without attendance | ||
|
||
|
||
+++{"lesson_part": "main"} | ||
|
||
## Minimal Reproducible Example | ||
|
||
[stackoverflow guidelines](https://stackoverflow.com/help/minimal-reproducible-example) | ||
|
||
+++{"lesson_part": "main"} | ||
|
||
## Clearing Misconceptions | ||
|
||
|
||
### Commit Messages | ||
|
||
> if you use git commit without a message you have to quit that terminal and start over | ||
```{note} | ||
How can we show that this is not true? | ||
``` | ||
|
||
First we need to get to a path where we are in a git directory: | ||
```{code-cell} bash | ||
:tags: ["skip-execution"] | ||
ls | ||
``` | ||
|
||
+++{"lesson_part": "main","type":"output"} | ||
|
||
```{code-block} console | ||
ex sq_sum_threaded.c | ||
gh-inclass-sp24-brownsarahm sqsum | ||
hi.sh sqsum.dSYM | ||
kwl-sp24-brownsarahm sqsuml | ||
nand2tetris sqsuml.dSYM | ||
spring2024 test | ||
sq_sum_locked.c tiny-book | ||
``` | ||
|
||
+++{"lesson_part": "main"} | ||
we will use the `test repo`: | ||
|
||
```{code-cell} bash | ||
:tags: ["skip-execution"] | ||
cd test/ | ||
``` | ||
|
||
|
||
+++{"lesson_part": "main"} | ||
|
||
to be able to make a commit, we need edits, so lets make a new file: | ||
|
||
```{code-cell} bash | ||
:tags: ["skip-execution"] | ||
touch example.md | ||
``` | ||
|
||
|
||
+++{"lesson_part": "main"} | ||
and check it with git | ||
```{code-cell} bash | ||
:tags: ["skip-execution"] | ||
git status | ||
``` | ||
|
||
+++{"lesson_part": "main","type":"output"} | ||
|
||
```{code-block} console | ||
On branch main | ||
Changes not staged for commit: | ||
(use "git add <file>..." to update what will be committed) | ||
(use "git restore <file>..." to discard changes in working directory) | ||
modified: test.txt | ||
Untracked files: | ||
(use "git add <file>..." to include in what will be committed) | ||
example.md | ||
no changes added to commit (use "git add" and/or "git commit -a") | ||
``` | ||
|
||
+++{"lesson_part": "main"} | ||
To be able to make a commit, we have to stage something | ||
|
||
```{code-cell} bash | ||
:tags: ["skip-execution"] | ||
git add . | ||
``` | ||
|
||
+++{"lesson_part": "main","type":"output"} | ||
|
||
```{code-block} console | ||
``` | ||
|
||
+++{"lesson_part": "main"} | ||
|
||
```{code-cell} bash | ||
:tags: ["skip-execution"] | ||
git status | ||
``` | ||
|
||
+++{"lesson_part": "main","type":"output"} | ||
|
||
```{code-block} console | ||
On branch main | ||
Changes to be committed: | ||
(use "git restore --staged <file>..." to unstage) | ||
new file: example.md | ||
modified: test.txt | ||
``` | ||
|
||
Now that we have content staged, we can go on. | ||
|
||
+++{"lesson_part": "main"} | ||
|
||
We will commit now, without the `-m` option fo rthe message | ||
```{code-cell} bash | ||
:tags: ["skip-execution"] | ||
git commit | ||
``` | ||
|
||
+++{"lesson_part": "main"} | ||
|
||
then it opens vim for us, a partially outlined file for us to put the | ||
commit message it. | ||
|
||
Then we : | ||
- exit edit mode with {kbd}`esc` | ||
- then type `:wq: to save and quit | ||
|
||
|
||
|
||
+++{"lesson_part": "main","type":"output"} | ||
|
||
```{code-block} console | ||
[main 8fc580d] xample commit | ||
2 files changed, 1 insertion(+) | ||
create mode 100644 example.md | ||
``` | ||
|
||
Finally, we have our commit! | ||
|
||
|
||
+++{"lesson_part": "main"} | ||
|
||
### Git vs GitHub | ||
|
||
> git and GitHub are just synonyms, they refer to the same thing | ||
```{note} | ||
How can we show that this is not true? | ||
``` | ||
|
||
+++{"lesson_part": "main"} | ||
|
||
One thing we can to is make a repo with `git` that is not connected to GitHub. | ||
|
||
```{code-cell} bash | ||
:tags: ["skip-execution"] | ||
git init example | ||
``` | ||
|
||
+++{"lesson_part": "main","type":"output"} | ||
|
||
```{code-block} console | ||
hint: Using 'master' as the name for the initial branch. This default branch name | ||
hint: is subject to change. To configure the initial branch name to use in all | ||
hint: of your new repositories, which will suppress this warning, call: | ||
hint: | ||
hint: git config --global init.defaultBranch <name> | ||
hint: | ||
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and | ||
hint: 'development'. The just-created branch can be renamed via this command: | ||
hint: | ||
hint: git branch -m <name> | ||
Initialized empty Git repository in /Users/brownsarahm/Documents/inclass/systems/example/.git/ | ||
``` | ||
|
||
+++{"lesson_part": "main"} | ||
|
||
Then we can cd into the repo | ||
```{code-cell} bash | ||
:tags: ["skip-execution"] | ||
cd example/ | ||
``` | ||
|
||
|
||
|
||
+++{"lesson_part": "main"} | ||
|
||
we can see that it is a git repo | ||
|
||
```{code-cell} bash | ||
:tags: ["skip-execution"] | ||
git status | ||
``` | ||
|
||
+++{"lesson_part": "main","type":"output"} | ||
|
||
```{code-block} console | ||
On branch master | ||
No commits yet | ||
nothing to commit (create/copy files and use "git add" to track) | ||
``` | ||
|
||
+++{"lesson_part": "main"} | ||
but that it has no `remote`s | ||
|
||
```{code-cell} bash | ||
:tags: ["skip-execution"] | ||
git remote | ||
``` | ||
|
||
+++{"lesson_part": "main"} | ||
|
||
|
||
You could also show alternative git hosts, for example: | ||
- [bitbucket](https://bitbucket.org/product/guides/getting-started/overview#a-brief-overview-of-bitbucket) | ||
- [gitlab](https://about.gitlab.com/platform/) | ||
|
||
|
||
+++{"lesson_part": "main"} | ||
|
||
## Multiple Cursors | ||
|
||
we looked at the [VSCode Multiple Cursors feature](https://code.visualstudio.com/docs/editor/codebasics#_multiple-selections-multicursor) | ||
|
||
+++{"lesson_part": "site","type":"badges"} | ||
|
||
|
||
|
||
|
||
## Badges | ||
|
||
`````{tab-set} | ||
````{tab-item} Review | ||
```{include} ../_review/2024-04-25.md | ||
``` | ||
```` | ||
````{tab-item} Practice | ||
```{include} ../_practice/2024-04-25.md | ||
``` | ||
```` | ||
````` | ||
|
||
|
||
|
||
## Experience Report Evidence | ||
|
||
## Questions After Today's Class |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.