Logo hdtoledo
hdtoledo.dev
Módulos_del_Sistema
EJERCICIO_PRÁCTICO

Collaborating in the Cloud

Collaborating in the Cloud (GitHub)

1. Connect local repo to GitHub

First, create an empty repo on GitHub in the browser. You will get a URL.

Link it in your terminal:

bash
git remote add origin https://github.com/username/repo.git

2. Push changes

The first time, you must link the upstream branch:

bash
git push -u origin main

3. Pull changes

If a teammate pushed code, download it:

bash
git pull origin main

Practical Exercise

  1. Create a new empty repo on GitHub.
  2. Link your local repo: git remote add origin URL.
  3. Push: git push -u origin main.
  4. Edit a file directly on GitHub website.
  5. In your local terminal, run git pull to fetch the new changes.