Skip to content

[Hands-on Discussion] T6L4 Rename local branches #141

@damithc

Description

@damithc

HP_ID: hp-branch-rename

Lesson

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

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:

mkdir samplerepo-books
cd samplerepo-books
git init
echo "Horror Stories" >> horror.txt
git add .
git commit -m "Add horror.txt"
git switch -c textbooks
echo "Textbooks" >> textbooks.txt
git add .
git commit -m "Add textbooks.txt"
git switch master
git switch -c fantasy
echo "Fantasy Books" >> fantasy.txt
git add .
git commit -m "Add fantasy.txt"
git switch master
git merge --no-ff -m "Merge branch textbooks" textbooks

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