-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path4.2-final_notes.qmd
89 lines (65 loc) · 3.51 KB
/
4.2-final_notes.qmd
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
---
title: "Intro to `git`"
subtitle: "Block 4.2: Final Bits"
---
## Contributing to Open-Source
- Don't be scared to make your own work public
- If you see a project on GitHub you want to contribute to, just comment on an issue
- People are often happy about contributions
- It can be a lot of work to maintain a busy project though, so also expect that
- There are also events like: [Hacktoberfest](https://hacktoberfest.com/)
## Licenses
- Repositories often have a LICENSE file at their root
- This indiciates the LICENSE the code is under and how you are allowed to use it
- If you make your own code / repository public, make sure to pick a proper license
- To help you pick a license: https://choosealicense.com/
## Making your Repository Citeable
- You can assign a doi (digital object identifier) to your repository using [Zenodo](https://zenodo.org/about)
- Steps are outlined in this [guide](https://docs.github.com/en/repositories/archiving-a-github-repository/referencing-and-citing-content)
- You can also add an official `CITATION` file, so people know how to cite the repository
- Steps are outlined in this [guide](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-citation-files)
## Advanced Github
- You can easily start an in-browser version of VSCode on github
- Just change URL from <https://github.com> to <https://github.dev>
- Or press the `.` key, inside a repository
- You can automatically run code via [GitHub Actions](https://github.com/features/actions)
- You can get all sorts of goodies via the [GitHub Student Pack](https://education.github.com/pack)
## Advanced Github: Pages
- One of the coolest features of GitHub is that you can host your own website there for free
- This service is called GitHub Pages
- You can create websites for specific projects (i.e. repositories)
- \<your_gh_username\>.github.io/\<your_repo_name\>
- Special repository name: \<your_gh_username\>.github.io
- To create a personal website
## Final Summary
- Initialize a repository with `git init`
- Stage your files with `git add`
- Whenever you made a substantial change, put it into the history with `git commit`
- See your history with `git log`
- Move around (history and branches!) with `git checkout`
- Create new branches with `git checkout -b`
- To collaborate, first `git pull` others changes, then `git push` yours
# Going Beyond
## Guides to Re-Visit
Most of the information in these guides, we already covered, but they can be great if you want to re-visit anything.
- https://learngitbranching.js.org/
- https://github.com/git-guides
- [Introduction to RStudio Git & GitHub](https://lmu-osc.github.io/Introduction-RStudio-Git-GitHub/)
- [The Carpentries: Version Control with Git](https://swcarpentry.github.io/git-novice/)
- https://gitimmersion.com
## Git Game
[![](images/screenshots/ohmygit.png)](https://ohmygit.org/)
## Further Reading
- Popular Workflow: [Trunk Based Development](https://www.atlassian.com/continuous-delivery/continuous-integration/trunk-based-development)
- Using git with data
- [git lfs](https://git-lfs.github.com/)
- [dvc](https://dvc.org/): Data Version Control
- If you have a problem
- [ohshitgit.com](https://ohshitgit.com/) [(🇩🇪)](https://ohshitgit.com/de)
- Google
## *End of Block* 🎉 {background-color="black" background-opacity="0.4" background-image="images/backgrounds/dolomites.jpg"}
:::{.r-fit-text}
Any Questions?
:::
[[🏡 Back to Overview]](./index.html)
[[⏩️ Next Block]](./5.0-outro.html)