-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
44b855b
commit 6f963b4
Showing
103 changed files
with
1,245 additions
and
897 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
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
7 changes: 7 additions & 0 deletions
7
_includes/activity/github-desktop/00-install-configure-gh-desktop.md
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,7 @@ | ||
|
||
For this class you will use GitHub Desktop to work with your GitHub repository. | ||
|
||
1. Download and install [GitHub Desktop](https://desktop.github.com). | ||
1. Open GitHub Desktop. | ||
1. Follow the prompts to sign in to your account. | ||
1. Configure your user information (this only happens the first time you run the application). |
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,17 +1,8 @@ | ||
{% capture activity-text %} | ||
# Activity: Create a Repository on GitHub.com | ||
Now that you have GitHub Desktop installed, let's create the repository that will hold your new website. | ||
|
||
1. On GitHub.com, [create a new repository](https://github.com/new). | ||
1. You can name your repository anything you'd like - one idea is `pages-website`. | ||
1. Enter a description. | ||
1. We recommend you create a public repository. Public repositories are free. | ||
1. Name your repository `YOUR-USERNAME.github.io`. Why the funny name? Click the **Tell me why** section below to learn more. | ||
1. Enter a description for your repository. | ||
1. We recommend you create a public repository. Public repositories are free. Even if you select a private repository, your published website will be public. | ||
1. Check the box to initialize the repository with a README. | ||
|
||
{% endcapture %} | ||
|
||
<div class="notice--warning"> | ||
{{ activity-text | markdownify }} | ||
</div> | ||
|
||
Need help? Click **open chat** below for answers from GitHub trainers! | ||
{: .notice--success} | ||
1. Click `Create repository`. |
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,17 +1,8 @@ | ||
{% capture activity-text %} | ||
# Activity: Clone repository locally | ||
|
||
1. Sign in to GitHub and GitHub Desktop before you start to clone. | ||
2. On GitHub, navigate to the main page of the repository. | ||
3. Under your repository name, click **Clone or download**. | ||
4. Click **Open in Desktop** to clone the repository and open it in GitHub Desktop. | ||
5. In GitHub Desktop, after verifying the name and location on your hard drive where you'd like to clone the repository, click **Clone**. | ||
|
||
{% endcapture %} | ||
|
||
<div class="notice--warning"> | ||
{{ activity-text | markdownify }} | ||
</div> | ||
|
||
Need help? Click **open chat** below for answers from GitHub trainers! | ||
{: .notice--success} | ||
After you've created a repository on the remote, the next step is to clone it to your local environment. | ||
|
||
1. Sign in to GitHub.com and GitHub Desktop. | ||
1. On GitHub.com, navigate to the Code tab of the repository. | ||
1. On the right side of the screen, click `Clone or download`. | ||
1. Click `Open in Desktop`. This will open GitHub Desktop. | ||
1. Verify the location on your hard drive where you would like to copy the repository. | ||
1. Click `Clone`. |
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,16 +1,7 @@ | ||
{% capture activity-text %} | ||
# Activity: Create a branch using GitHub Desktop | ||
|
||
1. At the top of GitHub Desktop, click the <i class="fa fa-code-fork fa-lg" aria-hidden="true"></i> button. | ||
2. In the _Name_ field, type a meaningful name for your branch. | ||
3. Click **Create branch**. | ||
4. GitHub Desktop will automatically create and checkout to your new branch. | ||
|
||
{% endcapture %} | ||
Now that you have a local copy of the repository, let's use the steps of [GitHub Flow](https://guides.github.com/introduction/flow/) to make a change in your project. First we will create a branch: | ||
|
||
<div class="notice--warning"> | ||
{{ activity-text | markdownify }} | ||
</div> | ||
|
||
Need help? Click **open chat** below for answers from GitHub trainers! | ||
{: .notice--success} | ||
1. At the top of GitHub Desktop, click the <i class="fa fa-code-fork fa-lg" aria-hidden="true"></i> button. | ||
1. In the `Name` field, type a meaningful name for your branch. Something like `add-index-page` will work nicely. | ||
1. Click `Create branch`. | ||
1. GitHub Desktop will automatically create your new branch and switch you to it. |
26 changes: 6 additions & 20 deletions
26
_includes/activity/github-desktop/04-make-changes-locally.md
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,22 +1,8 @@ | ||
{% capture activity-text %} | ||
|
||
# Activity: Add Commits Locally | ||
It's time to create the home page for your website. | ||
|
||
1. Double check that you're checked out to your branch on GitHub Desktop. | ||
1. Open your preferred text editor. | ||
1. Create a new file with the title `index.md`. | ||
1. In your file, include at least "Hello World" and your username. Bonus points for using markdown, including a bio, or even making a portfolio! | ||
1. When you are finished, save the file and close the text editor. | ||
1. Go back to GitHub Desktop and select the `master` branch. | ||
|
||
_When you open your file with the master branch selected, you will notice that the changes you just made to the file are not included._ | ||
|
||
|
||
{% endcapture %} | ||
|
||
<div class="notice--warning"> | ||
{{ activity-text | markdownify }} | ||
</div> | ||
|
||
Need help? Click **open chat** below for answers from GitHub trainers! | ||
{: .notice--success} | ||
1. Double check that your new branch is the selected branch on GitHub Desktop. | ||
1. Open the repository in your preferred text editor. | ||
1. Create a new file named `index.html`. | ||
1. In your `index.html` file, include at least the following two lines: `<h1> Hello World! </h1>` and `<p> My name is GITHUB_USERNAME </p>`. Bonus points for including more information, or using [Jekyll Themes](http://jekyllthemes.org/) to create a more robust site. | ||
1. When you are finished, save your changes and close the text editor. |
21 changes: 6 additions & 15 deletions
21
_includes/activity/github-desktop/05-committing-locally.md
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,17 +1,8 @@ | ||
{% capture activity-text %} | ||
# Activity: Making Commits Locally | ||
|
||
1. On GitHub Desktop, re-select the branch you created earlier. | ||
2. Click the changes tab to see a list of the files that have been changed or added since the last commit. | ||
3. Use the checkboxes to indicate which files should be part of the commit. In our case, you'll select the `index.md` file. It is a good idea to group files together based on the type of changes or the file content. For example, if you fixed the same formatting issue in several documents, you should group them into one commit. | ||
4. Type your commit message in the Summary field. | ||
5. You will notice that GitHub has already populated the commit button with the current branch. Simply click the button to commit your changes. | ||
After you have finished making your changes, it is time to commit them. | ||
|
||
{% endcapture %} | ||
|
||
<div class="notice--warning"> | ||
{{ activity-text | markdownify }} | ||
</div> | ||
|
||
Need help? Click **open chat** below for answers from GitHub trainers! | ||
{: .notice--success} | ||
1. Click the changes tab to see a list of the files that have been changed or added since the last commit. | ||
1. Use the checkboxes to indicate which files should be part of the commit. In this activity, you'll select the `index.html` file. | ||
*Note: It is a good idea to group files together based on the type of changes or the file content. For example, if you fixed the same formatting issue in several documents, you should group them into one commit.* | ||
1. Type your commit message in the Summary field. | ||
1. You will notice that GitHub Desktop has already populated the commit button with the current branch. Simply click the button to commit your changes. |
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,16 +1,6 @@ | ||
{% capture activity-text %} | ||
# Activity: Opening a Pull Request | ||
Now that you have made some local commits, it is time to send your changes to the remote copy of your repository on GitHub.com: | ||
|
||
1. After you have committed your changes, click the Pull Request button. | ||
2. Complete the fields of the pull request just like you would on GitHub.com. (Make sure you know if the main default branch is `master` or `gh-pages`!) | ||
3. Click create pull request. GitHub Desktop will do all of the work of pushing your changes and creating a pull request. When it is finished, you will receive a confirmation message. | ||
4. Go to your repository on GitHub.com, click the **Pull Requests** tab, and see your newly created pull request! | ||
|
||
{% endcapture %} | ||
|
||
<div class="notice--warning"> | ||
{{ activity-text | markdownify }} | ||
</div> | ||
|
||
Need help? Click **open chat** below for answers from GitHub trainers! | ||
{: .notice--success} | ||
1. On GitHub Desktop, click the Pull Request button. | ||
1. Complete the fields of the Pull Request just like you would on GitHub.com. Ensure the `base` branch (the one on the left) is `master` and that the `compare` branch (the one on the right) is the one you created on GitHub Desktop. | ||
1. Click `Send Pull Request`. GitHub Desktop will send your changes and create a pull request. | ||
1. You will receive a confirmation message including the link to your Pull Request. Click the link to view your newly created Pull Request on GitHub.com! |
16 changes: 3 additions & 13 deletions
16
_includes/activity/github-desktop/07-merge-pull-request.md
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,14 +1,4 @@ | ||
{% capture activity-text %} | ||
# Activity: Merging Pull Request | ||
Since this is your repository, you probably don't have anyone to collaborate with (yet). Go ahead and merge your Pull Request now: | ||
|
||
1. On GitHub.com, navigate to the pull request that you just opened. | ||
2. Scroll down and click the big green **Merge Pull Request** button. | ||
|
||
{% endcapture %} | ||
|
||
<div class="notice--warning"> | ||
{{ activity-text | markdownify }} | ||
</div> | ||
|
||
Need help? Click **open chat** below for answers from GitHub trainers! | ||
{: .notice--success} | ||
1. On GitHub.com, navigate to the Pull Request that you just opened. | ||
1. Scroll down and click the big green **Merge Pull Request** button. |
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,15 +1,5 @@ | ||
{% capture activity-text %} | ||
# Activity: Syncing Changes | ||
After you merge your Pull Request, you will need to update your local copy of the repository: | ||
|
||
1. Navigate back to GitHub Desktop. | ||
2. Select the `master` branch at the top of the app. This way, you can check if the merge is being shown locally. | ||
3. Sync the changes from the remote repository by clicking the **Sync** button on the top right side of the app. | ||
|
||
{% endcapture %} | ||
|
||
<div class="notice--warning"> | ||
{{ activity-text | markdownify }} | ||
</div> | ||
|
||
Need help? Click **open chat** below for answers from GitHub trainers! | ||
{: .notice--success} | ||
1. Select the `master` branch at the top of the app. | ||
1. Click the **Sync** button on the top right side of the app to update your local copy of the repository with the changes from the remote repository. |
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,5 @@ | ||
It's time to share your page with the world! To do that, you will follow the same steps of the GitHub workflow, but this time you will do it on the class repository: | ||
|
||
1. Visit the [class repository](https://github.com/githubschool/on-demand-github-pages/). | ||
1. Click the Issues tab. | ||
1. Request push access by leaving a comment on [Issue #1](https://github.com/githubschool/on-demand-github-pages/issues/1). |
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,14 @@ | ||
|
||
Now that you are a collaborator, let's use the local workflow we just learned to make changes to this repository: | ||
|
||
1. Start from the Code tab of the [class repository on GitHub.com](https://github.com/githubschool/on-demand-github-pages/). | ||
1. Click on `Clone or Download` and select `Open in Desktop`. | ||
1. Confirm where you'd like to save your project on GitHub Desktop. | ||
1. Create a branch and label it with your username, something like `yourUsername-add-page`. | ||
1. In your favorite text editor, add a file to the `_pages` directory. Include your GitHub handle in the filename: `username.yaml`. | ||
1. Enter the following content into your file: | ||
{: .align-center} | ||
1. Ensure you've replaced `YOUR-USERNAME` with your GitHub Username, `YOUR-SITES-URL` with the URL to your site (which should be `YOUR-USERNAME.github.io`), and `TODAYS-DATE-YYYY-MM-DD` with today's date, using a 4-digit year, 2-digit month, and 2-digit day. For example, if today is October 17, 2016, you would enter: `2016-10-17`. | ||
1. On GitHub Desktop, within the `Uncommitted Changes` tab, ensure your file is checked. | ||
1. On GitHub Desktop, enter a commit message describing the change you're introducing to the project. | ||
1. On GitHub Desktop, click the `Commit to YOUR-BRANCH` button -- ensure `YOUR-BRANCH` includes your username. |
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,6 @@ | ||
|
||
It's now time to collaborate with other learners taking this class around the :earth_americas:. | ||
|
||
1. In the [class repository on GitHub.com](https://github.com/githubschool/on-demand-github-pages/), navigate to the [Pull Requests tab](https://github.com/githubschool/on-demand-github-pages/pulls). | ||
1. Look through other pull requests. Do they look like good changes, with CI passing? Feel free to post an encouraging message! | ||
1. In your own pull request, wait to see if the branch passes the Travis CI tests and is ready to merge. |
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,14 @@ | ||
Now that your tests have passed, let's click the big green button to add your site to our directory! | ||
|
||
1. On GitHub.com, check to ensure the tests are passing. | ||
1. Click the `Merge` button. | ||
1. Click `Confirm Merge`. | ||
1. Delete the branch. | ||
|
||
## :tada: Congratulations! | ||
|
||
Once you have merged your pull request, you have completed the GitHub workflow! Refresh this page to see your addition to our contribution graph! | ||
|
||
<div class="contribution_graph"> | ||
<div id="github_chart_1" class="github_chart_1"></div> | ||
</div> |
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,14 @@ | ||
{% capture activity-text %} | ||
# Activity: Join the Class Repository | ||
|
||
It's time to get your hands dirty! Use these steps to access our shared project: | ||
|
||
1. Sign in with your GitHub account. | ||
2. Navigate to <a href="https://github.com/githubschool/open-enrollment-classes-introduction-to-github" target="_blank">our shared project</a>. | ||
3. Leave a comment on the collaborator issue. The GitHubTeacher user will auto-magically add you to our project as a collaborator. <a href="https://github.com/githubschool/open-enrollment-classes-introduction-to-github/issues/927" target="_blank">Click here to go to the issue, and leave a comment!</a> | ||
|
||
{% endcapture %} | ||
|
||
<div class="notice--warning"> | ||
{{ activity-text | markdownify }} | ||
</div> |
22 changes: 22 additions & 0 deletions
22
_includes/activity/intro-to-github/02-find-your-hometown.md
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,22 @@ | ||
{% capture activity-text %} | ||
# Activity: Find or Create an Issue for Your City | ||
|
||
First, let's see if an issue already exists for your city: | ||
|
||
1. Click on the <a href="https://github.com/githubschool/open-enrollment-classes-introduction-to-github/issues" target="_blank">Issues tab</a> in the class repository. | ||
2. Using the search field at the top of the issues view, type the name of the city you call home. | ||
3. Press enter and check the results. Is there already an issue for your city? Remember to check the closed Issues too! | ||
4. If an issue **already exists for your city**, comment on the issue to let others know that you will be adding your name to the same city! | ||
5. If the issue is closed, re-open it. You'll close it later in the process, so don't worry about that for now. | ||
|
||
If an issue **does not exist** for your city, you get to start one! | ||
|
||
1. Click the `New Issue` button. | ||
2. Complete the pre-populated issue template, adding a subject to the issue and replacing the placeholders for <your-city> name. | ||
3. If you need help finding your city's coordinates to complete the issue template, [Click here](http://mynasadata.larc.nasa.gov/latitudelongitude-finder/) and search for your city. | ||
|
||
{% endcapture %} | ||
|
||
<div class="notice--warning"> | ||
{{ activity-text | markdownify }} | ||
</div> |
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,14 @@ | ||
{% capture activity-text %} | ||
# Activity: Create your Branch | ||
|
||
It is time to create the branch you will use to propose the addition of your pin to the map. Here's how you do it: | ||
|
||
1. Navigate to the <a href="https://github.com/githubschool/open-enrollment-classes-introduction-to-github/" target="_blank">Code tab</a> in the class repository. | ||
2. Click the drop-down titled `master`. | ||
3. In the field, enter this unique name for your branch: `<your-username-your-city>`. | ||
4. Press Enter to create your branch. | ||
{% endcapture %} | ||
|
||
<div class="notice--warning"> | ||
{{ activity-text | markdownify }} | ||
</div> |
17 changes: 17 additions & 0 deletions
17
_includes/activity/intro-to-github/04-create-a-file-on-github.md
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,17 @@ | ||
{% capture activity-text %} | ||
# Activity: Adding a New Pin to the Map | ||
|
||
1. In your new branch, add a new file named: `_pins/YOUR-USERNAME.json`. | ||
1. [Click here](http://mynasadata.larc.nasa.gov/latitudelongitude-finder/) to identify your latitude and longitude. | ||
1. Enter the following code in your file: | ||
{: .align-center} | ||
1. Ensure you've replaced: `YOUR_USERNAME` with your GitHub username, `YOUR_LATITUDE` with your north/south coordinate, and `YOUR_LONGITUDE` with your east/west coordinate. | ||
1. Enter a commit message that describes your addition. | ||
1. Commit your change to your branch. | ||
|
||
|
||
{% endcapture %} | ||
|
||
<div class="notice--warning"> | ||
{{ activity-text | markdownify }} | ||
</div> |
Oops, something went wrong.