Skip to content

Commit

Permalink
shorten
Browse files Browse the repository at this point in the history
  • Loading branch information
bast committed Sep 17, 2023
1 parent fe8bc3b commit 0f3d554
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 29 deletions.
2 changes: 1 addition & 1 deletion content/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Times here are in CE(S)T.
- 09:10 - 09:25 (15 min) [Sharing repositories online - teaching/type-along](https://coderefinery.github.io/git-intro/remotes/#sharing-repositories-online)
- 09:25 - 09:50 (25 min) Exercise
- Set up SSH keys
- [Pushing our guacamole recipe repository to GitHub](https://coderefinery.github.io/git-intro/remotes/#pushing-our-guacamole-recipe-repository-to-github)
- Pushing our guacamole recipe repository to GitHub
- Clone repository
- 09:50 - 10:00 (10 min) Break
- 10:00 - 10:15 (15 min) [Inspecting history - teaching/type-along](https://coderefinery.github.io/git-intro/archaeology/#inspecting-history)
Expand Down
39 changes: 11 additions & 28 deletions content/remotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,14 @@ one of these set up.

---

## Creating a new repository on GitHub
## Publishing an existing repository from laptop to GitHub

For the rest of this page, we will make a new repository for our
guacamole recipe on GitHub ({ref}`here <index>` we motivate why we demonstrate this
with GitHub),
send our code to it, and then see how
others can get the code from it.
```{admonition} If you started in the browser and have nothing on your laptop yet
It is possible, that you already have a repository on GitHub if you followed
the examples and exercises in previous episodes in the browser. In this case,
please watch others publish their repository and try to clone your repository
to the laptop using instructions at the bottom of this page.
```

Make sure that you are **logged into GitHub**.

Expand Down Expand Up @@ -188,13 +189,6 @@ Once you click the green "Create repository", you will see a page similar to:
What this means is that we have now an empty project with either an HTTPS or an
SSH address: click on the HTTPS and SSH buttons to see what happens.

---

## Pushing our guacamole recipe repository to GitHub

To push changes to the project please **select SSH**.
For this to work [you will need your SSH keys configured](https://coderefinery.github.io/installation/ssh/).

We now want to try the second option that GitHub suggests:

> **... or push an existing repository from the command line**
Expand Down Expand Up @@ -243,24 +237,13 @@ To github.com:USER/recipe.git
Branch 'main' set up to track remote branch 'main' from 'origin'.
```

### Exercise: Push your guacamole recipe to GitHub

```{exercise} Push-1: Push your guacamole recipe to GitHub
- Go to your recipe directory on your computer.
- Check that you are in the right place with `git status`.
- Define the remote with `git remote add origin [email protected]:USER/recipe.git`.
- Rename the current branch to "main", if needed: `git branch -M main`.
- Push the local branch "main" to the remote: `git push -u origin main`.
```

**Reload your GitHub project website and - taa-daa - your commits should now be
online!**

What just happened? **Think of publishing a repository as uploading the `.git` part online**.
**Reload your GitHub project website** and - taa-daa - your commits should now be
online! What just happened? **Think of publishing a repository as uploading
the `.git` part online**.

---

## Cloning a repository
## Cloning a repository from GitHub to laptop

Now other people can clone this repository and contribute changes. In the
[collaborative distributed version control](https://coderefinery.github.io/git-collaborative/) lesson
Expand Down

0 comments on commit 0f3d554

Please sign in to comment.