# Cloning and pushing changes

The «Code» button on the repository page gives the HTTPS or SSH address and a ZIP download; here are the commands to clone a repository and push changes into it.

## Clone

1. On the repository page press **Code**.
2. Copy the address — **HTTPS** or **SSH** (the SSH tab appears once you have a key).
3. On your computer:

```
git clone https://skillok.org/git/anna/notes.git
```

A public repository clones without signing in. A private one over HTTPS asks for a login and a
password — paste a [token](https://skillok.org/docs/en/repositories/git-access/https-and-access-tokens) instead of the
password.

## Push changes

```
git add .
git commit -m "Notes on Ohm's law"
git push
```

Pushing needs a token with **write** access or an SSH key.

## Push to an empty repository

The repository was created without a README, and the project is already on your computer — connect
it and push the branch. Take the address from the **Code** menu:

```
git remote add origin https://skillok.org/git/anna/notes.git
git push -u origin main
```

If the project is not under git yet, first run `git init`, `git add .`, `git commit -m "First commit"`.

## Download ZIP

**Download ZIP** in the same menu gives the files of the current branch as one archive — without
history.

## What happens after a push

SKILLOK runs a check of the changes: it recounts the list of files and updates the README, branches
and tags.

---

https://skillok.org/docs/en/repositories/git-access/cloning-and-pushing
