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:
bashgit remote add origin https://github.com/username/repo.git
2. Push changes
The first time, you must link the upstream branch:
bashgit push -u origin main
3. Pull changes
If a teammate pushed code, download it:
bashgit pull origin main
Practical Exercise
- Create a new empty repo on GitHub.
- Link your local repo:
git remote add origin URL. - Push:
git push -u origin main. - Edit a file directly on GitHub website.
- In your local terminal, run
git pullto fetch the new changes.
