Skip to content

Commit

Permalink
Added in glossary
Browse files Browse the repository at this point in the history
  • Loading branch information
rmbielby committed Jan 21, 2025
1 parent 772dfa7 commit a94ebcf
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 16 deletions.
1 change: 1 addition & 0 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ website:
- github-devops-refresher/viewing-files.qmd
- github-devops-refresher/editing-files.qmd
- github-devops-refresher/viewing-history.qmd
- glossary.qmd

format:
html:
Expand Down
21 changes: 9 additions & 12 deletions git-refresher/clone-a-repo.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,23 @@ title: "Cloning a repository"
---

---
## Introduction
To work on the contents of an existing Git [**repository**](glossary.html#repository), the first step will often be to [**"clone"**](glossary.html#clone) it to your local working environment (i.e. your laptop!).

This section will guide you through the process of cloning a GitHub repository (repo). A repo contains all of your code, your files and each file's version history. Repos can have multiple collaborators and can be either private or public. You can find out more about GitHub repos on [GitHub Docs](https://docs.github.com/en/repositories/creating-and-managing-repositories/about-repositories).
::: callout-tip
## Getting the clone URL
To clone a repo, you'll first need to find the necessary URL.

If you have a repo on Azure DevOps, GitHub or GitLab, you generally can't edit or run your work on those platforms, so if you need to work with the contents of a repo, you'll usually need to make a clone.
- Go to the [git-academy-sandbox](https://github.com/dfe-analytical-services/git-academy-sandbox) repository page on GitHub.

There are several ways to clone an existing repo. Below, you'll find two methods. The first uses Rstudio and the second uses Git Bash. Start with step 1, which is the same for both methods, and then decide which method to follow. Once you have successfully cloned, you should see the files appear in the location you have chosen to store your repo.

## Step 1: Get the repository clone link

a\. Go to the [git-academy-sandbox](https://github.com/dfe-analytical-services/git-academy-sandbox) repository page on GitHub.

b\. Click the "Code" button and copy the URL (HTTPS link).
- Click the "Code" button and copy the URL (HTTPS link).
:::

::: panel-tabset
## Git Bash:

Navigate to the folder on your device where you want to clone the repo. Right-click in the directory and select **Git Bash Here**.

![](images/clone_gitbash-here.png){width="343"}
![](images/clone_gitbash-here.png){width="60%", fig-align="center"}

- In the Git Bash window that opens, use the \`git clone\` command followed by the URL you copied from GitHub. For this repo, we would enter:

Expand Down Expand Up @@ -51,7 +48,7 @@ You will need to right-click to paste, as the keyboard shortcut will not work in

- Click "Create Project".

![](images/clone_rstudio.png){width="467"}
![](images/clone_rstudio.png){width="60%", fig-align="center"}

Check the Files pane in RStudio to see if the repo files have been cloned to your local machine. The files pane normally opens in the right-hand bottom corner of RStudio.

Expand Down
Binary file modified git-refresher/images/clone_rstudio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion github-devops-refresher/editing-files.qmd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "Editing a file on GitHub"
title: "Editing files"
---


Expand Down
2 changes: 1 addition & 1 deletion github-devops-refresher/navigating-branches.qmd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "Switching branches on GitHub"
title: "Navigating branches"
---

To view and switch between the different branches available in a GitHub repository, follow these steps:
Expand Down
2 changes: 1 addition & 1 deletion github-devops-refresher/viewing-files.qmd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "Viewing a file on GitHub"
title: "Viewing files"
---

To view a file on your repo:
Expand Down
2 changes: 1 addition & 1 deletion github-devops-refresher/viewing-history.qmd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "Viewing history on GitHub"
title: "Viewing the history"
---

1. Ensure you are still on the GitHub site for the github-sandbox repository.
Expand Down
15 changes: 15 additions & 0 deletions glossary.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Glossary
---

---

## Clone

Cloning a repository is the process of creating a copy of a repository folder system on your local working environment (e.g. your laptop computer).

## Repository

A repository (or repo) is effectively a project folder. A given repostory would usually contain all the work for a specific project (e.g. a data pipeline, an R-Shiny app, etc).


0 comments on commit a94ebcf

Please sign in to comment.