Skip to content

[Hands-on Discussion] T6L2 Do a fast-forward merge #139

@damithc

Description

@damithc

HP_ID: hp-merge-ff

Lesson

https://git-mastery.github.io/lessons/merge/

Hands-on setup

Hands-on name: {{ HP_ID }}
Requires Git? (defaults to y)  [y/N]: y
Requires Github? (defaults to y)  [y/N]: N

Prepare the repo as follows:

md sports
cd sports
git init

echo -e "Arnold Palmer\nTiger Woods" > golf.txt
git stage golf.txt
git commit -m "Add golf.txt"

echo -e "Pete Sampras\nRoger Federer\nSerena Williams" > tennis.txt
git stage tennis.txt
git commit -m "Add tennis.txt"

git switch master
git switch -c add-swimming

echo "Michael Phelps" > swimming.txt
git stage swimming.txt
git commit -m "Add swimming.txt"

echo "Ian Thorpe" >> swimming.txt
git commit -am "Add Thorpe to swimming.txt"

git checkout master

Instructions for students

Run gitmastery download {{ HP_ID }} to create a fresh sandbox for this practical.

Requires remote repository?

No response

Additional remarks

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions