generated from esciencecenter-digital-skills/NEBULA-content-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from esciencecenter-digital-skills/git-and-good…
…-practices Git and good practices
- Loading branch information
Showing
204 changed files
with
86,370 additions
and
142 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
{ | ||
"publicProps": { | ||
"title": "Add a title for your lesson/project", | ||
"title": "Digital Skills Slides", | ||
"baseURL": "digital-skills-slides", | ||
"repoName": "digital-skills-slides", | ||
"repoOwner": "esciencecenter-digital-skills", | ||
"organization": "Netherlands eScience Center", | ||
"categoryOrder": ["Category1", "Category2"] | ||
"categoryOrder": ["Good Practices"] | ||
} | ||
} |
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,162 @@ | ||
--- | ||
title: Git and GitHub | ||
type: slides | ||
order: 1 | ||
--- | ||
|
||
<!-- .slide: data-state="title" --> | ||
|
||
# Automated Version Control | ||
|
||
What is version control and why should I use it? | ||
|
||
Note: | ||
- Git all set up? | ||
- SSH working? | ||
- Otherwise: breakout room | ||
|
||
=== | ||
|
||
<!-- .slide: data-state="standard" --> | ||
<img style="height: 70vh;" src="https://swcarpentry.github.io/git-novice/fig/phd101212s.png"/> | ||
|
||
<span style="font-size: small;">“Piled Higher and Deeper” by Jorge Cham, http://www.phdcomics.com </span> | ||
|
||
=== | ||
|
||
<!-- .slide: data-state="standard" --> | ||
## Documents are... | ||
<div class="fragment"> | ||
a series of changes | ||
<img style="height: 30vh; margin: 0; padding: 0;" src="https://swcarpentry.github.io/git-novice/fig/play-changes.svg"/> | ||
</div> | ||
|
||
=== | ||
|
||
<!-- .slide: data-state="standard" --> | ||
## Collaboration | ||
<div style="float: left; width: 49%;"> | ||
independent changes | ||
<img style="height: 350px;" src="./media/versions.svg"/> | ||
</div> | ||
<div class="fragment" style="float: right; width: 49%;"> | ||
can be merged | ||
<img style="height: 350px;" src="./media/merge.svg"/> | ||
</div> | ||
|
||
=== | ||
|
||
<!-- .slide: data-state="standard" --> | ||
## Version Control: Key Points | ||
|
||
- Version control is track changes on steroids. | ||
- Version control is like an unlimited **undo**. | ||
- Version control also allows many people to work in parallel. | ||
|
||
=== | ||
|
||
<!-- .slide: data-state="standard" --> | ||
## The Holy Realms of Git | ||
|
||
<img src="https://swcarpentry.github.io/git-novice/fig/git-staging-area.svg"> | ||
|
||
<ul> | ||
<li><b>workspace</b> 📂</li> | ||
<ul> | ||
<li>Your filesystem</li> | ||
</ul> | ||
<li class="fragment"><b>index</b> 🕒 | ||
<ul> | ||
<li>Staging area</li> | ||
<li>Files wait patiently to be committed</li> | ||
</ul> | ||
</li> | ||
<li class="fragment"><b>local repository</b> 🗂️ | ||
<ul> | ||
<li>Contains branches, commits, history, etc.</li> | ||
</ul> | ||
</li> | ||
<ul> | ||
|
||
=== | ||
|
||
<!-- .slide: data-state="standard" --> | ||
## Crowded Staging Area / Index | ||
|
||
<img src="https://swcarpentry.github.io/git-novice/fig/git-committing.svg"> | ||
|
||
The Staging Area / Index can hold many files and folders. | ||
|
||
=== | ||
|
||
<!-- .slide: data-state="standard" --> | ||
## Quiz 1/2 | ||
|
||
<blockquote style="text-align: left;"> | ||
Which commit message should I choose? | ||
<ol> | ||
<li>“Changes”</li> | ||
<li>“Added line ‘This project started as a joke’ to myfile.txt”</li> | ||
<li>“Discuss origin of the project”</li> | ||
</ol> | ||
</code></pre> | ||
</blockquote> | ||
<blockquote class="fragment" style="text-align: right;"> | ||
Make it short, descriptive, and imperative <span style="font-style: normal;">🐺</span> | ||
</blockquote> | ||
<blockquote class="fragment" style="text-align: right;"> | ||
So yeah, the last one is good! <span style="font-style: normal;">🐺</span> | ||
</blockquote> | ||
|
||
=== | ||
|
||
<!-- .slide: data-state="standard" --> | ||
## Quiz 2/2 | ||
|
||
<blockquote style="text-align: left;"> | ||
Which command saves <b>myfile.txt</b> to my Git repo?<br> | ||
<ol> | ||
<li> | ||
<pre style="width: 100%; font-style: normal;" data-id="code-animation"><code data-trim class="bash"> | ||
$ git commit -m "my recent changes" | ||
</code></pre> | ||
</li> | ||
<li> | ||
<pre style="width: 100%; font-style: normal;" data-id="code-animation"><code data-trim class="bash"> | ||
$ git init myfile.txt | ||
$ git commit -m "my recent changes" | ||
</code></pre> | ||
</li> | ||
<li> | ||
<pre style="width: 100%; font-style: normal;" data-id="code-animation"><code data-trim class="bash"> | ||
$ git add myfile.txt | ||
$ git commit -m "my recent changes" | ||
</code></pre> | ||
</li> | ||
<li> | ||
<pre style="width: 100%; font-style: normal;" data-id="code-animation"><code data-trim class="bash"> | ||
$ git commit -m myfile.txt "my recent changes" | ||
</code></pre> | ||
</li> | ||
</ol> | ||
</code></pre> | ||
</blockquote> | ||
<blockquote class="fragment" style="text-align: right;"> | ||
3. adds your file to the index, and then commits it. That's the one. | ||
<span style="font-style: normal;">🐺</span> | ||
</blockquote> | ||
|
||
|
||
=== | ||
|
||
<!-- .slide: data-state="standard" --> | ||
## Tracking Changes: Key Points | ||
|
||
- Files can be stored in | ||
- **working directory**: the files you can see | ||
- **staging area / index**: files about to be committed | ||
- **local repository**: the permanent record | ||
- **git status** shows the status of a repository | ||
- **git add** puts files in the staging area | ||
- **git commit** saves the staged content as a new commit in the local repository | ||
- Write short, descriptive, and imperative commit messages |
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,11 @@ | ||
--- | ||
id: 0 | ||
category: Good Practices | ||
title: Version control with Git and GitHub | ||
author: eScience Center | ||
thumbnail: "version-control-thumbnail.jpg" | ||
visibility: visible | ||
--- | ||
|
||
Photo by <a href="https://unsplash.com/@wesleyphotography?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash">Wesley Tingey</a> on <a href="https://unsplash.com/photos/stack-of-books-on-table-snNHKZ-mGfE?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash">Unsplash</a> | ||
|
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,13 @@ | ||
--- | ||
title: Info | ||
type: info | ||
order: 0 | ||
--- | ||
|
||
## Collaborative version control with Git and GitHub | ||
This workshop introduces version control with Git and teaches you how to collaborate using Git and GitHub. | ||
|
||
Knowing how to use Git and GitHub will allow you to keep track of changes in your software project, publish your code online, collaborate with several people in the same project, and contribute to projects as an external collaborator. | ||
|
||
## The content | ||
This website hosts only the slides for the workshop. For the lesson content and exercises, see this [workbench lesson](https://esciencecenter-digital-skills.github.io/git-lesson/) or associated [GitHub repository](https://github.com/esciencecenter-digital-skills/git-lesson). |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.