# git demo. Scenario 2: Multiple developers and one remote shared repository. # Scenario 2a : "user of a remote repository" # first we move to a safe place: cd /tmp # we are interested in a remote repository. So we clone it. git clone ssh://emanuele@escher.fuw.edu.pl/git/autumnschool/shared/sn cd sn # we can check that we have a git repository: git status # git keeps track of the URL of the remote repository: git remote -v # the code we have just retrieved is about social networks: python social_network.py # Since we cloned new updates could be sent by other developers to the # remote repository... git fetch # we can have a look to the logs to have more details: git log # ...also from the log's graphical interface: gitk --all # after fetching updates we usually want to merge them to git merge origin/master # Logs show the new commits: git log # executing the updated code shows what changed: python social_network.py # the graphical interface shows the merge action: gitk --all # Now we want to step back to how it was before the last commit. git reset --hard HEAD~1 # or better use SHA1 or first clone # Logs reflect we stepped back: git log # ...as well as the graphical interface: gitk --all # we can retrieve the latest updates and merge them in a single command: git pull # and verify that everything went well: git log gitk --all # Scenario 2b: "local development of a remote project" # Task1: create a new file in people/ called .txt cat > people/emanuele.olivetti.txt <