Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions .github/workflows/check_jupyterbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly.
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2
- name: Setup uv
uses: astral-sh/setup-uv@v6
with:
activate-environment: jb-git-tutorial
environment-file: environment.yml
python-version: 3.7
auto-activate-base: false
python-version: 3.13
enable-cache: true

- name: Build # Build Jupyter Book
shell: bash -l {0}
run: |
jb build ./book
- name: Sync dependencies
run: uv sync

- name: Build book
run: make book
24 changes: 11 additions & 13 deletions .github/workflows/deploy_jupyterbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,25 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly.
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2
- name: Setup uv
uses: astral-sh/setup-uv@v6
with:
activate-environment: jb-git-tutorial
environment-file: environment.yml
python-version: 3.7
auto-activate-base: false
python-version: 3.13
enable-cache: true

- name: Build # Build Jupyter Book
shell: bash -l {0}
run: |
cd book
jb build .
- name: Sync dependencies
run: uv sync

- name: Build book
run: make book

- name: Deploy
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: book/_build/html # The folder the action should deploy.
FOLDER: book/_build/site # The folder the action should deploy.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ profile_default/
ipython_config.py

# Jupyter Book files
_build/
*/_build/

# Other files that I don't remember why we have
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.PHONY: book

book:
cd book && uv run jupyter book clean --all --yes && uv run jupyter book build --all
35 changes: 12 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,37 @@
[![PSL incubating](https://img.shields.io/badge/PSL-incubating-ff69b4.svg)](https://www.PSLmodels.org)

# <img src="https://raw.githubusercontent.com/PSLmodels/Git-Tutorial/master/book/_static/logo/jb_git_tutorial_logo.png" width=40 /> Git and GitHub Use, Collaboration, and Workflow (*IN PROGRESS*)
This repository houses the source code and content files for the open access, *Git and GitHub Use, Collaboration, and Workflow* book tutorial and training that many contributors to the [PSLmodels](https://github.com/PSLmodels) community use. This project uses [Jupyter Book](https://jupyterbook.org/intro.html) 0.7.3 to create the HTML and Jupyter notebook forms of the tutorial. This public GitHub repository hosts all the source code for the book, and the compiled Jupyter book is available at the GitHub page for this repository [https://pslmodels.github.io/Git-Tutorial](https://pslmodels.github.io/Git-Tutorial), up to the most recent commit to the master branch. We hope to add tutorial videos at some point in the future. This project is maintained by [Richard W. Evans](https://sites.google.com/site/rickecon/) and [Jason DeBacker](https://www.jasondebacker.com/).
# <img src="https://raw.githubusercontent.com/PSLmodels/Git-Tutorial/master/book/_static/logo/jb_git_tutorial_logo.png" width=40 /> Git and GitHub Use, Collaboration, and Workflow
This repository houses the source code and content files for the open access, *Git and GitHub Use, Collaboration, and Workflow* book tutorial and training used by many contributors in the [PSLmodels](https://github.com/PSLmodels) community. This project uses [Jupyter Book](https://jupyterbook.org/intro.html) and MyST to create the published HTML version of the tutorial. The source lives in this GitHub repository, and the compiled book is available at [https://pslmodels.github.io/Git-Tutorial](https://pslmodels.github.io/Git-Tutorial). This project is maintained by [Richard W. Evans](https://sites.google.com/site/rickecon/) and [Jason DeBacker](https://www.jasondebacker.com/).


## Contributing to the book

We welcome contributions and updates to the content of the book. This is done by following fork/edit/pull-request workflow.

From your fork of this repository, you can generate your own version of the book by creating and activating a customized conda environment (virtual environment) and using the Jupyter Book build commands.
From your fork of this repository, you can generate your own version of the book by syncing the `uv` environment and using the Jupyter Book build commands.


### Setting up the virtual environment
### Setting up the environment

The virtual environment specifications are defined in the [`environment.yml`]() file. If you have not set up the conda environment, navigate to your `Git-Tutorial` repository folder in your terminal on your local machine and execute the following two commands. If you have already created the conda environment, then simply activate it using the second command below (skip the first command).
This project uses [`uv`](https://docs.astral.sh/uv/) for dependency management. If you do not already have `uv` installed, follow the official installation instructions in the `uv` documentation.

Once `uv` is installed, navigate to your local `Git-Tutorial` repository folder and sync the project dependencies with:

```bash
conda env create -f environment.yml
conda activate jb-git-tutorial
uv sync
```


### Building a Jupyter Book

Run the following command in your terminal:

```bash
jb build ./book
```

If you would like to work with a clean build, you can empty the build folder by running:
Run the following command in your terminal from the repository root:

```bash
jb clean ./book
make book
```

If jupyter execution is cached, this command will not delete the cached folder.

To remove the build folder (including `cached` executables), you can run:

```bash
jb clean --all ./book
```
The `book` target first removes the existing Jupyter Book build artifacts and then performs a fresh site build using `uv run jupyter book build --all`.

## Notes

Put notes here.
This repository is actively maintained and contributions are welcome. The most helpful contributions usually improve tutorial clarity, correct command examples, add beginner-friendly explanations, or expand the hands-on workflow chapters.
46 changes: 0 additions & 46 deletions book/_config.yml

This file was deleted.

37 changes: 0 additions & 37 deletions book/_toc.yml

This file was deleted.

2 changes: 1 addition & 1 deletion book/content/background/GitHubHistory.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Time series of GitHub growth in users and repositories since 2008. Source: Data

The vertical line in {numref}`Figure %s <GitHubGrowth>` at June 4, 2018 highlights the data when Microsoft announced its acquisition of GitHub. Some open source users worried that a large for-profit corporation with a long history of antitrust litigation should control the most important platform in open source software development and collaboration. But by 2018, Microsoft had already become one of the heaviest users of GitHub and was maintaining many of the most actively developed repositories on the platform.

In 2014, Steve Ballmer stepped down as CEO of Microsoft and was replaced by Satya Nadella. Nadella quickly began taking Microsoft in a different direction {cite}`MicrosoftOpenWiki2020`. The focus of the expanded beyond the proprietary Windows operating system and into {term}`cloud` services (Azure), embedded, and mobline computing. In an October 2014 media event discussing Microsoft's Azure cloud computing services, Nadella put up a slide that said "Microsoft Loves Linux" and read it to the audience {cite}`McAllister2014`. This statement would have been unthinkable under the previous two Microsoft CEO's, Steve Ballmer and Bill Gates. But from 2014 to its acquisition of GitHub in 2018, Microsoft had shown a strong commitment to the open source community.
In 2014, Steve Ballmer stepped down as CEO of Microsoft and was replaced by Satya Nadella. Nadella quickly began taking Microsoft in a different direction {cite}`MicrosoftOpenWiki2020`. The company's focus expanded beyond the proprietary Windows operating system and further into {term}`cloud` services (Azure), embedded systems, and mobile computing. In an October 2014 media event discussing Microsoft's Azure cloud computing services, Nadella put up a slide that said "Microsoft Loves Linux" and read it to the audience {cite}`McAllister2014`. This statement would have been unthinkable under the previous two Microsoft CEOs, Steve Ballmer and Bill Gates. But from 2014 to its acquisition of GitHub in 2018, Microsoft had shown a strong commitment to the open source community.


## Other GitHub Features
Expand Down
6 changes: 3 additions & 3 deletions book/content/background/VCgitHistory.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ So the Git source code is openly published, but the method of outside collaborat

## History of Git: Why Git Became This

The standard *Pro Git* book {cite}`ChaconStraub2020` has a chapter entitled, "[A Short History of Git](https://git-scm.com/book/en/v2/Getting-Started-A-Short-History-of-Git)". But a more recent article by Favell (2020) {cite}`Favell2020` entitled, "[The History of Git: The Road to Domination in Software Version Control](https://www.welcometothejungle.com/en/articles/btc-history-git)," goes into more detail about Git's rise from the early 2000's to the present. We also like Brown's (2018) article {cite}`Brown2018`, "A Git Origin Story." But one also needs to know a little bit about the [history of the Linux](https://en.wikipedia.org/wiki/History_of_Linux) {term}`open source` operating system {cite}`LinuxWiki2020` to appreciate its important role in the history of Git. The short history we present here is a synopsis that highlights why Git has the features and following that it does. We are tryin to give you evidence that you should make the investment to become a Git master.
The standard *Pro Git* book {cite}`ChaconStraub2020` has a chapter entitled, "[A Short History of Git](https://git-scm.com/book/en/v2/Getting-Started-A-Short-History-of-Git)". But a more recent article by Favell (2020) {cite}`Favell2020` entitled, "[The History of Git: The Road to Domination in Software Version Control](https://www.welcometothejungle.com/en/articles/btc-history-git)," goes into more detail about Git's rise from the early 2000s to the present. We also like Brown's (2018) article {cite}`Brown2018`, "A Git Origin Story." But one also needs to know a little bit about the [history of Linux](https://en.wikipedia.org/wiki/History_of_Linux), the {term}`open source` operating system {cite}`LinuxWiki2020`, to appreciate its important role in the history of Git. The short history we present here is a synopsis that highlights why Git has the features and following that it does. We are trying to give you evidence that the investment required to learn Git is worthwhile.

Early in the Favell (2020) article {cite}`Favell2020`, he gives the following strong evidence of Git's current dominance in the VCS ({term}`version control system`) field.

Expand All @@ -114,7 +114,7 @@ In 1991, Linus Torvalds posted an initial version of a free operating system on

By the late 1990s, development of the Linux kernel as a viable operating system for broad use had greatly matured, and the number of developers and contributors had multiplied. The community of Linux developers were committed to keeping the kernel's source code {term}`open source`, but the scaling of the number of collaborators was being limited by the {term}`version control system`s being used at the time, such as CVS and Subversion.

By 2000, some of the Linux developers were using a new {term}`source code management service` and accompanying version constrol system, BitKeeper {cite}`BitKeeperWiki2020`, because they offered free code hosting. But the software for the BitKeeper VCS tools was proprietary, which made some of the core Linux developers uncomfortable given the Linux open source license and ethic. But in 2020, Torvalds prevailed on much of the community to host the main {term}`repository` of the Linux source code with BitKeeper, which was a DVCS. The rationale was that the efficiencies from a mature DVCS platform would outweigh any conflict with proprietary versus open source licenses.
By 2000, some of the Linux developers were using a new {term}`source code management service` and accompanying version control system, BitKeeper {cite}`BitKeeperWiki2020`, because it offered free code hosting. But the software for the BitKeeper VCS tools was proprietary, which made some of the core Linux developers uncomfortable given the Linux open source license and ethic. By 2002, Torvalds had prevailed on much of the community to host the main {term}`repository` of the Linux source code with BitKeeper, which was a DVCS. The rationale was that the efficiencies from a mature DVCS platform would outweigh any conflict with proprietary versus open source licenses.


### Linux development with BitKeeper: 2002 to 2005
Expand All @@ -127,7 +127,7 @@ It is worth noting the BitKeeper pioneered the {term}`distributed version contro
* Simple design
* Strong support for non-linear development (thousands of parallel {term}`branch`es)
* Fully distributed
* Able to handle large projects like the Linux kernel efficiently (spped and data size)
* Able to handle large projects like the Linux kernel efficiently (speed and data size)
* Include very strong safeguards against corruption, either accidental or malicious


Expand Down
5 changes: 2 additions & 3 deletions book/content/bibliography.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
(chap_bibliog)=
# Bibliography

```{bibliography} ../_bibliography/references.bib
:all:
```
:::{bibliography}
:::
Loading
Loading