A bot that must have the last word makes for a decent git tutorial.
- Get write access to this repository (need your github handle).
- Clone this repository.
- Make a new file that is just yours!
cp jjfoley.py $USER.py
- Add and commit!
git add $USER.py
git commit -m "Made a file for myself!"
- Send your changes to github. Until it is successful: (maybe pick a different filename if it's already used)!
git pull
git push
- Observe
last-word-bot
committing the time over you. - Practice editing the file and dealing with the need to pull and push to get your changes into
master
.
- Find a partner.
- Choose one of your files to work on.
- Both edit the same file (one add a comment at top, one add at the bottom.)
- Choose one of you to win.
- commit, (push/pull)+
- Go back and let the other one try. See that Git can resolve some changes automatically!
- Now go back, and both try again, editing the same lines. See how it gives up and gives you all the information it can into the file? Choose a winner, delete all the "ascii art <<<< ==== >>>>" and commit, (push/pull)+.
last-word-bot
is a script in python/bash that pulls from the git repository and submits a timestamp update if it has changed. It has infinite patience and will get the last word.