Oct 1, 2024 Anna Duan
In this demo, participants will learn the basics of using Github repositories for version control, and practice the following functions:
- Fork
- Clone
- Commit
- Push
They will also get practice collaborating on repositories, including best practices for working simultaneously and resolving conflicts. Data for this activity comes from OpenDataPhilly.
- Fork this repo
- Clone it to your laptop in Github desktop by pasting the repo URL
- Edit the markdown, slightly changing the code for the map. Save once you're satisfied.
- Go to Github Desktop to commit and push your changes.
- Go to github.com to see your changes reflected.
Part 2: Collaborating and resolving conflicts
- Pair up. Person A should invite the Person B to collaborate on their forked repo in settings.
- Person B clones Person A's repo to their laptop.
- Person A edits the map, then saves, commits, and pushes.
- THIS IS IMPORTANT: Without pulling origin, Person B edits the same map, then saves, commits, and pushes.
- At this point, you should have your first conflict! Conflicts in Github are marked by the following: <<<<<<<, =======, >>>>>>>.
- Remove/keep the final changes you and your partner agree on. Also delete the conflict markers.
- Once you're both satisfied, click commit merge and push to Github.com.
Work together to resolve it safely and ask each other for help. Good luck!