Skip to content

[Hands-On Discussion] T2L4/hp-add-remote (Add a remote to a repo) #55

@damithc

Description

@damithc

Lesson

https://nus-cs2103-ay2526s1.github.io/website/book/gitAndGithub/setRemote/

Hands-on setup

Responses to provide when running new.sh:

Hands-on name: hp-add-remote
Requires Git? (defaults to y)  [y/N]: y
Requires Github? (defaults to y)  [y/N]: N

Equivalent bash commands for creating the sandbox (same as #54):

mkdir things
cd things
git init --initial-branch=main
echo -e "apples\nbananas\ncherries\ndragon fruits" >> fruits.txt
git add fruits.txt

echo "figs" >> fruits.txt  # add another line to fruits.txt
git add fruits.txt  # stage the updated file
git commit -m "Insert figs into fruits.txt"  # commit the changes

echo "a file for colours" >> colours.txt  # add a colours.txt file
echo "a file for shapes" >> shapes.txt  # add a shapes.txt file
git add colours.txt shapes.txt  # stage both files in one go
git commit -m "Add colours.txt, shapes.txt"  # commit the changes

Instructions for students

You may continue with the sandbox used in the previous practical, or run gitmastery download hp-add-remote to create a fresh sandbox for this practical.

Requires remote repository?

No

Additional remarks

N/A

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions