-
Notifications
You must be signed in to change notification settings - Fork 25
Labels
approvedexercise discussionDiscussion about the design of an exerciseDiscussion about the design of an exercise
Description
Existing exercise check
- I have verified that this exercise is not yet already in discussion, in progress, or exists
Lesson
https://nus-cs2103-ay2526s1.github.io/website/book/gitAndGithub/tag/
Exercise learning outcomes
Able to push commits to a remote repo.
Able to delete tags in a remote repo.
Exercise setup
Inputs to the new.sh:
Exercise name: tags-push
Tags (space separated): git-tag
Requires Git? (defaults to y) [y/N]: y
Requires Github? (defaults to y) [y/N]: y
Exercise repo type (local, remote, or ignore) (defaults to 'local'): remote
Exercise repo name (defaults to 'view_commits'): duty-roster
Git-Mastery Github repository title (defaults to ''): gm-duty-roster
Initialize exercise repo as Git repository? (defaults to y) [y/N]: N
Fork git-mastery/gm-duty-roster as {username}-duty-roster and clone the fork as duty-roster.
Rename the remote from origin to production.
# create a tag, push it to the fork, and delete it locally
git tag beta
git push production --tags
git tag -d beta
# create two more tags
git tag v1.0 HEAD~4
git tag -a v2.0 HEAD~1 -m "First stable roster"
Instructions for students
Scenario: The duty-roster repo contains text files that track which people are assigned for duties on which days of the week. This repo is backed up in a remote named production. Apparently, tags in the local repo are not in sync with the tags in your remote. You intend to rectify this situation as follows:
Task:
- Push both tags in the local repo to the remote.
- If any tags are present in the remote
productionbut not in the local repo (i.e., likely result of you previously deleting them in the local repo but forgetting to delete them in the remote repo), delete them in the remote.
Exercise grading
Verify that,
- both local tags are pushed to the repo.
- the
betatag is deleted from the remote.
Requires remote repository?
https://github.com/git-mastery/gm-duty-roster
Additional remarks
No response
Metadata
Metadata
Assignees
Labels
approvedexercise discussionDiscussion about the design of an exerciseDiscussion about the design of an exercise