MCS 275 Spring 2024
Emily Dumas
Reminders and announcements:
We worked on a game with PyGame.
We cloned it from GitHub, made changes, committed, and pushed them.
Anyone can clone the repo and work locally. Only I can push to it, hence no true collaboration.
We can mark other GitHub users as collaborators on a repo, allowing them to push to it.
(Private repos are invisible except to collaborators.)
Key consideration: Online repo can change with no action from us.
git pull
– get updatesgit log
– see what's changedgit add file1
git add file2
git commit
git push
– make changes available to othersThe local and remote repos have a commit labeled HEAD, the "latest".
You can push only if the local HEAD derives from the remote HEAD.
You can always pull, but it may trigger a merge.
If a git push
fails, the solution is to:
git pull
– starts a merge, often completes automaticallygit push
– to send the unified updates to the remote