Skip to content

[Exercise Discussion] T6/mix-messy-docs #70

@damithc

Description

@damithc

Existing exercise check

Lesson

This exercise will appear at the bottom of the tour https://nus-cs2103-ay2526s1.github.io/website/book/gitAndGithub/trail/branchingLocally/index.html

Exercise learning outcomes

It covers all topics of the above tour, excluding detours

Exercise setup

Inputs to the new.sh:

Exercise name: mix-messy-docs
Tags (space separated): git-branch
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'): local
Exercise repo name (defaults to ...): user-docs
Git-Mastery Github repository title (defaults to ''): 
Initialize exercise repo as Git repository? (defaults to y)  [y/N]: Y

Clone gm-user-docs as user-docs.

gitGraph BT:
  commit id: "Add features.md"
  commit id: "Mention feature for creating books" tag: "v10"
  branch feature-search
  branch feature-delete
  branch list
  checkout feature-delete
  commit id: "Mention feature for deleting books"
  checkout feature-search
  commit id: "Mention feature for searching books"
  checkout feature-delete
  commit id: "Add missing period"
  checkout main
  commit id: "Fix phrasing of heading"
  checkout feature-search
  commit id: "Add more details on the search feature"
  checkout list
  commit id: "Add partial docs for listing books"
Loading

Instructions for students

Scenario: You are writing user documentation for a product. You have already written documentation for a few new features, each in a separate branch. You wish to accumulate this work in a separate branch called development until the next product release.

Task:

  1. Create a new branch development, starting from the commit tagged v1.0
  2. Merge the feature-search branch onto the development branch, without using fast-forwarding (i.e., create a merge commit). Delete the feature-search branch.
  3. Similarly, merge the feature-delete branch onto the development branch. Resolve any merge conflicts -- in the features.md, the delete feature should appear after the search feature (see below). Delete the feature-delete branch.
    # Features
    
    ## Create Book
    
    Allows creating one book at a time.
    
    ## Searching for Books
    
    Allows searching for books by keywords.
    Works only for book titles.
    
    ## Deleting Books
    
    Allows deleting books.
    
  4. The list branch is not yet ready to be merged but rename it as feature-list, to be consistent with the naming convention you have been following in this repo.

Exercise grading

Verify the result is as follows:

gitGraph BT:
  commit id: "Add features.md"
  commit id: "Mention feature for creating books" tag: "v10"
  branch deleted-feature-search
  branch deleted-feature-delete
  branch feature-list
  branch development
  checkout deleted-feature-delete
  commit id: "Mention feature for deleting books"
  checkout deleted-feature-search
  commit id: "Mention feature for searching books"
  checkout deleted-feature-delete
  commit id: "Add missing period"
  checkout main
  commit id: "Fix phrasing of heading"
  checkout deleted-feature-search
  commit id: "Add more details on the search feature"
  checkout feature-list
  commit id: "Add partial docs for listing books"
  checkout development
  merge deleted-feature-search
  merge deleted-feature-delete
Loading

Verify the features.md file has the expected contents. OK to have minor variations in blank lines.

Requires remote repository?

Yes. https://github.com/git-mastery/gm-user-docs

Additional remarks

No response

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions