# git exercise. Multiple developers and one remote shared repository. ############################################## # Scenario 2a : "user of a remote repository". ############################################## # Clone the git repository # ssh://python@git.physik.uzh.ch:8443/python/sn.git # Enter the new directory and check the status # Ask git about the URL of the remote repository. # Read and execute social_network.py to understand what it does. # !! Tell the tutors that you reached "fetch". # The developers just pushed a new version to the remote repository. # You want to fetch these updates to your local repository. # Inspect how the logs changes accordingly. # See the logs from the graphical interface. (hint: use "--all" flag). # Merge the updates within your working tree. # Inspect how the logs changes accordingly. # Execute the script social_network.py again, see the effect. # See what changed after merging, from the graphical interface. ###################################################### # Scenario 2b: "local developer of a remote project" ###################################################### # Create a new file within the directory "people/" called # after you: .txt . Within that file write # a short list of people you know (other students, lecturers, # friends, family etc.) one name per line in the form of # "name surname". # Execute social_network.py and check that it correctly shows the # information that you have just provided. # Add your new file people/ to the staging area. # Commit changes in the staging area. # Check how the log changes accordingly. #################################################### # Scenario 2c: "from local developer to contributor" #################################################### # !! Tell the tutors that you reached "push". # You want to share your recent changes with other developers. # Push your changes to the remote repository. # WARNING: the remote repository should have recent updates # from other developers that you do not have yet, so a direct push # attempt should fail - try it. # See how the logs of all branches (--all) reflects your push. ######################### # Scenario 2d: conflicts! ######################### # Edit social_network.py and improve the title of the graph. # Execute social_network.py to verify that your code works well. # Commit changes to your local repository. # !! Tell the tutors that you reached "conflict". # Pull from the remote repository before pushing. # WARNING: a conflict could raise. Resolve it by editing the # appropriate file. Then add and commit the change to resolve the # conflict. # Try again to send your changes to the other developers.