You are on page 1of 2

CSE 5408- Lab #4

Version Control System


GitHub-advanced

Lab objectives:
After the lab, you should know how to
● create and use team repository
● make changes to a file and push them to GitHub as commits
● start and manage a new branch
● open and merge a pull request
● review Python programming basics

Lab activities:
1. Using github create a repo for your group using any group members github account.
Once this is done, go to the repository, click settings. Afterwards go to manage access
and send an invite to the rest of your group members to collaborate. This will allow all
of your members to change and update the single repository.
2. Afterwards create branches for each of your group members, using their name for the
branch name.
3. Next complete the following questions in Python, by assigning one to each group
member( if your group only has 4 people, 1 person might have to do two questions):
a. Write a program containing a function to reverse a user inputted string.
b. Write a program containing a function to check if a user inputted number is
prime.
c. Write a program containing a function to convert the current time, into military
time.
d. Write a program containing a function to output the fibonacci sum up to a user
inputted number.
e. Write a program containing a function to check if a user inputted string is a good
password or not, if not have them try again. A password is considered good if it
contains at least 7 characters and 2 of those are either a number or special
character(by special character I mean any one of the characters on the numbers
1-8, i.e. !@#$%^&*).
The final master file, should have everyone’s part of their assigned work in a single
python file. The top of the file should include comments which include your names,
group name, class name, term, and lab title.
4. After completing your assigned program and you verify it works, add, commit and push
your python file to your branch. Once your group mates also verify it works, merge your
branch with the master branch.
5. After each time the master branch is updated, switch to the master branch and pull the
changes.
6. Continue to do steps 4 and 5. If you’ve done this correctly, you should have two files in
your branch. Your own file and the master file. Every time you complete step 4, add
your working part of step 3 to the master file in your current branch. Then add, commit,
and push both your single completed version and the updated master file to your
branch. NOT THE MASTER YET.
7. Once everyone has completed steps 4-7, everyone should go to their branch and
remove their single python file and only be left with the master file. To remove a file
from you branch, use these commands:
a. git rm “your_file_name”
b. git commit -m “your message”
c. git push origin your_branch name

8. Upon arriving at this step, EVERYONE should one have ONE file in their branch. That file
being the master file with everyone’s part of part 3. (Again, refer to the end of part 3 to
see what’s expected in the master file). At this point one person should merge their
branch with master branch and push the master file onto it.
9. Finally, in the end the master branch should have the complete updated master file
containing the python programs.

Lab Deliverables:
1. Each individual screenshots containing you running the terminal commands.
2. Each individual program
3. The final updated master file program
4. A screenshots of your group’s repository commit history. (This can be found on the
main page of your repository above the branch selector, where it says “commit”).
Grading
This lab is worth 100 points
Resources:
https://git-scm.com/
https://swcarpentry.github.io/git-novice/

You might also like